@dashevo/dapi-grpc 0.24.0-dev.12 → 0.24.0-dev.14

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.
@@ -73,8 +73,9 @@ class CorePromiseClient {
73
73
  const url = new URL(hostname);
74
74
  const { protocol, host: strippedHostname } = url;
75
75
 
76
+ // See this issue https://github.com/nodejs/node/issues/3176
76
77
  // eslint-disable-next-line no-param-reassign
77
- credentials = protocol === 'https' ? grpc.credentials.createSsl() : grpc.credentials.createInsecure();
78
+ credentials = protocol.replace(':', '') === 'https' ? grpc.credentials.createSsl() : grpc.credentials.createInsecure();
78
79
 
79
80
  this.client = new CoreNodeJSClient(strippedHostname, credentials, options);
80
81
 
@@ -13,39 +13,39 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
- var global = Function('return this')();
17
-
18
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeaders', null, global);
19
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest', null, global);
20
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest.FromBlockCase', null, global);
21
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse', null, global);
22
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse.ResponsesCase', null, global);
23
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BloomFilter', null, global);
24
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastTransactionRequest', null, global);
25
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastTransactionResponse', null, global);
26
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockRequest', null, global);
27
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockRequest.BlockCase', null, global);
28
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockResponse', null, global);
29
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest', null, global);
30
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse', null, global);
31
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusRequest', null, global);
32
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse', null, global);
33
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Chain', null, global);
34
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Masternode', null, global);
35
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Masternode.Status', null, global);
36
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Network', null, global);
37
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.NetworkFee', null, global);
38
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Status', null, global);
39
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Time', null, global);
40
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Version', null, global);
41
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTransactionRequest', null, global);
42
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTransactionResponse', null, global);
43
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.InstantSendLockMessages', null, global);
44
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.RawTransactions', null, global);
45
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest', null, global);
46
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest.FromBlockCase', null, global);
47
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse', null, global);
48
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse.ResponsesCase', null, global);
16
+ const proto = {};
17
+
18
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeaders', null, { proto });
19
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest', null, { proto });
20
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest.FromBlockCase', null, { proto });
21
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse', null, { proto });
22
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse.ResponsesCase', null, { proto });
23
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BloomFilter', null, { proto });
24
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastTransactionRequest', null, { proto });
25
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastTransactionResponse', null, { proto });
26
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockRequest', null, { proto });
27
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockRequest.BlockCase', null, { proto });
28
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockResponse', null, { proto });
29
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest', null, { proto });
30
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse', null, { proto });
31
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusRequest', null, { proto });
32
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse', null, { proto });
33
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Chain', null, { proto });
34
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Masternode', null, { proto });
35
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Masternode.Status', null, { proto });
36
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Network', null, { proto });
37
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.NetworkFee', null, { proto });
38
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Status', null, { proto });
39
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Time', null, { proto });
40
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Version', null, { proto });
41
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTransactionRequest', null, { proto });
42
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTransactionResponse', null, { proto });
43
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.InstantSendLockMessages', null, { proto });
44
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.RawTransactions', null, { proto });
45
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest', null, { proto });
46
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest.FromBlockCase', null, { proto });
47
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse', null, { proto });
48
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse.ResponsesCase', null, { proto });
49
49
  /**
50
50
  * Generated by JsPbCodeGenerator.
51
51
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -13,39 +13,39 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
- var global = Function('return this')();
17
-
18
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeaders', null, global);
19
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest', null, global);
20
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest.FromBlockCase', null, global);
21
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse', null, global);
22
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse.ResponsesCase', null, global);
23
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BloomFilter', null, global);
24
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastTransactionRequest', null, global);
25
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastTransactionResponse', null, global);
26
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockRequest', null, global);
27
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockRequest.BlockCase', null, global);
28
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockResponse', null, global);
29
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest', null, global);
30
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse', null, global);
31
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusRequest', null, global);
32
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse', null, global);
33
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Chain', null, global);
34
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Masternode', null, global);
35
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Masternode.Status', null, global);
36
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Network', null, global);
37
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.NetworkFee', null, global);
38
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Status', null, global);
39
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Time', null, global);
40
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Version', null, global);
41
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTransactionRequest', null, global);
42
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTransactionResponse', null, global);
43
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.InstantSendLockMessages', null, global);
44
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.RawTransactions', null, global);
45
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest', null, global);
46
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest.FromBlockCase', null, global);
47
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse', null, global);
48
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse.ResponsesCase', null, global);
16
+ const proto = {};
17
+
18
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeaders', null, { proto });
19
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest', null, { proto });
20
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest.FromBlockCase', null, { proto });
21
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse', null, { proto });
22
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse.ResponsesCase', null, { proto });
23
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BloomFilter', null, { proto });
24
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastTransactionRequest', null, { proto });
25
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastTransactionResponse', null, { proto });
26
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockRequest', null, { proto });
27
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockRequest.BlockCase', null, { proto });
28
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetBlockResponse', null, { proto });
29
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest', null, { proto });
30
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse', null, { proto });
31
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusRequest', null, { proto });
32
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse', null, { proto });
33
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Chain', null, { proto });
34
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Masternode', null, { proto });
35
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Masternode.Status', null, { proto });
36
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Network', null, { proto });
37
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.NetworkFee', null, { proto });
38
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Status', null, { proto });
39
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Time', null, { proto });
40
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.Version', null, { proto });
41
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTransactionRequest', null, { proto });
42
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTransactionResponse', null, { proto });
43
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.InstantSendLockMessages', null, { proto });
44
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.RawTransactions', null, { proto });
45
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest', null, { proto });
46
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest.FromBlockCase', null, { proto });
47
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse', null, { proto });
48
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse.ResponsesCase', null, { proto });
49
49
  /**
50
50
  * Generated by JsPbCodeGenerator.
51
51
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -73,8 +73,9 @@ class PlatformPromiseClient {
73
73
  const url = new URL(hostname);
74
74
  const { protocol, host: strippedHostname } = url;
75
75
 
76
+ // See this issue https://github.com/nodejs/node/issues/3176
76
77
  // eslint-disable-next-line no-param-reassign
77
- credentials = protocol === 'https' ? grpc.credentials.createSsl() : grpc.credentials.createInsecure();
78
+ credentials = protocol.replace(':', '') === 'https' ? grpc.credentials.createSsl() : grpc.credentials.createInsecure();
78
79
 
79
80
  this.client = new PlatformNodeJSClient(strippedHostname, credentials, options);
80
81
 
@@ -13,31 +13,31 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
- var global = Function('return this')();
16
+ const proto = {};
17
17
 
18
18
  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
19
19
  goog.object.extend(proto, google_protobuf_timestamp_pb);
20
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest', null, global);
21
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse', null, global);
22
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.ConsensusParamsBlock', null, global);
23
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.ConsensusParamsEvidence', null, global);
24
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest', null, global);
25
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse', null, global);
26
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractRequest', null, global);
27
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractResponse', null, global);
28
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest', null, global);
29
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.StartCase', null, global);
30
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse', null, global);
31
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesRequest', null, global);
32
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse', null, global);
33
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityRequest', null, global);
34
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse', null, global);
35
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.Proof', null, global);
36
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.ResponseMetadata', null, global);
37
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError', null, global);
38
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest', null, global);
39
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse', null, global);
40
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.ResponsesCase', null, global);
20
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest', null, { proto });
21
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse', null, { proto });
22
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.ConsensusParamsBlock', null, { proto });
23
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.ConsensusParamsEvidence', null, { proto });
24
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest', null, { proto });
25
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse', null, { proto });
26
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractRequest', null, { proto });
27
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractResponse', null, { proto });
28
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest', null, { proto });
29
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.StartCase', null, { proto });
30
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse', null, { proto });
31
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesRequest', null, { proto });
32
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse', null, { proto });
33
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityRequest', null, { proto });
34
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse', null, { proto });
35
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.Proof', null, { proto });
36
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.ResponseMetadata', null, { proto });
37
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError', null, { proto });
38
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest', null, { proto });
39
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse', null, { proto });
40
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.ResponsesCase', null, { proto });
41
41
  /**
42
42
  * Generated by JsPbCodeGenerator.
43
43
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -13,31 +13,31 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
- var global = Function('return this')();
16
+ const proto = {};
17
17
 
18
18
  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
19
19
  goog.object.extend(proto, google_protobuf_timestamp_pb);
20
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest', null, global);
21
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse', null, global);
22
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.ConsensusParamsBlock', null, global);
23
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.ConsensusParamsEvidence', null, global);
24
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest', null, global);
25
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse', null, global);
26
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractRequest', null, global);
27
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractResponse', null, global);
28
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest', null, global);
29
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.StartCase', null, global);
30
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse', null, global);
31
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesRequest', null, global);
32
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse', null, global);
33
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityRequest', null, global);
34
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse', null, global);
35
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.Proof', null, global);
36
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.ResponseMetadata', null, global);
37
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError', null, global);
38
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest', null, global);
39
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse', null, global);
40
- goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.ResponsesCase', null, global);
20
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest', null, { proto });
21
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse', null, { proto });
22
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.ConsensusParamsBlock', null, { proto });
23
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.ConsensusParamsEvidence', null, { proto });
24
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest', null, { proto });
25
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse', null, { proto });
26
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractRequest', null, { proto });
27
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractResponse', null, { proto });
28
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest', null, { proto });
29
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.StartCase', null, { proto });
30
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse', null, { proto });
31
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesRequest', null, { proto });
32
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse', null, { proto });
33
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityRequest', null, { proto });
34
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse', null, { proto });
35
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.Proof', null, { proto });
36
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.ResponseMetadata', null, { proto });
37
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError', null, { proto });
38
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest', null, { proto });
39
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse', null, { proto });
40
+ goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.ResponsesCase', null, { proto });
41
41
  /**
42
42
  * Generated by JsPbCodeGenerator.
43
43
  * @param {Array=} opt_data Optional initial data array, typically from a
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "0.24.0-dev.12",
3
+ "version": "0.24.0-dev.14",
4
4
  "description": "DAPI GRPC definition file and generated clients",
5
5
  "browser": "browser.js",
6
6
  "main": "node.js",
7
7
  "scripts": {
8
- "build": "yarn exec scripts/build.sh",
8
+ "build": "yarn exec scripts/build.sh && yarn exec scripts/patch-protobuf-js.sh",
9
9
  "lint": "eslint .",
10
10
  "prepublishOnly": "yarn run build",
11
11
  "test": "yarn run test:unit",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "homepage": "https://github.com/dashevo/dapi-grpc#readme",
35
35
  "dependencies": {
36
- "@dashevo/grpc-common": "0.24.0-dev.12",
36
+ "@dashevo/grpc-common": "0.24.0-dev.14",
37
37
  "@dashevo/protobufjs": "6.10.5",
38
38
  "@grpc/grpc-js": "^1.3.7",
39
39
  "@improbable-eng/grpc-web": "^0.15.0",
@@ -0,0 +1,30 @@
1
+ #!/bin/bash
2
+
3
+ files=$(find "$PWD/clients/core/v0/web" "$PWD/clients/core/v0/nodejs" "$PWD/clients/platform/v0/web" "$PWD/clients/platform/v0/nodejs" -name "*_pb.js" -o -name "*_protoc.js")
4
+ OS=$(uname)
5
+
6
+ function replace_in_file() {
7
+ if [ "$OS" = 'Darwin' ]; then
8
+ # for MacOS
9
+ sed -i '' -e "$1" "$2"
10
+ else
11
+ # for Linux and Windows
12
+ sed -i'' -e "$1" "$2"
13
+ fi
14
+ }
15
+
16
+ # Loop over the files
17
+ for file in $files
18
+ do
19
+
20
+ replace_in_file 's/var global = Function('\''return this'\'')();/const proto = {};/g' "$file"
21
+ if grep -qrE "[^a-zA-Z]Function\(" "$file"; then
22
+ echo "Error: Function( still present"
23
+ fi
24
+
25
+ replace_in_file 's/, global);/, { proto });/g' "$file"
26
+ if grep -qrE '(^|[^a-zA-Z."])global([^a-zA-Z]|$)' "$file"; then
27
+ echo "Error: global still present"
28
+ fi
29
+
30
+ done