pactus-grpc 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,149 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('grpc');
5
+ var utils_pb = require('./utils_pb.js');
6
+
7
+ function serialize_pactus_BLSPublicKeyAggregationRequest(arg) {
8
+ if (!(arg instanceof utils_pb.BLSPublicKeyAggregationRequest)) {
9
+ throw new Error('Expected argument of type pactus.BLSPublicKeyAggregationRequest');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_pactus_BLSPublicKeyAggregationRequest(buffer_arg) {
15
+ return utils_pb.BLSPublicKeyAggregationRequest.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
18
+ function serialize_pactus_BLSPublicKeyAggregationResponse(arg) {
19
+ if (!(arg instanceof utils_pb.BLSPublicKeyAggregationResponse)) {
20
+ throw new Error('Expected argument of type pactus.BLSPublicKeyAggregationResponse');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_pactus_BLSPublicKeyAggregationResponse(buffer_arg) {
26
+ return utils_pb.BLSPublicKeyAggregationResponse.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
29
+ function serialize_pactus_BLSSignatureAggregationRequest(arg) {
30
+ if (!(arg instanceof utils_pb.BLSSignatureAggregationRequest)) {
31
+ throw new Error('Expected argument of type pactus.BLSSignatureAggregationRequest');
32
+ }
33
+ return Buffer.from(arg.serializeBinary());
34
+ }
35
+
36
+ function deserialize_pactus_BLSSignatureAggregationRequest(buffer_arg) {
37
+ return utils_pb.BLSSignatureAggregationRequest.deserializeBinary(new Uint8Array(buffer_arg));
38
+ }
39
+
40
+ function serialize_pactus_BLSSignatureAggregationResponse(arg) {
41
+ if (!(arg instanceof utils_pb.BLSSignatureAggregationResponse)) {
42
+ throw new Error('Expected argument of type pactus.BLSSignatureAggregationResponse');
43
+ }
44
+ return Buffer.from(arg.serializeBinary());
45
+ }
46
+
47
+ function deserialize_pactus_BLSSignatureAggregationResponse(buffer_arg) {
48
+ return utils_pb.BLSSignatureAggregationResponse.deserializeBinary(new Uint8Array(buffer_arg));
49
+ }
50
+
51
+ function serialize_pactus_SignMessageWithPrivateKeyRequest(arg) {
52
+ if (!(arg instanceof utils_pb.SignMessageWithPrivateKeyRequest)) {
53
+ throw new Error('Expected argument of type pactus.SignMessageWithPrivateKeyRequest');
54
+ }
55
+ return Buffer.from(arg.serializeBinary());
56
+ }
57
+
58
+ function deserialize_pactus_SignMessageWithPrivateKeyRequest(buffer_arg) {
59
+ return utils_pb.SignMessageWithPrivateKeyRequest.deserializeBinary(new Uint8Array(buffer_arg));
60
+ }
61
+
62
+ function serialize_pactus_SignMessageWithPrivateKeyResponse(arg) {
63
+ if (!(arg instanceof utils_pb.SignMessageWithPrivateKeyResponse)) {
64
+ throw new Error('Expected argument of type pactus.SignMessageWithPrivateKeyResponse');
65
+ }
66
+ return Buffer.from(arg.serializeBinary());
67
+ }
68
+
69
+ function deserialize_pactus_SignMessageWithPrivateKeyResponse(buffer_arg) {
70
+ return utils_pb.SignMessageWithPrivateKeyResponse.deserializeBinary(new Uint8Array(buffer_arg));
71
+ }
72
+
73
+ function serialize_pactus_VerifyMessageRequest(arg) {
74
+ if (!(arg instanceof utils_pb.VerifyMessageRequest)) {
75
+ throw new Error('Expected argument of type pactus.VerifyMessageRequest');
76
+ }
77
+ return Buffer.from(arg.serializeBinary());
78
+ }
79
+
80
+ function deserialize_pactus_VerifyMessageRequest(buffer_arg) {
81
+ return utils_pb.VerifyMessageRequest.deserializeBinary(new Uint8Array(buffer_arg));
82
+ }
83
+
84
+ function serialize_pactus_VerifyMessageResponse(arg) {
85
+ if (!(arg instanceof utils_pb.VerifyMessageResponse)) {
86
+ throw new Error('Expected argument of type pactus.VerifyMessageResponse');
87
+ }
88
+ return Buffer.from(arg.serializeBinary());
89
+ }
90
+
91
+ function deserialize_pactus_VerifyMessageResponse(buffer_arg) {
92
+ return utils_pb.VerifyMessageResponse.deserializeBinary(new Uint8Array(buffer_arg));
93
+ }
94
+
95
+
96
+ // Utils service defines RPC methods for utility functions such as message
97
+ // signing and verification.
98
+ var UtilsService = exports.UtilsService = {
99
+ // SignMessageWithPrivateKey signs message with provided private key.
100
+ signMessageWithPrivateKey: {
101
+ path: '/pactus.Utils/SignMessageWithPrivateKey',
102
+ requestStream: false,
103
+ responseStream: false,
104
+ requestType: utils_pb.SignMessageWithPrivateKeyRequest,
105
+ responseType: utils_pb.SignMessageWithPrivateKeyResponse,
106
+ requestSerialize: serialize_pactus_SignMessageWithPrivateKeyRequest,
107
+ requestDeserialize: deserialize_pactus_SignMessageWithPrivateKeyRequest,
108
+ responseSerialize: serialize_pactus_SignMessageWithPrivateKeyResponse,
109
+ responseDeserialize: deserialize_pactus_SignMessageWithPrivateKeyResponse,
110
+ },
111
+ // VerifyMessage verifies signature with public key and message.
112
+ verifyMessage: {
113
+ path: '/pactus.Utils/VerifyMessage',
114
+ requestStream: false,
115
+ responseStream: false,
116
+ requestType: utils_pb.VerifyMessageRequest,
117
+ responseType: utils_pb.VerifyMessageResponse,
118
+ requestSerialize: serialize_pactus_VerifyMessageRequest,
119
+ requestDeserialize: deserialize_pactus_VerifyMessageRequest,
120
+ responseSerialize: serialize_pactus_VerifyMessageResponse,
121
+ responseDeserialize: deserialize_pactus_VerifyMessageResponse,
122
+ },
123
+ // BLSPublicKeyAggregation aggregates bls public keys.
124
+ bLSPublicKeyAggregation: {
125
+ path: '/pactus.Utils/BLSPublicKeyAggregation',
126
+ requestStream: false,
127
+ responseStream: false,
128
+ requestType: utils_pb.BLSPublicKeyAggregationRequest,
129
+ responseType: utils_pb.BLSPublicKeyAggregationResponse,
130
+ requestSerialize: serialize_pactus_BLSPublicKeyAggregationRequest,
131
+ requestDeserialize: deserialize_pactus_BLSPublicKeyAggregationRequest,
132
+ responseSerialize: serialize_pactus_BLSPublicKeyAggregationResponse,
133
+ responseDeserialize: deserialize_pactus_BLSPublicKeyAggregationResponse,
134
+ },
135
+ // BLSSignatureAggregation aggregates bls signatures.
136
+ bLSSignatureAggregation: {
137
+ path: '/pactus.Utils/BLSSignatureAggregation',
138
+ requestStream: false,
139
+ responseStream: false,
140
+ requestType: utils_pb.BLSSignatureAggregationRequest,
141
+ responseType: utils_pb.BLSSignatureAggregationResponse,
142
+ requestSerialize: serialize_pactus_BLSSignatureAggregationRequest,
143
+ requestDeserialize: deserialize_pactus_BLSSignatureAggregationRequest,
144
+ responseSerialize: serialize_pactus_BLSSignatureAggregationResponse,
145
+ responseDeserialize: deserialize_pactus_BLSSignatureAggregationResponse,
146
+ },
147
+ };
148
+
149
+ exports.UtilsClient = grpc.makeGenericClientConstructor(UtilsService);