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) 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= 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/transaction.pb.dart b/www/grpc/gen/dart/transaction.pb.dart index 14d0c9125..18ee320da 100644 --- a/www/grpc/gen/dart/transaction.pb.dart +++ b/www/grpc/gen/dart/transaction.pb.dart @@ -383,6 +383,164 @@ class BroadcastTransactionResponse extends $pb.GeneratedMessage { void clearId() => clearField(1); } +enum GetRawTransactionRequest_Payload { + transfer, + bond, + unbond, + withdraw, + notSet +} + +class GetRawTransactionRequest extends $pb.GeneratedMessage { + static const $core.Map<$core.int, GetRawTransactionRequest_Payload> _GetRawTransactionRequest_PayloadByTag = { + 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, [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') + ..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 + ; + + GetRawTransactionRequest._() : super(); + factory GetRawTransactionRequest({ + $core.int? lockTime, + $core.String? memo, + $fixnum.Int64? fee, + PayloadTransfer? transfer, + PayloadBond? bond, + PayloadUnbond? unbond, + PayloadWithdraw? withdraw, + }) { + final _result = create(); + if (lockTime != null) { + _result.lockTime = lockTime; + } + if (memo != null) { + _result.memo = memo; + } + if (fee != null) { + _result.fee = fee; + } + 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_Payload whichPayload() => _GetRawTransactionRequest_PayloadByTag[$_whichOneof(0)]!; + void clearPayload() => 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) + $fixnum.Int64 get fee => $_getI64(2); + @$pb.TagNumber(3) + set fee($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasFee() => $_has(2); + @$pb.TagNumber(3) + void clearFee() => clearField(3); + + @$pb.TagNumber(4) + PayloadTransfer get transfer => $_getN(3); + @$pb.TagNumber(4) + set transfer(PayloadTransfer v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasTransfer() => $_has(3); + @$pb.TagNumber(4) + void clearTransfer() => clearField(4); + @$pb.TagNumber(4) + PayloadTransfer ensureTransfer() => $_ensure(3); + + @$pb.TagNumber(5) + PayloadBond get bond => $_getN(4); + @$pb.TagNumber(5) + set bond(PayloadBond v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasBond() => $_has(4); + @$pb.TagNumber(5) + void clearBond() => clearField(5); + @$pb.TagNumber(5) + PayloadBond ensureBond() => $_ensure(4); + + @$pb.TagNumber(6) + PayloadUnbond get unbond => $_getN(5); + @$pb.TagNumber(6) + set unbond(PayloadUnbond v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasUnbond() => $_has(5); + @$pb.TagNumber(6) + void clearUnbond() => clearField(6); + @$pb.TagNumber(6) + 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 { 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) @@ -826,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); @@ -868,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 { @@ -950,6 +1122,7 @@ 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') ..hasRequiredFields = false ; @@ -958,6 +1131,7 @@ class PayloadBond extends $pb.GeneratedMessage { $core.String? sender, $core.String? receiver, $fixnum.Int64? stake, + $core.String? publicKey, }) { final _result = create(); if (sender != null) { @@ -969,6 +1143,9 @@ class PayloadBond extends $pb.GeneratedMessage { if (stake != null) { _result.stake = stake; } + if (publicKey != null) { + _result.publicKey = publicKey; + } return _result; } factory PayloadBond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1018,6 +1195,15 @@ 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); } class PayloadSortition extends $pb.GeneratedMessage { @@ -1130,24 +1316,24 @@ 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') ..hasRequiredFields = false ; PayloadWithdraw._() : super(); factory PayloadWithdraw({ - $core.String? from, - $core.String? to, + $core.String? validatorAddress, + $core.String? accountAddress, $fixnum.Int64? amount, }) { 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; @@ -1176,22 +1362,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); @@ -1493,6 +1679,10 @@ class TransactionApi { 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); + } $async.Future getRawTransferTransaction($pb.ClientContext? ctx, GetRawTransferTransactionRequest request) { var emptyResponse = GetRawTransactionResponse(); return _client.invoke(ctx, 'Transaction', 'GetRawTransferTransaction', request, emptyResponse); diff --git a/www/grpc/gen/dart/transaction.pbjson.dart b/www/grpc/gen/dart/transaction.pbjson.dart index a9b78e9bb..a733bf608 100644 --- a/www/grpc/gen/dart/transaction.pbjson.dart +++ b/www/grpc/gen/dart/transaction.pbjson.dart @@ -100,6 +100,25 @@ const BroadcastTransactionResponse$json = const { /// 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': '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'}, + ], +}; + +/// Descriptor for `GetRawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRawTransactionRequestDescriptor = $convert.base64Decode('ChhHZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRISCgRtZW1vGAIgASgJUgRtZW1vEhAKA2ZlZRgDIAEoA1IDZmVlEjUKCHRyYW5zZmVyGAQgASgLMhcucGFjdHVzLlBheWxvYWRUcmFuc2ZlckgAUgh0cmFuc2ZlchIpCgRib25kGAUgASgLMhMucGFjdHVzLlBheWxvYWRCb25kSABSBGJvbmQSLwoGdW5ib25kGAYgASgLMhUucGFjdHVzLlBheWxvYWRVbmJvbmRIAFIGdW5ib25kEjUKCHdpdGhkcmF3GAcgASgLMhcucGFjdHVzLlBheWxvYWRXaXRoZHJhd0gAUgh3aXRoZHJhd0IJCgdwYXlsb2Fk'); @$core.Deprecated('Use getRawTransferTransactionRequestDescriptor instead') const GetRawTransferTransactionRequest$json = const { '1': 'GetRawTransferTransactionRequest', @@ -163,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', @@ -187,11 +207,12 @@ 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'}, ], }; /// Descriptor for `PayloadBond`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadBondDescriptor = $convert.base64Decode('CgtQYXlsb2FkQm9uZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtl'); +final $typed_data.Uint8List payloadBondDescriptor = $convert.base64Decode('CgtQYXlsb2FkQm9uZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtlEh0KCnB1YmxpY19rZXkYBCABKAlSCXB1YmxpY0tleQ=='); @$core.Deprecated('Use payloadSortitionDescriptor instead') const PayloadSortition$json = const { '1': 'PayloadSortition', @@ -217,14 +238,14 @@ 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'}, ], }; /// Descriptor for `PayloadWithdraw`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadWithdrawDescriptor = $convert.base64Decode('Cg9QYXlsb2FkV2l0aGRyYXcSEgoEZnJvbRgBIAEoCVIEZnJvbRIOCgJ0bxgCIAEoCVICdG8SFgoGYW1vdW50GAMgASgDUgZhbW91bnQ='); +final $typed_data.Uint8List payloadWithdrawDescriptor = $convert.base64Decode('Cg9QYXlsb2FkV2l0aGRyYXcSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvckFkZHJlc3MSJwoPYWNjb3VudF9hZGRyZXNzGAIgASgJUg5hY2NvdW50QWRkcmVzcxIWCgZhbW91bnQYAyABKANSBmFtb3VudA=='); @$core.Deprecated('Use transactionInfoDescriptor instead') const TransactionInfo$json = const { '1': 'TransactionInfo', @@ -258,6 +279,7 @@ const $core.Map<$core.String, $core.dynamic> TransactionServiceBase$json = 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'}, 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'}, @@ -279,12 +301,13 @@ const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> Transactio '.pactus.CalculateFeeResponse': CalculateFeeResponse$json, '.pactus.BroadcastTransactionRequest': BroadcastTransactionRequest$json, '.pactus.BroadcastTransactionResponse': BroadcastTransactionResponse$json, - '.pactus.GetRawTransferTransactionRequest': GetRawTransferTransactionRequest$json, + '.pactus.GetRawTransactionRequest': GetRawTransactionRequest$json, '.pactus.GetRawTransactionResponse': GetRawTransactionResponse$json, + '.pactus.GetRawTransferTransactionRequest': GetRawTransferTransactionRequest$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='); +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 35b1a75cb..4ad99133e 100644 --- a/www/grpc/gen/dart/transaction.pbserver.dart +++ b/www/grpc/gen/dart/transaction.pbserver.dart @@ -19,6 +19,7 @@ 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); $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); @@ -29,6 +30,7 @@ abstract class TransactionServiceBase extends $pb.GeneratedService { case 'GetTransaction': return $0.GetTransactionRequest(); 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(); @@ -42,6 +44,7 @@ abstract class TransactionServiceBase extends $pb.GeneratedService { 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); 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); diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md index b0c4bc67a..81d3ac3b5 100644 --- a/www/grpc/gen/docs/grpc.md +++ b/www/grpc/gen/docs/grpc.md @@ -27,6 +27,10 @@ Each PAC is equivalent to 1,000,000,000 or 109 NanoPACs. BroadcastTransaction +
  • + + GetRawTransaction +
  • GetRawTransferTransaction @@ -344,6 +348,13 @@ parameters.

    The stake amount in NanoPAC. + + transaction.bond.public_key + string + + The public key of the validator. + + transaction.sortition PayloadSortition @@ -387,17 +398,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. @@ -535,9 +546,96 @@ and payload type.

    +### 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. +
    fee int64 + The fee for the transaction in NanoPAC. +
    transfer PayloadTransfer + (OneOf) +
    bond PayloadBond + (OneOf) +
    unbond PayloadUnbond + (OneOf) +
    withdraw PayloadWithdraw + (OneOf) +
    +

    GetRawTransactionResponse Response

    + + + + + + + + + + + + + + + + + +
    FieldTypeDescription
    raw_transaction string + The raw transaction data. +
    id string + The unique ID of the transaction. +
    + ### GetRawTransferTransaction -

    GetRawTransferTransaction retrieves raw details of a transfer transaction.

    +

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

    GetRawTransferTransactionRequest Request

    @@ -604,13 +702,21 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + ### GetRawBondTransaction -

    GetRawBondTransaction retrieves raw details of a bond transaction.

    +

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

    GetRawBondTransactionRequest Request

    @@ -684,13 +790,21 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + ### GetRawUnbondTransaction -

    GetRawUnbondTransaction retrieves raw details of an unbond transaction.

    +

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

    GetRawUnbondTransactionRequest Request

    @@ -736,13 +850,21 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + ### GetRawWithdrawTransaction -

    GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.

    +

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

    GetRawWithdrawTransactionRequest Request

    @@ -809,6 +931,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -1090,6 +1219,13 @@ BLOCK_TRANSACTIONS. The stake amount in NanoPAC. + + txs[].bond.public_key + string + + The public key of the validator. + + txs[].sortition PayloadSortition @@ -1133,17 +1269,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. @@ -2058,6 +2194,13 @@ types. The stake amount in NanoPAC. + + txs[].bond.public_key + string + + The public key of the validator. + + txs[].sortition PayloadSortition @@ -2101,17 +2244,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. diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md index 7a6f9a72d..5c10a8c24 100644 --- a/www/grpc/gen/docs/json-rpc.md +++ b/www/grpc/gen/docs/json-rpc.md @@ -78,6 +78,10 @@ curl --location 'http://localhost:8545/' \ pactus.transaction.broadcast_transaction
  • +
  • + + pactus.transaction.get_raw_transaction +
  • pactus.transaction.get_raw_transfer_transaction @@ -395,6 +399,13 @@ parameters.

    The stake amount in NanoPAC. + + transaction.bond.public_key + string + + The public key of the validator. + + transaction.sortition object @@ -438,17 +449,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. @@ -586,9 +597,96 @@ and payload type.

    +### 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. +
    fee numeric + The fee for the transaction in NanoPAC. +
    transfer object + (OneOf) +
    bond object + (OneOf) +
    unbond object + (OneOf) +
    withdraw object + (OneOf) +
    +

    Result

    + + + + + + + + + + + + + + + + + +
    FieldTypeDescription
    raw_transaction string + The raw transaction data. +
    id string + The unique ID of the transaction. +
    + ### pactus.transaction.get_raw_transfer_transaction -

    GetRawTransferTransaction retrieves raw details of a transfer transaction.

    +

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

    Parameters

    @@ -655,13 +753,21 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + ### pactus.transaction.get_raw_bond_transaction -

    GetRawBondTransaction retrieves raw details of a bond transaction.

    +

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

    Parameters

    @@ -735,13 +841,21 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + ### pactus.transaction.get_raw_unbond_transaction -

    GetRawUnbondTransaction retrieves raw details of an unbond transaction.

    +

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

    Parameters

    @@ -787,13 +901,21 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + ### pactus.transaction.get_raw_withdraw_transaction -

    GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.

    +

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

    Parameters

    @@ -860,6 +982,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -1141,6 +1270,13 @@ BLOCK_TRANSACTIONS. The stake amount in NanoPAC. + + txs[].bond.public_key + string + + The public key of the validator. + + txs[].sortition object @@ -1184,17 +1320,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. @@ -2109,6 +2245,13 @@ types. The stake amount in NanoPAC. + + txs[].bond.public_key + string + + The public key of the validator. + + txs[].sortition object @@ -2152,17 +2295,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. diff --git a/www/grpc/gen/go/transaction.cobra.pb.go b/www/grpc/gen/go/transaction.cobra.pb.go index 899952b21..6bb2cd731 100644 --- a/www/grpc/gen/go/transaction.cobra.pb.go +++ b/www/grpc/gen/go/transaction.cobra.pb.go @@ -23,6 +23,7 @@ func TransactionClientCommand(options ...client.Option) *cobra.Command { _TransactionGetTransactionCommand(cfg), _TransactionCalculateFeeCommand(cfg), _TransactionBroadcastTransactionCommand(cfg), + _TransactionGetRawTransactionCommand(cfg), _TransactionGetRawTransferTransactionCommand(cfg), _TransactionGetRawBondTransactionCommand(cfg), _TransactionGetRawUnbondTransactionCommand(cfg), @@ -160,13 +161,91 @@ func _TransactionBroadcastTransactionCommand(cfg *client.Config) *cobra.Command 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 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} }) + 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 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 in NanoPAC.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Amount"), 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} }) + 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 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.") + 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} }) + _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.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.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Amount"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + + 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.", + 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 { @@ -213,7 +292,7 @@ func _TransactionGetRawBondTransactionCommand(cfg *client.Config) *cobra.Command cmd := &cobra.Command{ Use: cfg.CommandNamer("GetRawBondTransaction"), Short: "GetRawBondTransaction RPC client", - Long: "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 { @@ -261,7 +340,7 @@ func _TransactionGetRawUnbondTransactionCommand(cfg *client.Config) *cobra.Comma cmd := &cobra.Command{ Use: cfg.CommandNamer("GetRawUnbondTransaction"), Short: "GetRawUnbondTransaction RPC client", - Long: "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 { @@ -305,7 +384,7 @@ func _TransactionGetRawWithdrawTransactionCommand(cfg *client.Config) *cobra.Com cmd := &cobra.Command{ Use: cfg.CommandNamer("GetRawWithdrawTransaction"), Short: "GetRawWithdrawTransaction RPC client", - Long: "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.pb.go b/www/grpc/gen/go/transaction.pb.go index 84a40dc99..d6ba91849 100644 --- a/www/grpc/gen/go/transaction.pb.go +++ b/www/grpc/gen/go/transaction.pb.go @@ -482,7 +482,144 @@ func (x *BroadcastTransactionResponse) GetId() string { return "" } -// Request message for retrieving raw details of a transfer transaction. +// 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"` + // 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 + // *GetRawTransactionRequest_Bond + // *GetRawTransactionRequest_Unbond + // *GetRawTransactionRequest_Withdraw + Payload isGetRawTransactionRequest_Payload `protobuf_oneof:"payload"` +} + +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 (x *GetRawTransactionRequest) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (m *GetRawTransactionRequest) GetPayload() isGetRawTransactionRequest_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (x *GetRawTransactionRequest) GetTransfer() *PayloadTransfer { + if x, ok := x.GetPayload().(*GetRawTransactionRequest_Transfer); ok { + return x.Transfer + } + return nil +} + +func (x *GetRawTransactionRequest) GetBond() *PayloadBond { + if x, ok := x.GetPayload().(*GetRawTransactionRequest_Bond); ok { + return x.Bond + } + return nil +} + +func (x *GetRawTransactionRequest) GetUnbond() *PayloadUnbond { + if x, ok := x.GetPayload().(*GetRawTransactionRequest_Unbond); ok { + return x.Unbond + } + return nil +} + +func (x *GetRawTransactionRequest) GetWithdraw() *PayloadWithdraw { + if x, ok := x.GetPayload().(*GetRawTransactionRequest_Withdraw); ok { + return x.Withdraw + } + return nil +} + +type isGetRawTransactionRequest_Payload interface { + isGetRawTransactionRequest_Payload() +} + +type GetRawTransactionRequest_Transfer struct { + Transfer *PayloadTransfer `protobuf:"bytes,4,opt,name=transfer,proto3,oneof"` +} + +type GetRawTransactionRequest_Bond struct { + Bond *PayloadBond `protobuf:"bytes,5,opt,name=bond,proto3,oneof"` +} + +type GetRawTransactionRequest_Unbond struct { + Unbond *PayloadUnbond `protobuf:"bytes,6,opt,name=unbond,proto3,oneof"` +} + +type GetRawTransactionRequest_Withdraw struct { + Withdraw *PayloadWithdraw `protobuf:"bytes,7,opt,name=withdraw,proto3,oneof"` +} + +func (*GetRawTransactionRequest_Transfer) isGetRawTransactionRequest_Payload() {} + +func (*GetRawTransactionRequest_Bond) isGetRawTransactionRequest_Payload() {} + +func (*GetRawTransactionRequest_Unbond) isGetRawTransactionRequest_Payload() {} + +func (*GetRawTransactionRequest_Withdraw) isGetRawTransactionRequest_Payload() {} + +// Deprecated: Request message for retrieving raw details of a transfer transaction. type GetRawTransferTransactionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -506,7 +643,7 @@ type GetRawTransferTransactionRequest struct { func (x *GetRawTransferTransactionRequest) Reset() { *x = GetRawTransferTransactionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[6] + mi := &file_transaction_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -519,7 +656,7 @@ func (x *GetRawTransferTransactionRequest) String() string { func (*GetRawTransferTransactionRequest) ProtoMessage() {} func (x *GetRawTransferTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[6] + mi := &file_transaction_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -532,7 +669,7 @@ func (x *GetRawTransferTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRawTransferTransactionRequest.ProtoReflect.Descriptor instead. func (*GetRawTransferTransactionRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{6} + return file_transaction_proto_rawDescGZIP(), []int{7} } func (x *GetRawTransferTransactionRequest) GetLockTime() uint32 { @@ -577,7 +714,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 @@ -603,7 +740,7 @@ type GetRawBondTransactionRequest struct { func (x *GetRawBondTransactionRequest) Reset() { *x = GetRawBondTransactionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[7] + mi := &file_transaction_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -616,7 +753,7 @@ func (x *GetRawBondTransactionRequest) String() string { func (*GetRawBondTransactionRequest) ProtoMessage() {} func (x *GetRawBondTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[7] + mi := &file_transaction_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -629,7 +766,7 @@ func (x *GetRawBondTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRawBondTransactionRequest.ProtoReflect.Descriptor instead. func (*GetRawBondTransactionRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{7} + return file_transaction_proto_rawDescGZIP(), []int{8} } func (x *GetRawBondTransactionRequest) GetLockTime() uint32 { @@ -681,7 +818,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 @@ -699,7 +836,7 @@ type GetRawUnbondTransactionRequest struct { func (x *GetRawUnbondTransactionRequest) Reset() { *x = GetRawUnbondTransactionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[8] + mi := &file_transaction_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -712,7 +849,7 @@ func (x *GetRawUnbondTransactionRequest) String() string { func (*GetRawUnbondTransactionRequest) ProtoMessage() {} func (x *GetRawUnbondTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[8] + mi := &file_transaction_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -725,7 +862,7 @@ func (x *GetRawUnbondTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRawUnbondTransactionRequest.ProtoReflect.Descriptor instead. func (*GetRawUnbondTransactionRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{8} + return file_transaction_proto_rawDescGZIP(), []int{9} } func (x *GetRawUnbondTransactionRequest) GetLockTime() uint32 { @@ -749,7 +886,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 @@ -773,7 +910,7 @@ type GetRawWithdrawTransactionRequest struct { func (x *GetRawWithdrawTransactionRequest) Reset() { *x = GetRawWithdrawTransactionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[9] + mi := &file_transaction_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -786,7 +923,7 @@ func (x *GetRawWithdrawTransactionRequest) String() string { func (*GetRawWithdrawTransactionRequest) ProtoMessage() {} func (x *GetRawWithdrawTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[9] + mi := &file_transaction_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -799,7 +936,7 @@ func (x *GetRawWithdrawTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRawWithdrawTransactionRequest.ProtoReflect.Descriptor instead. func (*GetRawWithdrawTransactionRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{9} + return file_transaction_proto_rawDescGZIP(), []int{10} } func (x *GetRawWithdrawTransactionRequest) GetLockTime() uint32 { @@ -852,12 +989,14 @@ 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() { *x = GetRawTransactionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[10] + mi := &file_transaction_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -870,7 +1009,7 @@ func (x *GetRawTransactionResponse) String() string { func (*GetRawTransactionResponse) ProtoMessage() {} func (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[10] + mi := &file_transaction_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -883,7 +1022,7 @@ func (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRawTransactionResponse.ProtoReflect.Descriptor instead. func (*GetRawTransactionResponse) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{10} + return file_transaction_proto_rawDescGZIP(), []int{11} } func (x *GetRawTransactionResponse) GetRawTransaction() string { @@ -893,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 @@ -910,7 +1056,7 @@ type PayloadTransfer struct { func (x *PayloadTransfer) Reset() { *x = PayloadTransfer{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[11] + mi := &file_transaction_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -923,7 +1069,7 @@ func (x *PayloadTransfer) String() string { func (*PayloadTransfer) ProtoMessage() {} func (x *PayloadTransfer) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[11] + mi := &file_transaction_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -936,7 +1082,7 @@ func (x *PayloadTransfer) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadTransfer.ProtoReflect.Descriptor instead. func (*PayloadTransfer) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{11} + return file_transaction_proto_rawDescGZIP(), []int{12} } func (x *PayloadTransfer) GetSender() string { @@ -972,12 +1118,14 @@ 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"` } func (x *PayloadBond) Reset() { *x = PayloadBond{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[12] + mi := &file_transaction_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -990,7 +1138,7 @@ func (x *PayloadBond) String() string { func (*PayloadBond) ProtoMessage() {} func (x *PayloadBond) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[12] + mi := &file_transaction_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1003,7 +1151,7 @@ func (x *PayloadBond) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadBond.ProtoReflect.Descriptor instead. func (*PayloadBond) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{12} + return file_transaction_proto_rawDescGZIP(), []int{13} } func (x *PayloadBond) GetSender() string { @@ -1027,6 +1175,13 @@ func (x *PayloadBond) GetStake() int64 { return 0 } +func (x *PayloadBond) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + // Payload for a sortition transaction. type PayloadSortition struct { state protoimpl.MessageState @@ -1042,7 +1197,7 @@ type PayloadSortition struct { func (x *PayloadSortition) Reset() { *x = PayloadSortition{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[13] + mi := &file_transaction_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1055,7 +1210,7 @@ func (x *PayloadSortition) String() string { func (*PayloadSortition) ProtoMessage() {} func (x *PayloadSortition) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[13] + mi := &file_transaction_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1068,7 +1223,7 @@ func (x *PayloadSortition) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadSortition.ProtoReflect.Descriptor instead. func (*PayloadSortition) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{13} + return file_transaction_proto_rawDescGZIP(), []int{14} } func (x *PayloadSortition) GetAddress() string { @@ -1098,7 +1253,7 @@ type PayloadUnbond struct { func (x *PayloadUnbond) Reset() { *x = PayloadUnbond{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[14] + mi := &file_transaction_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1111,7 +1266,7 @@ func (x *PayloadUnbond) String() string { func (*PayloadUnbond) ProtoMessage() {} func (x *PayloadUnbond) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[14] + mi := &file_transaction_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1124,7 +1279,7 @@ func (x *PayloadUnbond) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUnbond.ProtoReflect.Descriptor instead. func (*PayloadUnbond) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{14} + return file_transaction_proto_rawDescGZIP(), []int{15} } func (x *PayloadUnbond) GetValidator() string { @@ -1140,10 +1295,10 @@ 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"` } @@ -1151,7 +1306,7 @@ type PayloadWithdraw struct { func (x *PayloadWithdraw) Reset() { *x = PayloadWithdraw{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[15] + mi := &file_transaction_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1164,7 +1319,7 @@ func (x *PayloadWithdraw) String() string { func (*PayloadWithdraw) ProtoMessage() {} func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[15] + mi := &file_transaction_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1177,19 +1332,19 @@ func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadWithdraw.ProtoReflect.Descriptor instead. func (*PayloadWithdraw) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{15} + 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 "" } @@ -1240,7 +1395,7 @@ type TransactionInfo struct { func (x *TransactionInfo) Reset() { *x = TransactionInfo{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[16] + mi := &file_transaction_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1253,7 +1408,7 @@ func (x *TransactionInfo) String() string { func (*TransactionInfo) ProtoMessage() {} func (x *TransactionInfo) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[16] + mi := &file_transaction_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1266,7 +1421,7 @@ func (x *TransactionInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionInfo.ProtoReflect.Descriptor instead. func (*TransactionInfo) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{16} + return file_transaction_proto_rawDescGZIP(), []int{17} } func (x *TransactionInfo) GetId() string { @@ -1461,144 +1616,175 @@ 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, 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, + 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, 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, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, + 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, 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, + 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, 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, 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, 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, @@ -1646,7 +1832,7 @@ func file_transaction_proto_rawDescGZIP() []byte { } var file_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +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 @@ -1656,47 +1842,54 @@ var file_transaction_proto_goTypes = []any{ (*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 + (*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 - 18, // 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 - 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 + 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 + 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 + 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 + 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 + 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() } @@ -1778,7 +1971,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetRawTransferTransactionRequest); i { + switch v := v.(*GetRawTransactionRequest); i { case 0: return &v.state case 1: @@ -1790,7 +1983,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetRawBondTransactionRequest); i { + switch v := v.(*GetRawTransferTransactionRequest); i { case 0: return &v.state case 1: @@ -1802,7 +1995,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetRawUnbondTransactionRequest); i { + switch v := v.(*GetRawBondTransactionRequest); i { case 0: return &v.state case 1: @@ -1814,7 +2007,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetRawWithdrawTransactionRequest); i { + switch v := v.(*GetRawUnbondTransactionRequest); i { case 0: return &v.state case 1: @@ -1826,7 +2019,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetRawTransactionResponse); i { + switch v := v.(*GetRawWithdrawTransactionRequest); i { case 0: return &v.state case 1: @@ -1838,7 +2031,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PayloadTransfer); i { + switch v := v.(*GetRawTransactionResponse); i { case 0: return &v.state case 1: @@ -1850,7 +2043,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PayloadBond); i { + switch v := v.(*PayloadTransfer); i { case 0: return &v.state case 1: @@ -1862,7 +2055,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PayloadSortition); i { + switch v := v.(*PayloadBond); i { case 0: return &v.state case 1: @@ -1874,7 +2067,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*PayloadUnbond); i { + switch v := v.(*PayloadSortition); i { case 0: return &v.state case 1: @@ -1886,7 +2079,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PayloadWithdraw); i { + switch v := v.(*PayloadUnbond); i { case 0: return &v.state case 1: @@ -1898,6 +2091,18 @@ func file_transaction_proto_init() { } } 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 @@ -1910,7 +2115,13 @@ func file_transaction_proto_init() { } } } - file_transaction_proto_msgTypes[16].OneofWrappers = []any{ + 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), @@ -1923,7 +2134,7 @@ func file_transaction_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_transaction_proto_rawDesc, NumEnums: 2, - NumMessages: 17, + NumMessages: 18, 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 83467c5b1..c076cff29 100644 --- a/www/grpc/gen/go/transaction.pb.gw.go +++ b/www/grpc/gen/go/transaction.pb.gw.go @@ -140,145 +140,37 @@ func local_request_Transaction_BroadcastTransaction_0(ctx context.Context, marsh } var ( - filter_Transaction_GetRawTransferTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Transaction_GetRawTransaction_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 +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_GetRawTransferTransaction_0); err != nil { + 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.GetRawTransferTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetRawTransaction(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 +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_GetRawTransferTransaction_0); err != nil { + 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.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) + msg, err := server.GetRawTransaction(ctx, &protoReq) return msg, metadata, err } @@ -365,32 +257,7 @@ 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) { + 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 @@ -398,12 +265,12 @@ func RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux 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")) + 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_GetRawBondTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + 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 { @@ -411,57 +278,7 @@ func RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux 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()...) + forward_Transaction_GetRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -572,91 +389,25 @@ 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) { + 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/GetRawBondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_bond_transaction")) + 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_GetRawBondTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + 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_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()...) + forward_Transaction_GetRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -670,13 +421,7 @@ var ( 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"}, "")) + pattern_Transaction_GetRawTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_transaction"}, "")) ) var ( @@ -686,11 +431,5 @@ var ( 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 + 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 index a561a93da..e72010e33 100644 --- a/www/grpc/gen/go/transaction_grpc.pb.go +++ b/www/grpc/gen/go/transaction_grpc.pb.go @@ -22,6 +22,7 @@ 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_GetRawTransferTransaction_FullMethodName = "/pactus.Transaction/GetRawTransferTransaction" Transaction_GetRawBondTransaction_FullMethodName = "/pactus.Transaction/GetRawBondTransaction" Transaction_GetRawUnbondTransaction_FullMethodName = "/pactus.Transaction/GetRawUnbondTransaction" @@ -43,13 +44,19 @@ type TransactionClient interface { 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. + // 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) - // GetRawBondTransaction retrieves raw details of a bond transaction. + // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + // Use GetRawTransaction instead. GetRawBondTransaction(ctx context.Context, in *GetRawBondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) - // GetRawUnbondTransaction retrieves raw details of an unbond transaction. + // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + // Use GetRawTransaction instead. GetRawUnbondTransaction(ctx context.Context, in *GetRawUnbondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) - // GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + // Use GetRawTransaction instead. GetRawWithdrawTransaction(ctx context.Context, in *GetRawWithdrawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) } @@ -91,6 +98,16 @@ func (c *transactionClient) BroadcastTransaction(ctx context.Context, in *Broadc 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 +} + func (c *transactionClient) GetRawTransferTransaction(ctx context.Context, in *GetRawTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetRawTransactionResponse) @@ -146,13 +163,19 @@ type TransactionServer interface { 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. + // 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) - // GetRawBondTransaction retrieves raw details of a bond transaction. + // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + // Use GetRawTransaction instead. GetRawBondTransaction(context.Context, *GetRawBondTransactionRequest) (*GetRawTransactionResponse, error) - // GetRawUnbondTransaction retrieves raw details of an unbond transaction. + // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + // Use GetRawTransaction instead. GetRawUnbondTransaction(context.Context, *GetRawUnbondTransactionRequest) (*GetRawTransactionResponse, error) - // GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + // Use GetRawTransaction instead. GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error) } @@ -169,6 +192,9 @@ func (UnimplementedTransactionServer) CalculateFee(context.Context, *CalculateFe 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") +} func (UnimplementedTransactionServer) GetRawTransferTransaction(context.Context, *GetRawTransferTransactionRequest) (*GetRawTransactionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRawTransferTransaction not implemented") } @@ -247,6 +273,24 @@ func _Transaction_BroadcastTransaction_Handler(srv interface{}, ctx context.Cont 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) +} + 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 { @@ -338,6 +382,10 @@ var Transaction_ServiceDesc = grpc.ServiceDesc{ MethodName: "BroadcastTransaction", Handler: _Transaction_BroadcastTransaction_Handler, }, + { + MethodName: "GetRawTransaction", + Handler: _Transaction_GetRawTransaction_Handler, + }, { MethodName: "GetRawTransferTransaction", Handler: _Transaction_GetRawTransferTransaction_Handler, diff --git a/www/grpc/gen/go/transaction_jgw.pb.go b/www/grpc/gen/go/transaction_jgw.pb.go index d4eb72a48..9982429ab 100644 --- a/www/grpc/gen/go/transaction_jgw.pb.go +++ b/www/grpc/gen/go/transaction_jgw.pb.go @@ -88,6 +88,23 @@ func (s *TransactionJsonRPC) Methods() map[string]func(ctx context.Context, mess 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) + }, + "pactus.transaction.get_raw_transfer_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { req := new(GetRawTransferTransactionRequest) diff --git a/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java b/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java index 159e34a58..f7b2aba1a 100644 --- a/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java +++ b/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java @@ -112,6 +112,37 @@ pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse> getBroadc 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; + } + private static volatile io.grpc.MethodDescriptor getGetRawTransferTransactionMethod; @@ -322,7 +353,18 @@ public void broadcastTransaction(pactus.transaction.TransactionOuterClass.Broadc /** *
    -     * GetRawTransferTransaction retrieves raw details of a transfer transaction.
    +     * 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); + } + + /** + *
    +     * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request, @@ -332,7 +374,8 @@ public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.G /** *
    -     * GetRawBondTransaction retrieves raw details of a bond transaction.
    +     * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request, @@ -342,7 +385,8 @@ public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRa /** *
    -     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.
    +     * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request, @@ -352,7 +396,8 @@ public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.Get /** *
    -     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
    +     * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public void getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request, @@ -383,6 +428,13 @@ public void getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.G 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))) .addMethod( getGetRawTransferTransactionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -470,7 +522,19 @@ public void broadcastTransaction(pactus.transaction.TransactionOuterClass.Broadc /** *
    -     * GetRawTransferTransaction retrieves raw details of a transfer transaction.
    +     * 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); + } + + /** + *
    +     * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request, @@ -481,7 +545,8 @@ public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.G /** *
    -     * GetRawBondTransaction retrieves raw details of a bond transaction.
    +     * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request, @@ -492,7 +557,8 @@ public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRa /** *
    -     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.
    +     * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request, @@ -503,7 +569,8 @@ public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.Get /** *
    -     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
    +     * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public void getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request, @@ -565,7 +632,18 @@ public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse bro /** *
    -     * GetRawTransferTransaction retrieves raw details of a transfer transaction.
    +     * 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); + } + + /** + *
    +     * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request) { @@ -575,7 +653,8 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRaw /** *
    -     * GetRawBondTransaction retrieves raw details of a bond transaction.
    +     * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request) { @@ -585,7 +664,8 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRaw /** *
    -     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.
    +     * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request) { @@ -595,7 +675,8 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRaw /** *
    -     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
    +     * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request) { @@ -659,7 +740,19 @@ public com.google.common.util.concurrent.ListenableFuture - * GetRawTransferTransaction retrieves raw details of a transfer transaction. + * 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); + } + + /** + *
    +     * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
    +     * Use GetRawTransaction instead.
          * 
    */ public com.google.common.util.concurrent.ListenableFuture getRawTransferTransaction( @@ -670,7 +763,8 @@ public com.google.common.util.concurrent.ListenableFuture - * GetRawBondTransaction retrieves raw details of a bond transaction. + * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + * Use GetRawTransaction instead. * */ public com.google.common.util.concurrent.ListenableFuture getRawBondTransaction( @@ -681,7 +775,8 @@ public com.google.common.util.concurrent.ListenableFuture - * GetRawUnbondTransaction retrieves raw details of an unbond transaction. + * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + * Use GetRawTransaction instead. * */ public com.google.common.util.concurrent.ListenableFuture getRawUnbondTransaction( @@ -692,7 +787,8 @@ public com.google.common.util.concurrent.ListenableFuture - * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + * Use GetRawTransaction instead. * */ public com.google.common.util.concurrent.ListenableFuture getRawWithdrawTransaction( @@ -705,10 +801,11 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -739,6 +836,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv 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; case METHODID_GET_RAW_TRANSFER_TRANSACTION: serviceImpl.getRawTransferTransaction((pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) request, (io.grpc.stub.StreamObserver) responseObserver); @@ -819,6 +920,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetTransactionMethod()) .addMethod(getCalculateFeeMethod()) .addMethod(getBroadcastTransactionMethod()) + .addMethod(getGetRawTransactionMethod()) .addMethod(getGetRawTransferTransactionMethod()) .addMethod(getGetRawBondTransactionMethod()) .addMethod(getGetRawUnbondTransactionMethod()) diff --git a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java index 74863a534..41f86be26 100644 --- a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java +++ b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java @@ -4426,6 +4426,1755 @@ public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse get } + 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(); + + /** + *
    +     * 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 = 4 [json_name = "transfer"]; + * @return The transfer. + */ + pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer(); + /** + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; + */ + pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder(); + + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + * @return Whether the bond field is set. + */ + boolean hasBond(); + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + * @return The bond. + */ + pactus.transaction.TransactionOuterClass.PayloadBond getBond(); + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + */ + pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder(); + + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + * @return Whether the unbond field is set. + */ + boolean hasUnbond(); + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + * @return The unbond. + */ + pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond(); + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + */ + pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder(); + + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + * @return Whether the withdraw field is set. + */ + boolean hasWithdraw(); + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + * @return The withdraw. + */ + pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw(); + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + */ + pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder(); + + public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.PayloadCase getPayloadCase(); + } + /** + *
    +   * 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 payloadCase_ = 0; + private java.lang.Object payload_; + public enum PayloadCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TRANSFER(4), + BOND(5), + UNBOND(6), + WITHDRAW(7), + 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 4: return TRANSFER; + case 5: return BOND; + case 6: return UNBOND; + case 7: 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 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 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 = 4 [json_name = "transfer"]; + * @return Whether the transfer field is set. + */ + @java.lang.Override + public boolean hasTransfer() { + return payloadCase_ == 4; + } + /** + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; + * @return The transfer. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer() { + if (payloadCase_ == 4) { + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } + /** + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() { + if (payloadCase_ == 4) { + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } + + public static final int BOND_FIELD_NUMBER = 5; + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + * @return Whether the bond field is set. + */ + @java.lang.Override + public boolean hasBond() { + return payloadCase_ == 5; + } + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + * @return The bond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBond getBond() { + if (payloadCase_ == 5) { + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() { + if (payloadCase_ == 5) { + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } + + public static final int UNBOND_FIELD_NUMBER = 6; + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + * @return Whether the unbond field is set. + */ + @java.lang.Override + public boolean hasUnbond() { + return payloadCase_ == 6; + } + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + * @return The unbond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond() { + if (payloadCase_ == 6) { + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() { + if (payloadCase_ == 6) { + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } + + public static final int WITHDRAW_FIELD_NUMBER = 7; + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + * @return Whether the withdraw field is set. + */ + @java.lang.Override + public boolean hasWithdraw() { + return payloadCase_ == 7; + } + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + * @return The withdraw. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw() { + if (payloadCase_ == 7) { + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() { + if (payloadCase_ == 7) { + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.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 (fee_ != 0L) { + output.writeInt64(3, fee_); + } + if (payloadCase_ == 4) { + output.writeMessage(4, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); + } + if (payloadCase_ == 5) { + output.writeMessage(5, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); + } + if (payloadCase_ == 6) { + output.writeMessage(6, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); + } + if (payloadCase_ == 7) { + output.writeMessage(7, (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 (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 (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, fee_); + } + if (payloadCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); + } + if (payloadCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); + } + if (payloadCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .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; + 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 (getFee() + != other.getFee()) return false; + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 4: + if (!getTransfer() + .equals(other.getTransfer())) return false; + break; + case 5: + if (!getBond() + .equals(other.getBond())) return false; + break; + case 6: + if (!getUnbond() + .equals(other.getUnbond())) return false; + break; + case 7: + 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(); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); + switch (payloadCase_) { + case 4: + hash = (37 * hash) + TRANSFER_FIELD_NUMBER; + hash = (53 * hash) + getTransfer().hashCode(); + break; + case 5: + hash = (37 * hash) + BOND_FIELD_NUMBER; + hash = (53 * hash) + getBond().hashCode(); + break; + case 6: + hash = (37 * hash) + UNBOND_FIELD_NUMBER; + hash = (53 * hash) + getUnbond().hashCode(); + break; + case 7: + 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_ = ""; + + fee_ = 0L; + + if (transferBuilder_ != null) { + transferBuilder_.clear(); + } + if (bondBuilder_ != null) { + bondBuilder_.clear(); + } + if (unbondBuilder_ != null) { + unbondBuilder_.clear(); + } + if (withdrawBuilder_ != null) { + withdrawBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = 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_; + result.fee_ = fee_; + if (payloadCase_ == 4) { + if (transferBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = transferBuilder_.build(); + } + } + if (payloadCase_ == 5) { + if (bondBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = bondBuilder_.build(); + } + } + if (payloadCase_ == 6) { + if (unbondBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = unbondBuilder_.build(); + } + } + if (payloadCase_ == 7) { + if (withdrawBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = withdrawBuilder_.build(); + } + } + 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.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(); + } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } + switch (other.getPayloadCase()) { + 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 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 8: { + lockTime_ = input.readUInt32(); + + break; + } // case 8 + case 18: { + memo_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + fee_ = input.readInt64(); + + break; + } // case 24 + case 34: { + input.readMessage( + getTransferFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getBondFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + 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 + } + 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 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 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 = 4 [json_name = "transfer"]; + * @return Whether the transfer field is set. + */ + @java.lang.Override + public boolean hasTransfer() { + return payloadCase_ == 4; + } + /** + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; + * @return The transfer. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer() { + if (transferBuilder_ == null) { + if (payloadCase_ == 4) { + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } else { + if (payloadCase_ == 4) { + return transferBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } + } + /** + * .pactus.PayloadTransfer transfer = 4 [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_ = 4; + return this; + } + /** + * .pactus.PayloadTransfer transfer = 4 [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_ = 4; + return this; + } + /** + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; + */ + public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.PayloadTransfer value) { + if (transferBuilder_ == null) { + if (payloadCase_ == 4 && + 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_ == 4) { + transferBuilder_.mergeFrom(value); + } else { + transferBuilder_.setMessage(value); + } + } + payloadCase_ = 4; + return this; + } + /** + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; + */ + public Builder clearTransfer() { + if (transferBuilder_ == null) { + if (payloadCase_ == 4) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 4) { + payloadCase_ = 0; + payload_ = null; + } + transferBuilder_.clear(); + } + return this; + } + /** + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; + */ + public pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder getTransferBuilder() { + return getTransferFieldBuilder().getBuilder(); + } + /** + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() { + if ((payloadCase_ == 4) && (transferBuilder_ != null)) { + return transferBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 4) { + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } + } + /** + * .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_ == 4)) { + 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_ = 4; + onChanged();; + return transferBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder> bondBuilder_; + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + * @return Whether the bond field is set. + */ + @java.lang.Override + public boolean hasBond() { + return payloadCase_ == 5; + } + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + * @return The bond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBond getBond() { + if (bondBuilder_ == null) { + if (payloadCase_ == 5) { + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } else { + if (payloadCase_ == 5) { + return bondBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } + } + /** + * .pactus.PayloadBond bond = 5 [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_ = 5; + return this; + } + /** + * .pactus.PayloadBond bond = 5 [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_ = 5; + return this; + } + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + */ + public Builder mergeBond(pactus.transaction.TransactionOuterClass.PayloadBond value) { + if (bondBuilder_ == null) { + if (payloadCase_ == 5 && + 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_ == 5) { + bondBuilder_.mergeFrom(value); + } else { + bondBuilder_.setMessage(value); + } + } + payloadCase_ = 5; + return this; + } + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + */ + public Builder clearBond() { + if (bondBuilder_ == null) { + if (payloadCase_ == 5) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 5) { + payloadCase_ = 0; + payload_ = null; + } + bondBuilder_.clear(); + } + return this; + } + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + */ + public pactus.transaction.TransactionOuterClass.PayloadBond.Builder getBondBuilder() { + return getBondFieldBuilder().getBuilder(); + } + /** + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() { + if ((payloadCase_ == 5) && (bondBuilder_ != null)) { + return bondBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 5) { + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } + } + /** + * .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_ == 5)) { + 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_ = 5; + onChanged();; + return bondBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder> unbondBuilder_; + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + * @return Whether the unbond field is set. + */ + @java.lang.Override + public boolean hasUnbond() { + return payloadCase_ == 6; + } + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + * @return The unbond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond() { + if (unbondBuilder_ == null) { + if (payloadCase_ == 6) { + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } else { + if (payloadCase_ == 6) { + return unbondBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } + } + /** + * .pactus.PayloadUnbond unbond = 6 [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_ = 6; + return this; + } + /** + * .pactus.PayloadUnbond unbond = 6 [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_ = 6; + return this; + } + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + */ + public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbond value) { + if (unbondBuilder_ == null) { + if (payloadCase_ == 6 && + 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_ == 6) { + unbondBuilder_.mergeFrom(value); + } else { + unbondBuilder_.setMessage(value); + } + } + payloadCase_ = 6; + return this; + } + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + */ + public Builder clearUnbond() { + if (unbondBuilder_ == null) { + if (payloadCase_ == 6) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 6) { + payloadCase_ = 0; + payload_ = null; + } + unbondBuilder_.clear(); + } + return this; + } + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + */ + public pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder getUnbondBuilder() { + return getUnbondFieldBuilder().getBuilder(); + } + /** + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() { + if ((payloadCase_ == 6) && (unbondBuilder_ != null)) { + return unbondBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 6) { + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } + } + /** + * .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_ == 6)) { + 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_ = 6; + onChanged();; + return unbondBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder> withdrawBuilder_; + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + * @return Whether the withdraw field is set. + */ + @java.lang.Override + public boolean hasWithdraw() { + return payloadCase_ == 7; + } + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + * @return The withdraw. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw() { + if (withdrawBuilder_ == null) { + if (payloadCase_ == 7) { + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } else { + if (payloadCase_ == 7) { + return withdrawBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } + } + /** + * .pactus.PayloadWithdraw withdraw = 7 [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_ = 7; + return this; + } + /** + * .pactus.PayloadWithdraw withdraw = 7 [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_ = 7; + return this; + } + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + */ + public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.PayloadWithdraw value) { + if (withdrawBuilder_ == null) { + if (payloadCase_ == 7 && + 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_ == 7) { + withdrawBuilder_.mergeFrom(value); + } else { + withdrawBuilder_.setMessage(value); + } + } + payloadCase_ = 7; + return this; + } + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + */ + public Builder clearWithdraw() { + if (withdrawBuilder_ == null) { + if (payloadCase_ == 7) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 7) { + payloadCase_ = 0; + payload_ = null; + } + withdrawBuilder_.clear(); + } + return this; + } + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + */ + public pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder getWithdrawBuilder() { + return getWithdrawFieldBuilder().getBuilder(); + } + /** + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() { + if ((payloadCase_ == 7) && (withdrawBuilder_ != null)) { + return withdrawBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 7) { + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } + } + /** + * .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_ == 7)) { + 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_ = 7; + 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 { @@ -4523,7 +6272,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} @@ -4963,7 +6712,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} @@ -5783,7 +7532,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} @@ -6280,7 +8029,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} @@ -7148,7 +8897,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} @@ -7477,7 +9226,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} @@ -8061,7 +9810,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} @@ -8501,7 +10250,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} @@ -9227,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(); } /** *
    @@ -9246,6 +11015,7 @@ private GetRawTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder
         }
         private GetRawTransactionResponse() {
           rawTransaction_ = "";
    +      id_ = "";
         }
     
         @java.lang.Override
    @@ -9319,6 +11089,52 @@ public java.lang.String getRawTransaction() {
           }
         }
     
    +    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 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() { @@ -9336,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); } @@ -9348,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; @@ -9365,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; } @@ -9378,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; @@ -9512,6 +11338,8 @@ public Builder clear() { super.clear(); rawTransaction_ = ""; + id_ = ""; + return this; } @@ -9539,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; } @@ -9591,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; @@ -9622,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 @@ -9733,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) { @@ -10719,6 +12653,26 @@ public interface PayloadBondOrBuilder extends * @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(); } /** *
    @@ -10739,6 +12693,7 @@ private PayloadBond(com.google.protobuf.GeneratedMessageV3.Builder builder) {
         private PayloadBond() {
           sender_ = "";
           receiver_ = "";
    +      publicKey_ = "";
         }
     
         @java.lang.Override
    @@ -10851,28 +12806,74 @@ public java.lang.String getReceiver() {
             com.google.protobuf.ByteString b = 
                 com.google.protobuf.ByteString.copyFromUtf8(
                     (java.lang.String) ref);
    -        receiver_ = b;
    +        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_; + } + + 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 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() { @@ -10896,6 +12897,9 @@ 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_); + } getUnknownFields().writeTo(output); } @@ -10915,6 +12919,9 @@ 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_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -10936,6 +12943,8 @@ 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 (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10954,6 +12963,8 @@ 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 = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -11092,6 +13103,8 @@ public Builder clear() { stake_ = 0L; + publicKey_ = ""; + return this; } @@ -11121,6 +13134,7 @@ public pactus.transaction.TransactionOuterClass.PayloadBond buildPartial() { result.sender_ = sender_; result.receiver_ = receiver_; result.stake_ = stake_; + result.publicKey_ = publicKey_; onBuilt(); return result; } @@ -11180,6 +13194,10 @@ public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadBond ot if (other.getStake() != 0L) { setStake(other.getStake()); } + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -11221,6 +13239,11 @@ public Builder mergeFrom( break; } // case 24 + case 34: { + publicKey_ = input.readStringRequireUtf8(); + + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -11471,6 +13494,102 @@ public Builder clearStake() { 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; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -12912,43 +15031,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(); /** *
    @@ -12977,8 +15096,8 @@ private PayloadWithdraw(com.google.protobuf.GeneratedMessageV3.Builder builde
           super(builder);
         }
         private PayloadWithdraw() {
    -      from_ = "";
    -      to_ = "";
    +      validatorAddress_ = "";
    +      accountAddress_ = "";
         }
     
         @java.lang.Override
    @@ -13006,92 +15125,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; @@ -13127,11 +15246,11 @@ 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_); @@ -13145,11 +15264,11 @@ 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 @@ -13170,10 +15289,10 @@ 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 (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -13187,10 +15306,10 @@ 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()); @@ -13326,9 +15445,9 @@ private Builder( @java.lang.Override public Builder clear() { super.clear(); - from_ = ""; + validatorAddress_ = ""; - to_ = ""; + accountAddress_ = ""; amount_ = 0L; @@ -13358,8 +15477,8 @@ 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_; onBuilt(); return result; @@ -13409,12 +15528,12 @@ 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) { @@ -13447,12 +15566,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 @@ -13477,22 +15596,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; @@ -13500,20 +15619,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; @@ -13521,74 +15640,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; @@ -13596,20 +15715,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; @@ -13617,54 +15736,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; } @@ -17143,6 +19262,11 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan 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 @@ -17222,74 +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\"\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" + + "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\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\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" + "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, @@ -17331,68 +19468,74 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_BroadcastTransactionResponse_descriptor, new java.lang.String[] { "Id", }); - internal_static_pactus_GetRawTransferTransactionRequest_descriptor = + 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", "Fee", "Transfer", "Bond", "Unbond", "Withdraw", "Payload", }); + 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[] { "LockTime", "Sender", "Receiver", "Amount", "Fee", "Memo", }); internal_static_pactus_GetRawBondTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); 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); + getDescriptor().getMessageTypes().get(9); 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); + 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_GetRawTransactionResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + 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", }); + new java.lang.String[] { "RawTransaction", "Id", }); internal_static_pactus_PayloadTransfer_descriptor = - getDescriptor().getMessageTypes().get(11); + 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(12); + 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", }); internal_static_pactus_PayloadSortition_descriptor = - getDescriptor().getMessageTypes().get(13); + 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(14); + 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(15); + 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", }); internal_static_pactus_TransactionInfo_descriptor = - getDescriptor().getMessageTypes().get(16); + 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_grpc_pb.js b/www/grpc/gen/js/transaction_grpc_pb.js index b77ed0899..8a71f0964 100644 --- a/www/grpc/gen/js/transaction_grpc_pb.js +++ b/www/grpc/gen/js/transaction_grpc_pb.js @@ -59,6 +59,17 @@ 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'); + } + 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'); @@ -167,7 +178,20 @@ broadcastTransaction: { responseSerialize: serialize_pactus_BroadcastTransactionResponse, responseDeserialize: deserialize_pactus_BroadcastTransactionResponse, }, - // GetRawTransferTransaction retrieves raw details of a transfer transaction. + // 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, + }, + // Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. +// Use GetRawTransaction instead. getRawTransferTransaction: { path: '/pactus.Transaction/GetRawTransferTransaction', requestStream: false, @@ -179,7 +203,8 @@ getRawTransferTransaction: { responseSerialize: serialize_pactus_GetRawTransactionResponse, responseDeserialize: deserialize_pactus_GetRawTransactionResponse, }, - // GetRawBondTransaction retrieves raw details of a bond transaction. + // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. +// Use GetRawTransaction instead. getRawBondTransaction: { path: '/pactus.Transaction/GetRawBondTransaction', requestStream: false, @@ -191,7 +216,8 @@ getRawBondTransaction: { responseSerialize: serialize_pactus_GetRawTransactionResponse, responseDeserialize: deserialize_pactus_GetRawTransactionResponse, }, - // GetRawUnbondTransaction retrieves raw details of an unbond transaction. + // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. +// Use GetRawTransaction instead. getRawUnbondTransaction: { path: '/pactus.Transaction/GetRawUnbondTransaction', requestStream: false, @@ -203,7 +229,8 @@ getRawUnbondTransaction: { responseSerialize: serialize_pactus_GetRawTransactionResponse, responseDeserialize: deserialize_pactus_GetRawTransactionResponse, }, - // GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + // 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/js/transaction_pb.js b/www/grpc/gen/js/transaction_pb.js index ed62ad1a9..e1df38aea 100644 --- a/www/grpc/gen/js/transaction_pb.js +++ b/www/grpc/gen/js/transaction_pb.js @@ -26,6 +26,8 @@ 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.PayloadCase', null, global); goog.exportSymbol('proto.pactus.GetRawTransactionResponse', null, global); goog.exportSymbol('proto.pactus.GetRawTransferTransactionRequest', null, global); goog.exportSymbol('proto.pactus.GetRawUnbondTransactionRequest', null, global); @@ -167,6 +169,27 @@ if (goog.DEBUG && !COMPILED) { */ 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 @@ -1380,6 +1403,428 @@ proto.pactus.BroadcastTransactionResponse.prototype.setId = function(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_ = [[4,5,6,7]]; + +/** + * @enum {number} + */ +proto.pactus.GetRawTransactionRequest.PayloadCase = { + PAYLOAD_NOT_SET: 0, + TRANSFER: 4, + BOND: 5, + UNBOND: 6, + WITHDRAW: 7 +}; + +/** + * @return {proto.pactus.GetRawTransactionRequest.PayloadCase} + */ +proto.pactus.GetRawTransactionRequest.prototype.getPayloadCase = function() { + return /** @type {proto.pactus.GetRawTransactionRequest.PayloadCase} */(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, ""), + 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), + withdraw: (f = msg.getWithdraw()) && proto.pactus.PayloadWithdraw.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 = /** @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 5: + var value = new proto.pactus.PayloadBond; + reader.readMessage(value,proto.pactus.PayloadBond.deserializeBinaryFromReader); + msg.setBond(value); + break; + case 6: + var value = new proto.pactus.PayloadUnbond; + reader.readMessage(value,proto.pactus.PayloadUnbond.deserializeBinaryFromReader); + msg.setUnbond(value); + break; + case 7: + var value = new proto.pactus.PayloadWithdraw; + reader.readMessage(value,proto.pactus.PayloadWithdraw.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.getFee(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTransfer(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.pactus.PayloadTransfer.serializeBinaryToWriter + ); + } + f = message.getBond(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.pactus.PayloadBond.serializeBinaryToWriter + ); + } + f = message.getUnbond(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.pactus.PayloadUnbond.serializeBinaryToWriter + ); + } + f = message.getWithdraw(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.pactus.PayloadWithdraw.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 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, 4)); +}; + + +/** + * @param {?proto.pactus.PayloadTransfer|undefined} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this +*/ +proto.pactus.GetRawTransactionRequest.prototype.setTransfer = 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.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, 4) != null; +}; + + +/** + * 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, 5)); +}; + + +/** + * @param {?proto.pactus.PayloadBond|undefined} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this +*/ +proto.pactus.GetRawTransactionRequest.prototype.setBond = 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.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, 5) != null; +}; + + +/** + * 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, 6)); +}; + + +/** + * @param {?proto.pactus.PayloadUnbond|undefined} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this +*/ +proto.pactus.GetRawTransactionRequest.prototype.setUnbond = 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.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, 6) != null; +}; + + +/** + * 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, 7)); +}; + + +/** + * @param {?proto.pactus.PayloadWithdraw|undefined} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this +*/ +proto.pactus.GetRawTransactionRequest.prototype.setWithdraw = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, 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, 7) != null; +}; + + + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2471,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) { @@ -2512,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; @@ -2548,6 +2998,13 @@ proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter = function(messag f ); } + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; @@ -2569,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); +}; + + @@ -2793,7 +3268,8 @@ 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, "") }; if (includeInstance) { @@ -2842,6 +3318,10 @@ 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; default: reader.skipField(); break; @@ -2892,6 +3372,13 @@ proto.pactus.PayloadBond.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } }; @@ -2949,6 +3436,24 @@ 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); +}; + + @@ -3271,8 +3776,8 @@ 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, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + accountAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), amount: jspb.Message.getFieldWithDefault(msg, 3, 0) }; @@ -3312,11 +3817,11 @@ 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()); @@ -3351,14 +3856,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, @@ -3376,10 +3881,10 @@ proto.pactus.PayloadWithdraw.serializeBinaryToWriter = function(message, writer) /** - * 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, "")); }; @@ -3388,16 +3893,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, "")); }; @@ -3406,7 +3911,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); }; diff --git a/www/grpc/gen/python/transaction_pb2.py b/www/grpc/gen/python/transaction_pb2.py index 94d753a18..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\"\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') +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=2355 - _PAYLOADTYPE._serialized_end=2486 - _TRANSACTIONVERBOSITY._serialized_start=2488 - _TRANSACTIONVERBOSITY._serialized_end=2554 + _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 @@ -37,28 +37,30 @@ _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 + _GETRAWTRANSACTIONREQUEST._serialized_start=621 + _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 ac8d9ef60..be86e4f53 100644 --- a/www/grpc/gen/python/transaction_pb2.pyi +++ b/www/grpc/gen/python/transaction_pb2.pyi @@ -75,6 +75,24 @@ class BroadcastTransactionResponse(_message.Message): id: str def __init__(self, id: _Optional[str] = ...) -> None: ... +class GetRawTransactionRequest(_message.Message): + __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] = ..., 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") LOCK_TIME_FIELD_NUMBER: _ClassVar[int] @@ -136,10 +154,12 @@ 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") @@ -152,14 +172,16 @@ class PayloadTransfer(_message.Message): def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ... class PayloadBond(_message.Message): - __slots__ = ("sender", "receiver", "stake") + __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] sender: str receiver: str stake: int - def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ...) -> None: ... + public_key: str + def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ...) -> None: ... class PayloadSortition(_message.Message): __slots__ = ("address", "proof") @@ -176,13 +198,14 @@ 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") + VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int] AMOUNT_FIELD_NUMBER: _ClassVar[int] - to: str + validator_address: str + account_address: str amount: int - def __init__(self, to: _Optional[str] = ..., amount: _Optional[int] = ..., **kwargs) -> 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/python/transaction_pb2_grpc.py b/www/grpc/gen/python/transaction_pb2_grpc.py index a1d6e68ca..053281be3 100644 --- a/www/grpc/gen/python/transaction_pb2_grpc.py +++ b/www/grpc/gen/python/transaction_pb2_grpc.py @@ -31,6 +31,11 @@ def __init__(self, channel): 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, + ) self.GetRawTransferTransaction = channel.unary_unary( '/pactus.Transaction/GetRawTransferTransaction', request_serializer=transaction__pb2.GetRawTransferTransactionRequest.SerializeToString, @@ -81,29 +86,40 @@ def BroadcastTransaction(self, request, context): 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 GetRawTransferTransaction(self, request, context): - """GetRawTransferTransaction retrieves raw details of a transfer transaction. + """Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + Use GetRawTransaction instead. """ 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. + """Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + Use GetRawTransaction instead. """ 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. + """Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + Use GetRawTransaction instead. """ 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. + """Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + Use GetRawTransaction instead. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -127,6 +143,11 @@ def add_TransactionServicer_to_server(servicer, server): 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, + ), 'GetRawTransferTransaction': grpc.unary_unary_rpc_method_handler( servicer.GetRawTransferTransaction, request_deserializer=transaction__pb2.GetRawTransferTransactionRequest.FromString, @@ -210,6 +231,23 @@ def BroadcastTransaction(request, 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) + @staticmethod def GetRawTransferTransaction(request, target, diff --git a/www/grpc/gen/rust/pactus.rs b/www/grpc/gen/rust/pactus.rs index f5f5e27b2..9d08b350b 100644 --- a/www/grpc/gen/rust/pactus.rs +++ b/www/grpc/gen/rust/pactus.rs @@ -65,7 +65,38 @@ pub struct BroadcastTransactionResponse { #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, } -/// Request message for retrieving raw details of a transfer transaction. +/// 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, + /// 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`. +pub mod get_raw_transaction_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Payload { + #[prost(message, tag="4")] + Transfer(super::PayloadTransfer), + #[prost(message, tag="5")] + Bond(super::PayloadBond), + #[prost(message, tag="6")] + Unbond(super::PayloadUnbond), + #[prost(message, tag="7")] + Withdraw(super::PayloadWithdraw), + } +} +/// 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 { @@ -89,7 +120,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 { @@ -116,7 +147,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 { @@ -131,7 +162,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 { @@ -162,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)] @@ -190,6 +224,9 @@ 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, } /// Payload for a sortition transaction. #[allow(clippy::derive_partial_eq_without_eq)] @@ -214,12 +251,12 @@ 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, diff --git a/www/grpc/gen/rust/pactus.serde.rs b/www/grpc/gen/rust/pactus.serde.rs index c6ab16ca7..c3f394ae5 100644 --- a/www/grpc/gen/rust/pactus.serde.rs +++ b/www/grpc/gen/rust/pactus.serde.rs @@ -4586,6 +4586,197 @@ impl<'de> serde::Deserialize<'de> for GetRawBondTransactionRequest { 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.fee != 0 { + len += 1; + } + if self.payload.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 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) => { + struct_ser.serialize_field("transfer", v)?; + } + get_raw_transaction_request::Payload::Bond(v) => { + struct_ser.serialize_field("bond", v)?; + } + get_raw_transaction_request::Payload::Unbond(v) => { + struct_ser.serialize_field("unbond", v)?; + } + get_raw_transaction_request::Payload::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", + "fee", + "transfer", + "bond", + "unbond", + "withdraw", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + LockTime, + Memo, + Fee, + 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), + "fee" => Ok(GeneratedField::Fee), + "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 fee__ = None; + let mut payload__ = 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::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")); + } + payload__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Payload::Transfer) +; + } + GeneratedField::Bond => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("bond")); + } + payload__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Payload::Bond) +; + } + GeneratedField::Unbond => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("unbond")); + } + payload__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Payload::Unbond) +; + } + GeneratedField::Withdraw => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("withdraw")); + } + payload__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Payload::Withdraw) +; + } + } + } + Ok(GetRawTransactionRequest { + lock_time: lock_time__.unwrap_or_default(), + memo: memo__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + payload: payload__, + }) + } + } + deserializer.deserialize_struct("pactus.GetRawTransactionRequest", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for GetRawTransactionResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4597,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() } } @@ -4613,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 @@ -4640,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)), } } @@ -4660,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 => { @@ -4668,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(), }) } } @@ -6791,6 +6999,9 @@ impl serde::Serialize for PayloadBond { if self.stake != 0 { len += 1; } + if !self.public_key.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.PayloadBond", len)?; if !self.sender.is_empty() { struct_ser.serialize_field("sender", &self.sender)?; @@ -6801,6 +7012,9 @@ 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)?; + } struct_ser.end() } } @@ -6814,6 +7028,8 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { "sender", "receiver", "stake", + "public_key", + "publicKey", ]; #[allow(clippy::enum_variant_names)] @@ -6821,6 +7037,7 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { Sender, Receiver, Stake, + PublicKey, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6845,6 +7062,7 @@ 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), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -6867,6 +7085,7 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { let mut sender__ = None; let mut receiver__ = None; let mut stake__ = None; + let mut public_key__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Sender => { @@ -6889,12 +7108,19 @@ 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()?); + } } } Ok(PayloadBond { sender: sender__.unwrap_or_default(), receiver: receiver__.unwrap_or_default(), stake: stake__.unwrap_or_default(), + public_key: public_key__.unwrap_or_default(), }) } } @@ -7320,21 +7546,21 @@ 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; } 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())?; @@ -7349,15 +7575,17 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "from", - "to", + "validator_address", + "validatorAddress", + "account_address", + "accountAddress", "amount", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - From, - To, + ValidatorAddress, + AccountAddress, Amount, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7380,8 +7608,8 @@ 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), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -7402,22 +7630,22 @@ 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; 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() { @@ -7430,8 +7658,8 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { } } 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(), }) } diff --git a/www/grpc/gen/rust/pactus.tonic.rs b/www/grpc/gen/rust/pactus.tonic.rs index cd4fd58fe..a2ce32b96 100644 --- a/www/grpc/gen/rust/pactus.tonic.rs +++ b/www/grpc/gen/rust/pactus.tonic.rs @@ -159,6 +159,31 @@ pub mod transaction_client { .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 + } pub async fn get_raw_transfer_transaction( &mut self, request: impl tonic::IntoRequest, @@ -295,6 +320,13 @@ pub mod transaction_server { tonic::Response, tonic::Status, >; + async fn get_raw_transaction( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; async fn get_raw_transfer_transaction( &self, request: tonic::Request, @@ -541,6 +573,52 @@ pub mod transaction_server { }; 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) + } "/pactus.Transaction/GetRawTransferTransaction" => { #[allow(non_camel_case_types)] struct GetRawTransferTransactionSvc(pub Arc); diff --git a/www/grpc/proto/transaction.proto b/www/grpc/proto/transaction.proto index 370d3954f..db14290b9 100644 --- a/www/grpc/proto/transaction.proto +++ b/www/grpc/proto/transaction.proto @@ -19,19 +19,26 @@ service Transaction { rpc BroadcastTransaction(BroadcastTransactionRequest) returns (BroadcastTransactionResponse); - // GetRawTransferTransaction retrieves raw details of a transfer 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. + // Use GetRawTransaction instead. rpc GetRawTransferTransaction(GetRawTransferTransactionRequest) returns (GetRawTransactionResponse); - // GetRawBondTransaction retrieves raw details of a bond transaction. + // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + // Use GetRawTransaction instead. rpc GetRawBondTransaction(GetRawBondTransactionRequest) returns (GetRawTransactionResponse); - // GetRawUnbondTransaction retrieves raw details of an unbond transaction. + // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + // Use GetRawTransaction instead. rpc GetRawUnbondTransaction(GetRawUnbondTransactionRequest) returns (GetRawTransactionResponse); - // GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + // Use GetRawTransaction instead. rpc GetRawWithdrawTransaction(GetRawWithdrawTransactionRequest) returns (GetRawTransactionResponse); } @@ -84,7 +91,24 @@ message BroadcastTransactionResponse { string id = 1; } -// Request message for retrieving raw details of a transfer transaction. +// 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; + // The fee for the transaction in NanoPAC. + int64 fee = 3; + + oneof payload { + PayloadTransfer transfer = 4; + PayloadBond bond = 5; + PayloadUnbond unbond = 6; + PayloadWithdraw withdraw = 7; + } +} + +// 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. @@ -101,7 +125,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. @@ -120,7 +144,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. @@ -131,7 +155,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. @@ -152,6 +176,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. @@ -172,6 +198,8 @@ message PayloadBond { string receiver = 2; // The stake amount in NanoPAC. int64 stake = 3; + // The public key of the validator. + string public_key = 4; } // Payload for a sortition transaction. @@ -190,10 +218,10 @@ 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; } diff --git a/www/grpc/swagger-ui/pactus.swagger.json b/www/grpc/swagger-ui/pactus.swagger.json index ef57177be..5cb886207 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.", @@ -617,242 +617,106 @@ "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", "format": "int64" }, { - "name": "sender", - "description": "The sender's account address.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "receiver", - "description": "The receiver's validator address.", + "name": "memo", + "description": "A memo string for the transaction.", "in": "query", "required": false, "type": "string" }, { - "name": "stake", - "description": "The stake amount in NanoPAC. Must be greater than 0.", + "name": "fee", + "description": "The fee for the transaction in NanoPAC.", "in": "query", "required": false, "type": "string", "format": "int64" }, { - "name": "publicKey", - "description": "The public key of the validator.", + "name": "transfer.sender", + "description": "The sender's 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.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "memo", - "description": "A memo string for the transaction.", + "name": "transfer.receiver", + "description": "The receiver's address.", "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.amount", + "description": "The amount to be transferred in NanoPAC.", "in": "query", "required": false, - "type": "integer", + "type": "string", "format": "int64" }, { - "name": "sender", - "description": "The sender's account address.", + "name": "bond.sender", + "description": "The sender's address.", "in": "query", "required": false, "type": "string" }, { - "name": "receiver", - "description": "The receiver's account address.", + "name": "bond.receiver", + "description": "The receiver's 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.", "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.", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" }, { - "name": "validatorAddress", + "name": "unbond.validator", "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", - "description": "The withdrawal amount in NanoPAC. Must be greater than 0.", + "name": "withdraw.amount", + "description": "The withdrawal amount in NanoPAC.", "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": [ @@ -1798,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." @@ -1937,6 +1805,10 @@ "type": "string", "format": "int64", "description": "The stake amount in NanoPAC." + }, + "publicKey": { + "type": "string", + "description": "The public key of the validator." } }, "description": "Payload for a bond transaction." @@ -2000,13 +1872,13 @@ "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", diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index d1aeef2e6..80b4879ca 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.Error(codes.Internal, err.Error()) + return nil, status.Errorf(codes.Internal, "%s", err.Error()) } res.Transaction = transactionToProto(trx) } @@ -104,6 +104,47 @@ func (s *transactionServer) CalculateFee(_ context.Context, }, nil } +func (s *transactionServer) GetRawTransaction(_ context.Context, + req *pactus.GetRawTransactionRequest, +) (*pactus.GetRawTransactionResponse, error) { + lockTime := s.getLockTime(req.LockTime) + + var trx *tx.Tx + var err error + switch pld := req.Payload.(type) { + case *pactus.GetRawTransactionRequest_Transfer: + trx, err = s.handleRawTransfer(lockTime, req.Memo, req.Fee, pld.Transfer) + + case *pactus.GetRawTransactionRequest_Bond: + trx, err = s.handleRawBond(lockTime, req.Memo, req.Fee, pld.Bond) + + case *pactus.GetRawTransactionRequest_Unbond: + trx, err = s.handleRawUnbond(lockTime, req.Memo, pld.Unbond) + + case *pactus.GetRawTransactionRequest_Withdraw: + trx, err = s.handleRawWithdraw(lockTime, req.Memo, req.Fee, pld.Withdraw) + + default: + return nil, status.Errorf(codes.InvalidArgument, "invalid transaction type") + } + + if err != nil { + return nil, status.Errorf(codes.Internal, "%s", err.Error()) + } + + data, err := trx.Bytes() + if err != nil { + return nil, status.Errorf(codes.Internal, "%s", err.Error()) + } + + return &pactus.GetRawTransactionResponse{ + RawTransaction: hex.EncodeToString(data), + Id: trx.ID().String(), + }, err +} + +// Deprecated: GetRawTransferTransaction is deprecated. +// Use GetRawTransaction API instead. func (s *transactionServer) GetRawTransferTransaction(_ context.Context, req *pactus.GetRawTransferTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -132,6 +173,8 @@ func (s *transactionServer) GetRawTransferTransaction(_ context.Context, }, nil } +// Deprecated: GetRawBondTransaction is deprecated. +// Use GetRawTransaction API instead. func (s *transactionServer) GetRawBondTransaction(_ context.Context, req *pactus.GetRawBondTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -170,6 +213,8 @@ func (s *transactionServer) GetRawBondTransaction(_ context.Context, }, nil } +// Deprecated: GetRawUnbondTransaction is deprecated. +// Use GetRawTransaction API instead. func (s *transactionServer) GetRawUnbondTransaction(_ context.Context, req *pactus.GetRawUnbondTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -191,6 +236,8 @@ func (s *transactionServer) GetRawUnbondTransaction(_ context.Context, }, nil } +// Deprecated: GetRawWithdrawTransaction is deprecated. +// Use GetRawTransaction API instead. func (s *transactionServer) GetRawWithdrawTransaction(_ context.Context, req *pactus.GetRawWithdrawTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -219,6 +266,90 @@ func (s *transactionServer) GetRawWithdrawTransaction(_ context.Context, }, nil } +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(pld.Receiver) + if err != nil { + return nil, err + } + + amt := amount.Amount(pld.Amount) + fee := s.getFee(feeInt, amt) + + transferTx := tx.NewTransferTx(lockTime, sender, receiver, amt, fee, tx.WithMemo(memo)) + + return transferTx, nil +} + +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(pld.Receiver) + if err != nil { + return nil, err + } + + var publicKey *bls.PublicKey + if pld.PublicKey != "" { + publicKey, err = bls.PublicKeyFromString(pld.PublicKey) + if err != nil { + return nil, err + } + } else { + publicKey = nil + } + + amt := amount.Amount(pld.Stake) + fee := s.getFee(feeInt, amt) + + bondTx := tx.NewBondTx(lockTime, sender, receiver, publicKey, amt, fee, tx.WithMemo(memo)) + + return bondTx, nil +} + +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, nil +} + +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(pld.AccountAddress) + if err != nil { + return nil, err + } + + amt := amount.Amount(pld.Amount) + fee := s.getFee(feeInt, amt) + + withdrawTx := tx.NewWithdrawTx(lockTime, validatorAddr, accountAddr, amt, fee, tx.WithMemo(memo)) + + return withdrawTx, nil +} + func (s *transactionServer) getFee(f int64, amt amount.Amount) amount.Amount { fee := amount.Amount(f) if fee == 0 { @@ -293,9 +424,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 7cf827f35..f756a5435 100644 --- a/www/grpc/transaction_test.go +++ b/www/grpc/transaction_test.go @@ -130,12 +130,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{ + Payload: &pactus.GetRawTransactionRequest_Transfer{ + Transfer: &pactus.PayloadTransfer{ + Sender: td.RandAccAddress().String(), + Receiver: td.RandAccAddress().String(), + Amount: amt.ToNanoPAC(), + }, + }, + Memo: td.RandString(32), }) assert.NoError(t, err) assert.NotEmpty(t, res.RawTransaction) @@ -154,13 +158,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{ + Payload: &pactus.GetRawTransactionRequest_Bond{ + Bond: &pactus.PayloadBond{ + 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) @@ -176,10 +184,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{ + Payload: &pactus.GetRawTransactionRequest_Unbond{ + Unbond: &pactus.PayloadUnbond{ + Validator: td.RandValAddress().String(), + }, + }, + Memo: td.RandString(32), }) assert.NoError(t, err) assert.NotEmpty(t, res.RawTransaction) @@ -195,12 +207,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{ + Payload: &pactus.GetRawTransactionRequest_Withdraw{ + Withdraw: &pactus.PayloadWithdraw{ + ValidatorAddress: td.RandValAddress().String(), + AccountAddress: td.RandAccAddress().String(), + Amount: amt.ToNanoPAC(), + }, + }, + Memo: td.RandString(32), }) assert.NoError(t, err) 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: