protobuf-platform 1.2.413 → 1.2.415

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.
@@ -4,6 +4,11 @@ package crypto;
4
4
 
5
5
  service Crypto {
6
6
  rpc checkConnection(PingRequest) returns (PongResponse);
7
+ rpc readListNetworks(ReadListNetworksRequest) returns (ReadListNetworksResponse);
8
+ rpc readListAssets(ReadListAssetsRequest) returns (ReadListAssetsResponse);
9
+ rpc getDepositAddress(GetDepositAddressRequest) returns (GetDepositAddressResponse);
10
+ rpc createWithdrawalTransfer(CreateWithdrawalTransferRequest) returns (CreateWithdrawalTransferResponse);
11
+ rpc readWithdrawalTransfer(ReadWithdrawalTransferRequest) returns (ReadWithdrawalTransferResponse);
7
12
  }
8
13
 
9
14
  message PingRequest {
@@ -13,3 +18,111 @@ message PingRequest {
13
18
  message PongResponse {
14
19
  string pong = 1;
15
20
  }
21
+
22
+ message ReadListNetworksRequest {
23
+ optional bool only_active = 1;
24
+ }
25
+
26
+ message CryptoNetworkItem {
27
+ uint64 id = 1;
28
+ string code = 2;
29
+ string chain_type = 3;
30
+ string display_name = 4;
31
+ string environment = 5;
32
+ bool is_active = 6;
33
+ bool is_testnet = 7;
34
+ string native_asset_code = 8;
35
+ string explorer_url = 9;
36
+ }
37
+
38
+ message ReadListNetworksResponse {
39
+ repeated CryptoNetworkItem items = 1;
40
+ }
41
+
42
+ message ReadListAssetsRequest {
43
+ optional string network_code = 1;
44
+ optional bool only_active = 2;
45
+ optional bool deposit_enabled = 3;
46
+ optional bool withdrawal_enabled = 4;
47
+ }
48
+
49
+ message CryptoAssetItem {
50
+ uint64 id = 1;
51
+ uint64 network_id = 2;
52
+ string network_code = 3;
53
+ string asset_code = 4;
54
+ string asset_type = 5;
55
+ string display_name = 6;
56
+ string symbol = 7;
57
+ uint32 decimals = 8;
58
+ string contract_address = 9;
59
+ string token_standard = 10;
60
+ bool is_native = 11;
61
+ bool is_active = 12;
62
+ bool deposit_enabled = 13;
63
+ bool withdrawal_enabled = 14;
64
+ }
65
+
66
+ message ReadListAssetsResponse {
67
+ repeated CryptoAssetItem items = 1;
68
+ }
69
+
70
+ message GetDepositAddressRequest {
71
+ uint64 user_id = 1;
72
+ string network_code = 2;
73
+ string asset_code = 3;
74
+ }
75
+
76
+ message GetDepositAddressResponse {
77
+ string address = 1;
78
+ string public_key = 2;
79
+ string network_code = 3;
80
+ string asset_code = 4;
81
+ string chain_type = 5;
82
+ string token_standard = 6;
83
+ string contract_address = 7;
84
+ }
85
+
86
+ message CreateWithdrawalTransferRequest {
87
+ string idempotency_key = 1;
88
+ string payment_operation_id = 2;
89
+ string withdrawal_operation_id = 3;
90
+ uint64 user_id = 4;
91
+ string network_code = 5;
92
+ string asset_code = 6;
93
+ string destination_address = 7;
94
+ string amount_raw = 8;
95
+ string amount_decimal = 9;
96
+ string fee_asset_code = 10;
97
+ string fee_amount_raw = 11;
98
+ string fee_amount_decimal = 12;
99
+ }
100
+
101
+ message CreateWithdrawalTransferResponse {
102
+ string idempotency_key = 1;
103
+ string withdrawal_operation_id = 2;
104
+ string status = 3;
105
+ string tx_signature = 4;
106
+ string network_code = 5;
107
+ string asset_code = 6;
108
+ }
109
+
110
+ message ReadWithdrawalTransferRequest {
111
+ uint64 user_id = 1;
112
+ string idempotency_key = 2;
113
+ string withdrawal_operation_id = 3;
114
+ }
115
+
116
+ message ReadWithdrawalTransferResponse {
117
+ string idempotency_key = 1;
118
+ string withdrawal_operation_id = 2;
119
+ string status = 3;
120
+ string tx_signature = 4;
121
+ string network_code = 5;
122
+ string asset_code = 6;
123
+ string destination_address = 7;
124
+ string amount_raw = 8;
125
+ string amount_decimal = 9;
126
+ string error_code = 10;
127
+ string error_message = 11;
128
+ }
@@ -4,6 +4,50 @@
4
4
  var grpc = require('@grpc/grpc-js');
5
5
  var crypto_pb = require('./crypto_pb.js');
6
6
 
7
+ function serialize_crypto_CreateWithdrawalTransferRequest(arg) {
8
+ if (!(arg instanceof crypto_pb.CreateWithdrawalTransferRequest)) {
9
+ throw new Error('Expected argument of type crypto.CreateWithdrawalTransferRequest');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_crypto_CreateWithdrawalTransferRequest(buffer_arg) {
15
+ return crypto_pb.CreateWithdrawalTransferRequest.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
18
+ function serialize_crypto_CreateWithdrawalTransferResponse(arg) {
19
+ if (!(arg instanceof crypto_pb.CreateWithdrawalTransferResponse)) {
20
+ throw new Error('Expected argument of type crypto.CreateWithdrawalTransferResponse');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_crypto_CreateWithdrawalTransferResponse(buffer_arg) {
26
+ return crypto_pb.CreateWithdrawalTransferResponse.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
29
+ function serialize_crypto_GetDepositAddressRequest(arg) {
30
+ if (!(arg instanceof crypto_pb.GetDepositAddressRequest)) {
31
+ throw new Error('Expected argument of type crypto.GetDepositAddressRequest');
32
+ }
33
+ return Buffer.from(arg.serializeBinary());
34
+ }
35
+
36
+ function deserialize_crypto_GetDepositAddressRequest(buffer_arg) {
37
+ return crypto_pb.GetDepositAddressRequest.deserializeBinary(new Uint8Array(buffer_arg));
38
+ }
39
+
40
+ function serialize_crypto_GetDepositAddressResponse(arg) {
41
+ if (!(arg instanceof crypto_pb.GetDepositAddressResponse)) {
42
+ throw new Error('Expected argument of type crypto.GetDepositAddressResponse');
43
+ }
44
+ return Buffer.from(arg.serializeBinary());
45
+ }
46
+
47
+ function deserialize_crypto_GetDepositAddressResponse(buffer_arg) {
48
+ return crypto_pb.GetDepositAddressResponse.deserializeBinary(new Uint8Array(buffer_arg));
49
+ }
50
+
7
51
  function serialize_crypto_PingRequest(arg) {
8
52
  if (!(arg instanceof crypto_pb.PingRequest)) {
9
53
  throw new Error('Expected argument of type crypto.PingRequest');
@@ -26,6 +70,72 @@ function deserialize_crypto_PongResponse(buffer_arg) {
26
70
  return crypto_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
27
71
  }
28
72
 
73
+ function serialize_crypto_ReadListAssetsRequest(arg) {
74
+ if (!(arg instanceof crypto_pb.ReadListAssetsRequest)) {
75
+ throw new Error('Expected argument of type crypto.ReadListAssetsRequest');
76
+ }
77
+ return Buffer.from(arg.serializeBinary());
78
+ }
79
+
80
+ function deserialize_crypto_ReadListAssetsRequest(buffer_arg) {
81
+ return crypto_pb.ReadListAssetsRequest.deserializeBinary(new Uint8Array(buffer_arg));
82
+ }
83
+
84
+ function serialize_crypto_ReadListAssetsResponse(arg) {
85
+ if (!(arg instanceof crypto_pb.ReadListAssetsResponse)) {
86
+ throw new Error('Expected argument of type crypto.ReadListAssetsResponse');
87
+ }
88
+ return Buffer.from(arg.serializeBinary());
89
+ }
90
+
91
+ function deserialize_crypto_ReadListAssetsResponse(buffer_arg) {
92
+ return crypto_pb.ReadListAssetsResponse.deserializeBinary(new Uint8Array(buffer_arg));
93
+ }
94
+
95
+ function serialize_crypto_ReadListNetworksRequest(arg) {
96
+ if (!(arg instanceof crypto_pb.ReadListNetworksRequest)) {
97
+ throw new Error('Expected argument of type crypto.ReadListNetworksRequest');
98
+ }
99
+ return Buffer.from(arg.serializeBinary());
100
+ }
101
+
102
+ function deserialize_crypto_ReadListNetworksRequest(buffer_arg) {
103
+ return crypto_pb.ReadListNetworksRequest.deserializeBinary(new Uint8Array(buffer_arg));
104
+ }
105
+
106
+ function serialize_crypto_ReadListNetworksResponse(arg) {
107
+ if (!(arg instanceof crypto_pb.ReadListNetworksResponse)) {
108
+ throw new Error('Expected argument of type crypto.ReadListNetworksResponse');
109
+ }
110
+ return Buffer.from(arg.serializeBinary());
111
+ }
112
+
113
+ function deserialize_crypto_ReadListNetworksResponse(buffer_arg) {
114
+ return crypto_pb.ReadListNetworksResponse.deserializeBinary(new Uint8Array(buffer_arg));
115
+ }
116
+
117
+ function serialize_crypto_ReadWithdrawalTransferRequest(arg) {
118
+ if (!(arg instanceof crypto_pb.ReadWithdrawalTransferRequest)) {
119
+ throw new Error('Expected argument of type crypto.ReadWithdrawalTransferRequest');
120
+ }
121
+ return Buffer.from(arg.serializeBinary());
122
+ }
123
+
124
+ function deserialize_crypto_ReadWithdrawalTransferRequest(buffer_arg) {
125
+ return crypto_pb.ReadWithdrawalTransferRequest.deserializeBinary(new Uint8Array(buffer_arg));
126
+ }
127
+
128
+ function serialize_crypto_ReadWithdrawalTransferResponse(arg) {
129
+ if (!(arg instanceof crypto_pb.ReadWithdrawalTransferResponse)) {
130
+ throw new Error('Expected argument of type crypto.ReadWithdrawalTransferResponse');
131
+ }
132
+ return Buffer.from(arg.serializeBinary());
133
+ }
134
+
135
+ function deserialize_crypto_ReadWithdrawalTransferResponse(buffer_arg) {
136
+ return crypto_pb.ReadWithdrawalTransferResponse.deserializeBinary(new Uint8Array(buffer_arg));
137
+ }
138
+
29
139
 
30
140
  var CryptoService = exports.CryptoService = {
31
141
  checkConnection: {
@@ -39,6 +149,61 @@ var CryptoService = exports.CryptoService = {
39
149
  responseSerialize: serialize_crypto_PongResponse,
40
150
  responseDeserialize: deserialize_crypto_PongResponse,
41
151
  },
152
+ readListNetworks: {
153
+ path: '/crypto.Crypto/readListNetworks',
154
+ requestStream: false,
155
+ responseStream: false,
156
+ requestType: crypto_pb.ReadListNetworksRequest,
157
+ responseType: crypto_pb.ReadListNetworksResponse,
158
+ requestSerialize: serialize_crypto_ReadListNetworksRequest,
159
+ requestDeserialize: deserialize_crypto_ReadListNetworksRequest,
160
+ responseSerialize: serialize_crypto_ReadListNetworksResponse,
161
+ responseDeserialize: deserialize_crypto_ReadListNetworksResponse,
162
+ },
163
+ readListAssets: {
164
+ path: '/crypto.Crypto/readListAssets',
165
+ requestStream: false,
166
+ responseStream: false,
167
+ requestType: crypto_pb.ReadListAssetsRequest,
168
+ responseType: crypto_pb.ReadListAssetsResponse,
169
+ requestSerialize: serialize_crypto_ReadListAssetsRequest,
170
+ requestDeserialize: deserialize_crypto_ReadListAssetsRequest,
171
+ responseSerialize: serialize_crypto_ReadListAssetsResponse,
172
+ responseDeserialize: deserialize_crypto_ReadListAssetsResponse,
173
+ },
174
+ getDepositAddress: {
175
+ path: '/crypto.Crypto/getDepositAddress',
176
+ requestStream: false,
177
+ responseStream: false,
178
+ requestType: crypto_pb.GetDepositAddressRequest,
179
+ responseType: crypto_pb.GetDepositAddressResponse,
180
+ requestSerialize: serialize_crypto_GetDepositAddressRequest,
181
+ requestDeserialize: deserialize_crypto_GetDepositAddressRequest,
182
+ responseSerialize: serialize_crypto_GetDepositAddressResponse,
183
+ responseDeserialize: deserialize_crypto_GetDepositAddressResponse,
184
+ },
185
+ createWithdrawalTransfer: {
186
+ path: '/crypto.Crypto/createWithdrawalTransfer',
187
+ requestStream: false,
188
+ responseStream: false,
189
+ requestType: crypto_pb.CreateWithdrawalTransferRequest,
190
+ responseType: crypto_pb.CreateWithdrawalTransferResponse,
191
+ requestSerialize: serialize_crypto_CreateWithdrawalTransferRequest,
192
+ requestDeserialize: deserialize_crypto_CreateWithdrawalTransferRequest,
193
+ responseSerialize: serialize_crypto_CreateWithdrawalTransferResponse,
194
+ responseDeserialize: deserialize_crypto_CreateWithdrawalTransferResponse,
195
+ },
196
+ readWithdrawalTransfer: {
197
+ path: '/crypto.Crypto/readWithdrawalTransfer',
198
+ requestStream: false,
199
+ responseStream: false,
200
+ requestType: crypto_pb.ReadWithdrawalTransferRequest,
201
+ responseType: crypto_pb.ReadWithdrawalTransferResponse,
202
+ requestSerialize: serialize_crypto_ReadWithdrawalTransferRequest,
203
+ requestDeserialize: deserialize_crypto_ReadWithdrawalTransferRequest,
204
+ responseSerialize: serialize_crypto_ReadWithdrawalTransferResponse,
205
+ responseDeserialize: deserialize_crypto_ReadWithdrawalTransferResponse,
206
+ },
42
207
  };
43
208
 
44
209
  exports.CryptoClient = grpc.makeGenericClientConstructor(CryptoService, 'Crypto');