Skip to content

Commit

Permalink
fix: change request
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigBalthazar committed Jul 11, 2024
1 parent 8ae5f1e commit a5486cb
Show file tree
Hide file tree
Showing 29 changed files with 1,188 additions and 1,147 deletions.
8 changes: 4 additions & 4 deletions www/grpc/buf/grpc-gateway.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ http:
get: "/pactus/wallet/sign_message"

# Util APIs
- selector: pactus.Util.SignMessageWithPrivateKey
get: "/pactus/Util/Sign_Message_With_PrivateKey"
- selector: pactus.Utils.SignMessageWithPrivateKey
get: "/pactus/Utils/Sign_Message_With_PrivateKey"

- selector: pactus.Util.VerifyMessage
get: "/pactus/Util/VerifyMessage"
- selector: pactus.Utils.VerifyMessage
get: "/pactus/Utils/VerifyMessage"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///
// Generated code. Do not modify.
// source: util.proto
// source: utils.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name
Expand Down Expand Up @@ -240,17 +240,17 @@ class VerifyMessageResponse extends $pb.GeneratedMessage {
void clearIsValid() => clearField(1);
}

class UtilApi {
class UtilsApi {
$pb.RpcClient _client;
UtilApi(this._client);
UtilsApi(this._client);

$async.Future<SignMessageWithPrivateKeyResponse> signMessageWithPrivateKey($pb.ClientContext? ctx, SignMessageWithPrivateKeyRequest request) {
var emptyResponse = SignMessageWithPrivateKeyResponse();
return _client.invoke<SignMessageWithPrivateKeyResponse>(ctx, 'Util', 'SignMessageWithPrivateKey', request, emptyResponse);
return _client.invoke<SignMessageWithPrivateKeyResponse>(ctx, 'Utils', 'SignMessageWithPrivateKey', request, emptyResponse);
}
$async.Future<VerifyMessageResponse> verifyMessage($pb.ClientContext? ctx, VerifyMessageRequest request) {
var emptyResponse = VerifyMessageResponse();
return _client.invoke<VerifyMessageResponse>(ctx, 'Util', 'VerifyMessage', request, emptyResponse);
return _client.invoke<VerifyMessageResponse>(ctx, 'Utils', 'VerifyMessage', request, emptyResponse);
}
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///
// Generated code. Do not modify.
// source: util.proto
// source: utils.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///
// Generated code. Do not modify.
// source: util.proto
// source: utils.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name
Expand Down Expand Up @@ -51,21 +51,21 @@ const VerifyMessageResponse$json = const {

/// Descriptor for `VerifyMessageResponse`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List verifyMessageResponseDescriptor = $convert.base64Decode('ChVWZXJpZnlNZXNzYWdlUmVzcG9uc2USGQoIaXNfdmFsaWQYASABKAhSB2lzVmFsaWQ=');
const $core.Map<$core.String, $core.dynamic> UtilServiceBase$json = const {
'1': 'Util',
const $core.Map<$core.String, $core.dynamic> UtilsServiceBase$json = const {
'1': 'Utils',
'2': const [
const {'1': 'SignMessageWithPrivateKey', '2': '.pactus.SignMessageWithPrivateKeyRequest', '3': '.pactus.SignMessageWithPrivateKeyResponse'},
const {'1': 'VerifyMessage', '2': '.pactus.VerifyMessageRequest', '3': '.pactus.VerifyMessageResponse'},
],
};

@$core.Deprecated('Use utilServiceDescriptor instead')
const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> UtilServiceBase$messageJson = const {
@$core.Deprecated('Use utilsServiceDescriptor instead')
const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> UtilsServiceBase$messageJson = const {
'.pactus.SignMessageWithPrivateKeyRequest': SignMessageWithPrivateKeyRequest$json,
'.pactus.SignMessageWithPrivateKeyResponse': SignMessageWithPrivateKeyResponse$json,
'.pactus.VerifyMessageRequest': VerifyMessageRequest$json,
'.pactus.VerifyMessageResponse': VerifyMessageResponse$json,
};

/// Descriptor for `Util`. Decode as a `google.protobuf.ServiceDescriptorProto`.
final $typed_data.Uint8List utilServiceDescriptor = $convert.base64Decode('CgRVdGlsEnAKGVNpZ25NZXNzYWdlV2l0aFByaXZhdGVLZXkSKC5wYWN0dXMuU2lnbk1lc3NhZ2VXaXRoUHJpdmF0ZUtleVJlcXVlc3QaKS5wYWN0dXMuU2lnbk1lc3NhZ2VXaXRoUHJpdmF0ZUtleVJlc3BvbnNlEkwKDVZlcmlmeU1lc3NhZ2USHC5wYWN0dXMuVmVyaWZ5TWVzc2FnZVJlcXVlc3QaHS5wYWN0dXMuVmVyaWZ5TWVzc2FnZVJlc3BvbnNl');
/// Descriptor for `Utils`. Decode as a `google.protobuf.ServiceDescriptorProto`.
final $typed_data.Uint8List utilsServiceDescriptor = $convert.base64Decode('CgVVdGlscxJwChlTaWduTWVzc2FnZVdpdGhQcml2YXRlS2V5EigucGFjdHVzLlNpZ25NZXNzYWdlV2l0aFByaXZhdGVLZXlSZXF1ZXN0GikucGFjdHVzLlNpZ25NZXNzYWdlV2l0aFByaXZhdGVLZXlSZXNwb25zZRJMCg1WZXJpZnlNZXNzYWdlEhwucGFjdHVzLlZlcmlmeU1lc3NhZ2VSZXF1ZXN0Gh0ucGFjdHVzLlZlcmlmeU1lc3NhZ2VSZXNwb25zZQ==');
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///
// Generated code. Do not modify.
// source: util.proto
// source: utils.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name
Expand All @@ -10,12 +10,12 @@ import 'dart:async' as $async;
import 'package:protobuf/protobuf.dart' as $pb;

import 'dart:core' as $core;
import 'util.pb.dart' as $3;
import 'util.pbjson.dart';
import 'utils.pb.dart' as $3;
import 'utils.pbjson.dart';

export 'util.pb.dart';
export 'utils.pb.dart';

abstract class UtilServiceBase extends $pb.GeneratedService {
abstract class UtilsServiceBase extends $pb.GeneratedService {
$async.Future<$3.SignMessageWithPrivateKeyResponse> signMessageWithPrivateKey($pb.ServerContext ctx, $3.SignMessageWithPrivateKeyRequest request);
$async.Future<$3.VerifyMessageResponse> verifyMessage($pb.ServerContext ctx, $3.VerifyMessageRequest request);

Expand All @@ -35,7 +35,7 @@ abstract class UtilServiceBase extends $pb.GeneratedService {
}
}

$core.Map<$core.String, $core.dynamic> get $json => UtilServiceBase$json;
$core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => UtilServiceBase$messageJson;
$core.Map<$core.String, $core.dynamic> get $json => UtilsServiceBase$json;
$core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => UtilsServiceBase$messageJson;
}

28 changes: 14 additions & 14 deletions www/grpc/gen/docs/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ Each PAC is equivalent to 1,000,000,000 or 10<sup>9</sup> NanoPACs.
</li>
</ul>
</li>
<li> Util Service
<li> Utils Service
<ul>
<li>
<a href="#pactus.Util.SignMessageWithPrivateKey">
<a href="#pactus.Utils.SignMessageWithPrivateKey">
<span class="rpc-badge"></span> SignMessageWithPrivateKey</a>
</li>
<li>
<a href="#pactus.Util.VerifyMessage">
<a href="#pactus.Utils.VerifyMessage">
<span class="rpc-badge"></span> VerifyMessage</a>
</li>
</ul>
Expand Down Expand Up @@ -2427,14 +2427,14 @@ Message has no fields.
</tbody>
</table>

## Util Service
## Utils Service

<p>Util service defines various RPC methods for interacting with
Utils.</p>

### SignMessageWithPrivateKey <span id="pactus.Util.SignMessageWithPrivateKey" class="rpc-badge"></span>
### SignMessageWithPrivateKey <span id="pactus.Utils.SignMessageWithPrivateKey" class="rpc-badge"></span>

<p>SignMessageWithPrivateKey</p>
<p>SignMessageWithPrivateKey sign message with provided private key</p>

<h4>SignMessageWithPrivateKeyRequest <span class="badge text-bg-info fs-6 align-top">Request</span></h4>

Expand All @@ -2447,14 +2447,14 @@ Utils.</p>
<td class="fw-bold">message</td>
<td> string</td>
<td>
The unique ID of the transaction to retrieve.
The message to sign.
</td>
</tr>
<tr>
<td class="fw-bold">private_key</td>
<td> string</td>
<td>
The verbosity level for transaction details.
The private key to sign message.
</td>
</tr>
</tbody>
Expand All @@ -2470,15 +2470,15 @@ Utils.</p>
<td class="fw-bold">signature</td>
<td> string</td>
<td>

The signature of message.
</td>
</tr>
</tbody>
</table>

### VerifyMessage <span id="pactus.Util.VerifyMessage" class="rpc-badge"></span>
### VerifyMessage <span id="pactus.Utils.VerifyMessage" class="rpc-badge"></span>

<p>VerifyMessage</p>
<p>VerifyMessage verify signature with public key and message</p>

<h4>VerifyMessageRequest <span class="badge text-bg-info fs-6 align-top">Request</span></h4>

Expand All @@ -2491,21 +2491,21 @@ Utils.</p>
<td class="fw-bold">message</td>
<td> string</td>
<td>
The unique ID of the transaction to retrieve.
The signed message.
</td>
</tr>
<tr>
<td class="fw-bold">signature</td>
<td> string</td>
<td>
The verbosity level for transaction details.
The signature of message.
</td>
</tr>
<tr>
<td class="fw-bold">public_key</td>
<td> string</td>
<td>
The verbosity level for transaction details.
The message signer public key.
</td>
</tr>
</tbody>
Expand Down
32 changes: 16 additions & 16 deletions www/grpc/gen/docs/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ Each PAC is equivalent to 1,000,000,000 or 10<sup>9</sup> NanoPACs.
</li>
</ul>
</li>
<li> Util Service
<li> Utils Service
<ul>
<li>
<a href="#pactus.util.sign_message_with_private_key">
<span class="rpc-badge"></span> pactus.util.sign_message_with_private_key</a>
<a href="#pactus.utils.sign_message_with_private_key">
<span class="rpc-badge"></span> pactus.utils.sign_message_with_private_key</a>
</li>
<li>
<a href="#pactus.util.verify_message">
<span class="rpc-badge"></span> pactus.util.verify_message</a>
<a href="#pactus.utils.verify_message">
<span class="rpc-badge"></span> pactus.utils.verify_message</a>
</li>
</ul>
</li>
Expand Down Expand Up @@ -2428,14 +2428,14 @@ Parameters has no fields.
</tbody>
</table>

## Util Service
## Utils Service

<p>Util service defines various RPC methods for interacting with
Utils.</p>

### pactus.util.sign_message_with_private_key <span id="pactus.util.sign_message_with_private_key" class="rpc-badge"></span>
### pactus.utils.sign_message_with_private_key <span id="pactus.utils.sign_message_with_private_key" class="rpc-badge"></span>

<p>SignMessageWithPrivateKey</p>
<p>SignMessageWithPrivateKey sign message with provided private key</p>

<h4>Parameters</h4>

Expand All @@ -2448,14 +2448,14 @@ Utils.</p>
<td class="fw-bold">message</td>
<td> string</td>
<td>
The unique ID of the transaction to retrieve.
The message to sign.
</td>
</tr>
<tr>
<td class="fw-bold">private_key</td>
<td> string</td>
<td>
The verbosity level for transaction details.
The private key to sign message.
</td>
</tr>
</tbody>
Expand All @@ -2471,15 +2471,15 @@ Utils.</p>
<td class="fw-bold">signature</td>
<td> string</td>
<td>

The signature of message.
</td>
</tr>
</tbody>
</table>

### pactus.util.verify_message <span id="pactus.util.verify_message" class="rpc-badge"></span>
### pactus.utils.verify_message <span id="pactus.utils.verify_message" class="rpc-badge"></span>

<p>VerifyMessage</p>
<p>VerifyMessage verify signature with public key and message</p>

<h4>Parameters</h4>

Expand All @@ -2492,21 +2492,21 @@ Utils.</p>
<td class="fw-bold">message</td>
<td> string</td>
<td>
The unique ID of the transaction to retrieve.
The signed message.
</td>
</tr>
<tr>
<td class="fw-bold">signature</td>
<td> string</td>
<td>
The verbosity level for transaction details.
The signature of message.
</td>
</tr>
<tr>
<td class="fw-bold">public_key</td>
<td> string</td>
<td>
The verbosity level for transaction details.
The message signer public key.
</td>
</tr>
</tbody>
Expand Down
Loading

0 comments on commit a5486cb

Please sign in to comment.