@simplito/privmx-webendpoint 2.6.5 → 2.7.1

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.
Files changed (177) hide show
  1. package/CONTRIBUTING.md +86 -0
  2. package/README.md +97 -7
  3. package/assets/driver-web-context.js +1 -1
  4. package/assets/e2ee-worker.js +1 -1
  5. package/assets/endpoint-wasm-module.js +2 -2
  6. package/assets/endpoint-wasm-module.wasm +0 -0
  7. package/assets/rms-processor.js +1 -0
  8. package/build-manifest.sh +6 -0
  9. package/{FinalizationHelper.js → dist/FinalizationHelper.js} +1 -1
  10. package/dist/ServerTypes.d.ts +7 -0
  11. package/{Types.d.ts → dist/Types.d.ts} +97 -10
  12. package/{Types.js → dist/Types.js} +17 -32
  13. package/{api → dist/api}/Api.d.ts +2 -0
  14. package/{api → dist/api}/Api.js +18 -1
  15. package/{api → dist/api}/ConnectionNative.js +1 -1
  16. package/{api → dist/api}/CryptoApiNative.js +1 -2
  17. package/{api → dist/api}/InboxApiNative.d.ts +21 -2
  18. package/{api → dist/api}/KvdbApiNative.d.ts +19 -2
  19. package/dist/api/NativeError.d.ts +13 -0
  20. package/dist/api/NativeError.js +20 -0
  21. package/{api → dist/api}/StoreApiNative.d.ts +19 -2
  22. package/dist/api/StreamApiNative.d.ts +72 -0
  23. package/dist/api/StreamApiNative.js +142 -0
  24. package/{api → dist/api}/ThreadApiNative.d.ts +19 -2
  25. package/dist/assets/e2ee-worker.js +1 -0
  26. package/dist/bundle/privmx-endpoint-web.js +2 -0
  27. package/dist/bundle/privmx-endpoint-web.js.LICENSE.txt +30 -0
  28. package/dist/bundle/rms-processor.js +1 -0
  29. package/{extra → dist/extra}/PrivmxClient.d.ts +9 -9
  30. package/{extra → dist/extra}/PrivmxClient.js +12 -12
  31. package/{extra → dist/extra}/PublicConnection.d.ts +2 -2
  32. package/{extra → dist/extra}/PublicConnection.js +2 -2
  33. package/{extra → dist/extra}/__tests__/connectionEventManager.test.js +1 -3
  34. package/{extra → dist/extra}/__tests__/customEventManager.test.js +1 -3
  35. package/{extra → dist/extra}/__tests__/userEventManager.test.js +2 -6
  36. package/{extra → dist/extra}/__tests__/utils.test.js +18 -18
  37. package/{extra → dist/extra}/events.js +32 -12
  38. package/{extra → dist/extra}/files.d.ts +5 -5
  39. package/{extra → dist/extra}/files.js +11 -11
  40. package/{extra → dist/extra}/generics.d.ts +1 -1
  41. package/{extra → dist/extra}/inbox.d.ts +1 -1
  42. package/{extra → dist/extra}/inbox.js +2 -2
  43. package/{extra → dist/extra}/index.d.ts +7 -7
  44. package/{extra → dist/extra}/managers.js +1 -1
  45. package/{extra → dist/extra}/utils.js +9 -9
  46. package/{index.d.ts → dist/index.d.ts} +3 -2
  47. package/{index.js → dist/index.js} +4 -1
  48. package/{service → dist/service}/Connection.js +13 -6
  49. package/{service → dist/service}/CryptoApi.js +2 -8
  50. package/{service → dist/service}/EndpointFactory.d.ts +11 -0
  51. package/{service → dist/service}/EndpointFactory.js +45 -10
  52. package/{service → dist/service}/EventApi.js +9 -5
  53. package/dist/service/EventDispatcher.d.ts +15 -0
  54. package/dist/service/EventDispatcher.js +25 -0
  55. package/{service → dist/service}/EventQueue.d.ts +4 -4
  56. package/{service → dist/service}/EventQueue.js +5 -9
  57. package/{service → dist/service}/ExtKey.d.ts +10 -10
  58. package/{service → dist/service}/ExtKey.js +10 -10
  59. package/{service → dist/service}/InboxApi.js +7 -11
  60. package/{service → dist/service}/KvdbApi.js +12 -7
  61. package/{service → dist/service}/StoreApi.js +10 -15
  62. package/dist/service/StreamApi.d.ts +237 -0
  63. package/dist/service/StreamApi.js +442 -0
  64. package/{service → dist/service}/ThreadApi.js +6 -7
  65. package/{service → dist/service}/UserVerifierInterface.d.ts +2 -2
  66. package/dist/service/UserVerifierInterface.js +2 -0
  67. package/dist/service/WebRtcInterface.d.ts +58 -0
  68. package/dist/service/WebRtcInterface.js +8 -0
  69. package/{service → dist/service}/index.d.ts +3 -2
  70. package/{service → dist/service}/index.js +5 -3
  71. package/dist/webStreams/CryptoUtils.d.ts +24 -0
  72. package/dist/webStreams/CryptoUtils.js +58 -0
  73. package/dist/webStreams/KeyStore.d.ts +9 -0
  74. package/dist/webStreams/KeyStore.js +29 -0
  75. package/dist/webStreams/Logger.d.ts +7 -0
  76. package/dist/webStreams/Logger.js +25 -0
  77. package/dist/webStreams/PeerConnectionsManager.d.ts +20 -0
  78. package/dist/webStreams/PeerConnectionsManager.js +92 -0
  79. package/dist/webStreams/Queue.d.ts +19 -0
  80. package/dist/webStreams/Queue.js +70 -0
  81. package/dist/webStreams/Utils.d.ts +20 -0
  82. package/dist/webStreams/Utils.js +211 -0
  83. package/dist/webStreams/WebRtcClient.d.ts +85 -0
  84. package/dist/webStreams/WebRtcClient.js +437 -0
  85. package/dist/webStreams/WebRtcClientTypes.d.ts +64 -0
  86. package/dist/webStreams/WebRtcClientTypes.js +2 -0
  87. package/dist/webStreams/WebRtcConfig.d.ts +20 -0
  88. package/dist/webStreams/WebRtcConfig.js +53 -0
  89. package/dist/webStreams/WebRtcInterfaceImpl.d.ts +28 -0
  90. package/dist/webStreams/WebRtcInterfaceImpl.js +85 -0
  91. package/dist/webStreams/WebWorkerHelper copy.d.ts +0 -0
  92. package/dist/webStreams/WebWorkerHelper copy.js +17 -0
  93. package/dist/webStreams/WebWorkerHelper.d.ts +18 -0
  94. package/dist/webStreams/WebWorkerHelper.js +69 -0
  95. package/dist/webStreams/audio/ActiveSpeakerDetector.d.ts +38 -0
  96. package/dist/webStreams/audio/ActiveSpeakerDetector.js +64 -0
  97. package/dist/webStreams/audio/LocalAudioLevelMeter.d.ts +12 -0
  98. package/dist/webStreams/audio/LocalAudioLevelMeter.js +101 -0
  99. package/dist/webStreams/types/ApiTypes.d.ts +74 -0
  100. package/dist/webStreams/types/ApiTypes.js +2 -0
  101. package/dist/webStreams/types/BaseServerTypes.d.ts +10 -0
  102. package/dist/webStreams/types/BaseServerTypes.js +2 -0
  103. package/dist/webStreams/types/MediaServerWebSocketApiTypes.d.ts +255 -0
  104. package/dist/webStreams/types/MediaServerWebSocketApiTypes.js +2 -0
  105. package/dist/webStreams/types/SignalingReceiverTypes.d.ts +13 -0
  106. package/dist/webStreams/types/SignalingReceiverTypes.js +2 -0
  107. package/dist/webStreams/types/SignalingSenderTypes.d.ts +24 -0
  108. package/dist/webStreams/types/SignalingSenderTypes.js +2 -0
  109. package/dist/webStreams/types/StreamsApiTypes.d.ts +144 -0
  110. package/dist/webStreams/types/StreamsApiTypes.js +2 -0
  111. package/dist/webStreams/worker/WorkerEvents.d.ts +11 -0
  112. package/dist/webStreams/worker/WorkerEvents.js +2 -0
  113. package/dist/webStreams/worker/worker.d.ts +13 -0
  114. package/dist/webStreams/worker/worker.js +202 -0
  115. package/package.json +46 -15
  116. package/assets/endpoint-wasm-module.worker.js +0 -1
  117. package/assets/privmx-endpoint-web.js +0 -2
  118. package/bundle/privmx-endpoint-web.js +0 -2
  119. package/bundle/privmx-endpoint-web.js.LICENSE.txt +0 -10
  120. /package/{FinalizationHelper.d.ts → dist/FinalizationHelper.d.ts} +0 -0
  121. /package/{extra/generics.js → dist/ServerTypes.js} +0 -0
  122. /package/{api → dist/api}/ApiStatic.d.ts +0 -0
  123. /package/{api → dist/api}/ApiStatic.js +0 -0
  124. /package/{api → dist/api}/BaseNative.d.ts +0 -0
  125. /package/{api → dist/api}/BaseNative.js +0 -0
  126. /package/{api → dist/api}/ConnectionNative.d.ts +0 -0
  127. /package/{api → dist/api}/CryptoApiNative.d.ts +0 -0
  128. /package/{api → dist/api}/EventApiNative.d.ts +0 -0
  129. /package/{api → dist/api}/EventApiNative.js +0 -0
  130. /package/{api → dist/api}/EventQueueNative.d.ts +0 -0
  131. /package/{api → dist/api}/EventQueueNative.js +0 -0
  132. /package/{api → dist/api}/ExtKeyNative.d.ts +0 -0
  133. /package/{api → dist/api}/ExtKeyNative.js +0 -0
  134. /package/{api → dist/api}/IdGenerator.d.ts +0 -0
  135. /package/{api → dist/api}/IdGenerator.js +0 -0
  136. /package/{api → dist/api}/InboxApiNative.js +0 -0
  137. /package/{api → dist/api}/KvdbApiNative.js +0 -0
  138. /package/{api → dist/api}/StoreApiNative.js +0 -0
  139. /package/{api → dist/api}/ThreadApiNative.js +0 -0
  140. /package/{bundle.d.ts → dist/bundle.d.ts} +0 -0
  141. /package/{bundle.js → dist/bundle.js} +0 -0
  142. /package/{extra → dist/extra}/__mocks__/constants.d.ts +0 -0
  143. /package/{extra → dist/extra}/__mocks__/constants.js +0 -0
  144. /package/{extra → dist/extra}/__mocks__/mockContainerSubscriber.d.ts +0 -0
  145. /package/{extra → dist/extra}/__mocks__/mockContainerSubscriber.js +0 -0
  146. /package/{extra → dist/extra}/__mocks__/mockEventQueue.d.ts +0 -0
  147. /package/{extra → dist/extra}/__mocks__/mockEventQueue.js +0 -0
  148. /package/{extra → dist/extra}/__mocks__/utils.d.ts +0 -0
  149. /package/{extra → dist/extra}/__mocks__/utils.js +0 -0
  150. /package/{extra → dist/extra}/__tests__/connectionEventManager.test.d.ts +0 -0
  151. /package/{extra → dist/extra}/__tests__/customEventManager.test.d.ts +0 -0
  152. /package/{extra → dist/extra}/__tests__/eventsManager.test.d.ts +0 -0
  153. /package/{extra → dist/extra}/__tests__/eventsManager.test.js +0 -0
  154. /package/{extra → dist/extra}/__tests__/inboxEventManager.d.ts +0 -0
  155. /package/{extra → dist/extra}/__tests__/inboxEventManager.js +0 -0
  156. /package/{extra → dist/extra}/__tests__/storeEventManager.test.d.ts +0 -0
  157. /package/{extra → dist/extra}/__tests__/storeEventManager.test.js +0 -0
  158. /package/{extra → dist/extra}/__tests__/threadEventManager.test.d.ts +0 -0
  159. /package/{extra → dist/extra}/__tests__/threadEventManager.test.js +0 -0
  160. /package/{extra → dist/extra}/__tests__/userEventManager.test.d.ts +0 -0
  161. /package/{extra → dist/extra}/__tests__/utils.test.d.ts +0 -0
  162. /package/{extra → dist/extra}/events.d.ts +0 -0
  163. /package/{service/UserVerifierInterface.js → dist/extra/generics.js} +0 -0
  164. /package/{extra → dist/extra}/index.js +0 -0
  165. /package/{extra → dist/extra}/managers.d.ts +0 -0
  166. /package/{extra → dist/extra}/subscriptions.d.ts +0 -0
  167. /package/{extra → dist/extra}/subscriptions.js +0 -0
  168. /package/{extra → dist/extra}/utils.d.ts +0 -0
  169. /package/{service → dist/service}/BaseApi.d.ts +0 -0
  170. /package/{service → dist/service}/BaseApi.js +0 -0
  171. /package/{service → dist/service}/Connection.d.ts +0 -0
  172. /package/{service → dist/service}/CryptoApi.d.ts +0 -0
  173. /package/{service → dist/service}/EventApi.d.ts +0 -0
  174. /package/{service → dist/service}/InboxApi.d.ts +0 -0
  175. /package/{service → dist/service}/KvdbApi.d.ts +0 -0
  176. /package/{service → dist/service}/StoreApi.d.ts +0 -0
  177. /package/{service → dist/service}/ThreadApi.d.ts +0 -0
@@ -20,9 +20,9 @@ class EventApi extends BaseApi_1.BaseApi {
20
20
  }
21
21
  // /**
22
22
  // * Creates an instance of 'EventApi'.
23
- // *
23
+ // *
24
24
  // * @param connection instance of 'Connection'
25
- // *
25
+ // *
26
26
  // * @return EventApi object
27
27
  // */
28
28
  // static EventApi create(core::Connection& connection);
@@ -40,7 +40,7 @@ class EventApi extends BaseApi_1.BaseApi {
40
40
  }
41
41
  // /**
42
42
  // * Subscribe for the custom events on the given channel.
43
- // *
43
+ // *
44
44
  // * @param {string} contextId ID of the Context
45
45
  // * @param {string} channelName name of the Channel
46
46
  // */
@@ -49,7 +49,7 @@ class EventApi extends BaseApi_1.BaseApi {
49
49
  // }
50
50
  // /**
51
51
  // * Unsubscribe from the custom events on the given channel.
52
- // *
52
+ // *
53
53
  // * @param {string} contextId ID of the Context
54
54
  // * @param {string} channelName name of the Channel
55
55
  // */
@@ -79,7 +79,11 @@ class EventApi extends BaseApi_1.BaseApi {
79
79
  * @param {string} selectorId ID of the selector
80
80
  */
81
81
  async buildSubscriptionQuery(channelName, selectorType, selectorId) {
82
- return this.native.buildSubscriptionQuery(this.servicePtr, [channelName, selectorType, selectorId]);
82
+ return this.native.buildSubscriptionQuery(this.servicePtr, [
83
+ channelName,
84
+ selectorType,
85
+ selectorId,
86
+ ]);
83
87
  }
84
88
  }
85
89
  exports.EventApi = EventApi;
@@ -0,0 +1,15 @@
1
+ import { StreamHandle } from "../Types";
2
+ export interface StateChangeEvent {
3
+ streamHandle: StreamHandle;
4
+ state: RTCPeerConnectionState;
5
+ }
6
+ export interface StateChangeFilter {
7
+ streamHandle: StreamHandle;
8
+ }
9
+ export type StateChangeListener = (event: StateChangeEvent) => void;
10
+ export declare class StateChangeDispatcher {
11
+ private listeners;
12
+ addOnStateChangeListener(filter: StateChangeFilter, listener: StateChangeListener): void;
13
+ removeOnStateChangeListener(filter: StateChangeFilter): void;
14
+ emit(event: StateChangeEvent): void;
15
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StateChangeDispatcher = void 0;
4
+ class StateChangeDispatcher {
5
+ listeners = new Set();
6
+ addOnStateChangeListener(filter, listener) {
7
+ const entry = { filter, listener };
8
+ this.listeners.add(entry);
9
+ }
10
+ removeOnStateChangeListener(filter) {
11
+ for (const value of this.listeners.values()) {
12
+ if (value.filter === filter) {
13
+ this.listeners.delete(value);
14
+ }
15
+ }
16
+ }
17
+ emit(event) {
18
+ for (const { filter, listener } of this.listeners) {
19
+ if (filter.streamHandle === event.streamHandle) {
20
+ listener(event);
21
+ }
22
+ }
23
+ }
24
+ }
25
+ exports.StateChangeDispatcher = StateChangeDispatcher;
@@ -8,12 +8,12 @@ This software is Licensed under the PrivMX Free License.
8
8
  See the License for the specific language governing permissions and
9
9
  limitations under the License.
10
10
  */
11
- import { BaseApi } from './BaseApi';
12
- import { EventQueueNative } from '../api/EventQueueNative';
13
- import { Event } from '../Types';
11
+ import { BaseApi } from "./BaseApi";
12
+ import { EventQueueNative } from "../api/EventQueueNative";
13
+ import { Event } from "../Types";
14
14
  export declare class EventQueue extends BaseApi {
15
15
  private native;
16
- private isPending;
16
+ private deferedPromise;
17
17
  constructor(native: EventQueueNative, ptr: number);
18
18
  waitEvent(): Promise<Event>;
19
19
  emitBreakEvent(): Promise<void>;
@@ -14,21 +14,17 @@ exports.EventQueue = void 0;
14
14
  const BaseApi_1 = require("./BaseApi");
15
15
  class EventQueue extends BaseApi_1.BaseApi {
16
16
  native;
17
- isPending = false;
17
+ deferedPromise;
18
18
  constructor(native, ptr) {
19
19
  super(ptr);
20
20
  this.native = native;
21
21
  }
22
22
  async waitEvent() {
23
- if (this.isPending) {
24
- throw ("WaitEvent() is already in a pending state waiting for new events");
25
- }
26
- try {
27
- return await this.native.waitEvent(this.servicePtr, []);
28
- }
29
- finally {
30
- this.isPending = false;
23
+ if (!this.deferedPromise) {
24
+ this.deferedPromise = this.native.waitEvent(this.servicePtr, []);
25
+ this.deferedPromise.finally(() => (this.deferedPromise = null));
31
26
  }
27
+ return this.deferedPromise;
32
28
  }
33
29
  async emitBreakEvent() {
34
30
  return this.native.emitBreakEvent(this.servicePtr, []);
@@ -8,20 +8,20 @@ export declare class ExtKey extends BaseApi {
8
8
  * Creates ExtKey from given seed.
9
9
  * @param {Uint8Array} seed the seed used to generate Key
10
10
  * @returns {ExtKey} object
11
- */
11
+ */
12
12
  static fromSeed(seed: Uint8Array): Promise<ExtKey>;
13
13
  /**
14
14
  * Decodes ExtKey from Base58 format.
15
15
  *
16
16
  * @param {string} base58 the ExtKey in Base58
17
17
  * @returns {ExtKey} object
18
- */
18
+ */
19
19
  static fromBase58(base58: string): Promise<ExtKey>;
20
20
  /**
21
21
  * Generates a new ExtKey.
22
22
  *
23
23
  * @returns {ExtKey} object
24
- */
24
+ */
25
25
  static generateRandom(): Promise<ExtKey>;
26
26
  /**
27
27
  * //doc-gen:ignore
@@ -48,37 +48,37 @@ export declare class ExtKey extends BaseApi {
48
48
  * Converts ExtKey to Base58 string.
49
49
  *
50
50
  * @returns {string} ExtKey in Base58 format
51
- */
51
+ */
52
52
  getPrivatePartAsBase58(): Promise<string>;
53
53
  /**
54
54
  * Converts the public part of ExtKey to Base58 string.
55
55
  *
56
56
  * @returns {string} ExtKey in Base58 format
57
- */
57
+ */
58
58
  getPublicPartAsBase58(): Promise<string>;
59
59
  /**
60
60
  * Extracts ECC PrivateKey.
61
61
  *
62
62
  * @returns {string} ECC key in WIF format
63
- */
63
+ */
64
64
  getPrivateKey(): Promise<string>;
65
65
  /**
66
66
  * Extracts ECC PublicKey.
67
67
  *
68
68
  * @returns {string} ECC key in BASE58DER format
69
- */
69
+ */
70
70
  getPublicKey(): Promise<string>;
71
71
  /**
72
72
  * Extracts raw ECC PrivateKey.
73
73
  *
74
74
  * @returns {Uint8Array} ECC PrivateKey
75
- */
75
+ */
76
76
  getPrivateEncKey(): Promise<Uint8Array>;
77
77
  /**
78
78
  * Extracts ECC PublicKey Address.
79
79
  *
80
80
  * @returns {string} ECC Address in BASE58 format
81
- */
81
+ */
82
82
  getPublicKeyAsBase58Address(): Promise<string>;
83
83
  /**
84
84
  * Gets the chain code of Extended Key.
@@ -98,6 +98,6 @@ export declare class ExtKey extends BaseApi {
98
98
  * Checks if ExtKey is Private.
99
99
  *
100
100
  * @returns {boolean} true if ExtKey is private
101
- */
101
+ */
102
102
  isPrivate(): Promise<boolean>;
103
103
  }
@@ -16,7 +16,7 @@ class ExtKey extends BaseApi_1.BaseApi {
16
16
  * Creates ExtKey from given seed.
17
17
  * @param {Uint8Array} seed the seed used to generate Key
18
18
  * @returns {ExtKey} object
19
- */
19
+ */
20
20
  static async fromSeed(seed) {
21
21
  const ptr = await ExtKeyNative_1.ExtKeyNative.fromSeed([seed]);
22
22
  const native = new ExtKeyNative_1.ExtKeyNative(ApiStatic_1.ApiStatic.getInstance());
@@ -30,7 +30,7 @@ class ExtKey extends BaseApi_1.BaseApi {
30
30
  *
31
31
  * @param {string} base58 the ExtKey in Base58
32
32
  * @returns {ExtKey} object
33
- */
33
+ */
34
34
  static async fromBase58(base58) {
35
35
  const ptr = await ExtKeyNative_1.ExtKeyNative.fromBase58([base58]);
36
36
  const native = new ExtKeyNative_1.ExtKeyNative(ApiStatic_1.ApiStatic.getInstance());
@@ -43,7 +43,7 @@ class ExtKey extends BaseApi_1.BaseApi {
43
43
  * Generates a new ExtKey.
44
44
  *
45
45
  * @returns {ExtKey} object
46
- */
46
+ */
47
47
  static async generateRandom() {
48
48
  const ptr = await ExtKeyNative_1.ExtKeyNative.generateRandom([]);
49
49
  const native = new ExtKeyNative_1.ExtKeyNative(ApiStatic_1.ApiStatic.getInstance());
@@ -93,7 +93,7 @@ class ExtKey extends BaseApi_1.BaseApi {
93
93
  * Converts ExtKey to Base58 string.
94
94
  *
95
95
  * @returns {string} ExtKey in Base58 format
96
- */
96
+ */
97
97
  async getPrivatePartAsBase58() {
98
98
  return this.native.getPrivatePartAsBase58(this.servicePtr, []);
99
99
  }
@@ -101,7 +101,7 @@ class ExtKey extends BaseApi_1.BaseApi {
101
101
  * Converts the public part of ExtKey to Base58 string.
102
102
  *
103
103
  * @returns {string} ExtKey in Base58 format
104
- */
104
+ */
105
105
  async getPublicPartAsBase58() {
106
106
  return this.native.getPublicPartAsBase58(this.servicePtr, []);
107
107
  }
@@ -109,7 +109,7 @@ class ExtKey extends BaseApi_1.BaseApi {
109
109
  * Extracts ECC PrivateKey.
110
110
  *
111
111
  * @returns {string} ECC key in WIF format
112
- */
112
+ */
113
113
  async getPrivateKey() {
114
114
  return this.native.getPrivateKey(this.servicePtr, []);
115
115
  }
@@ -117,7 +117,7 @@ class ExtKey extends BaseApi_1.BaseApi {
117
117
  * Extracts ECC PublicKey.
118
118
  *
119
119
  * @returns {string} ECC key in BASE58DER format
120
- */
120
+ */
121
121
  async getPublicKey() {
122
122
  return this.native.getPublicKey(this.servicePtr, []);
123
123
  }
@@ -125,7 +125,7 @@ class ExtKey extends BaseApi_1.BaseApi {
125
125
  * Extracts raw ECC PrivateKey.
126
126
  *
127
127
  * @returns {Uint8Array} ECC PrivateKey
128
- */
128
+ */
129
129
  async getPrivateEncKey() {
130
130
  return this.native.getPrivateEncKey(this.servicePtr, []);
131
131
  }
@@ -133,7 +133,7 @@ class ExtKey extends BaseApi_1.BaseApi {
133
133
  * Extracts ECC PublicKey Address.
134
134
  *
135
135
  * @returns {string} ECC Address in BASE58 format
136
- */
136
+ */
137
137
  async getPublicKeyAsBase58Address() {
138
138
  return this.native.getPublicKeyAsBase58Address(this.servicePtr, []);
139
139
  }
@@ -159,7 +159,7 @@ class ExtKey extends BaseApi_1.BaseApi {
159
159
  * Checks if ExtKey is Private.
160
160
  *
161
161
  * @returns {boolean} true if ExtKey is private
162
- */
162
+ */
163
163
  async isPrivate() {
164
164
  return this.native.isPrivate(this.servicePtr, []);
165
165
  }
@@ -172,11 +172,7 @@ class InboxApi extends BaseApi_1.BaseApi {
172
172
  * @returns {number} file handle
173
173
  */
174
174
  async createFileHandle(publicMeta, privateMeta, fileSize) {
175
- return this.native.createFileHandle(this.servicePtr, [
176
- publicMeta,
177
- privateMeta,
178
- fileSize,
179
- ]);
175
+ return this.native.createFileHandle(this.servicePtr, [publicMeta, privateMeta, fileSize]);
180
176
  }
181
177
  /**
182
178
  * Sends a file's data chunk to an Inbox.
@@ -188,11 +184,7 @@ class InboxApi extends BaseApi_1.BaseApi {
188
184
  * @param {Uint8Array} dataChunk - file chunk to send
189
185
  */
190
186
  async writeToFile(inboxHandle, inboxFileHandle, dataChunk) {
191
- return this.native.writeToFile(this.servicePtr, [
192
- inboxHandle,
193
- inboxFileHandle,
194
- dataChunk,
195
- ]);
187
+ return this.native.writeToFile(this.servicePtr, [inboxHandle, inboxFileHandle, dataChunk]);
196
188
  }
197
189
  /**
198
190
  * Opens a file to read.
@@ -281,7 +273,11 @@ class InboxApi extends BaseApi_1.BaseApi {
281
273
  * @param {string} selectorId ID of the selector
282
274
  */
283
275
  async buildSubscriptionQuery(eventType, selectorType, selectorId) {
284
- return this.native.buildSubscriptionQuery(this.servicePtr, [eventType, selectorType, selectorId]);
276
+ return this.native.buildSubscriptionQuery(this.servicePtr, [
277
+ eventType,
278
+ selectorType,
279
+ selectorId,
280
+ ]);
285
281
  }
286
282
  }
287
283
  exports.InboxApi = InboxApi;
@@ -151,7 +151,7 @@ class KvdbApi extends BaseApi_1.BaseApi {
151
151
  publicMeta,
152
152
  privateMeta,
153
153
  data,
154
- version || 0
154
+ version || 0,
155
155
  ]);
156
156
  }
157
157
  /**
@@ -171,10 +171,7 @@ class KvdbApi extends BaseApi_1.BaseApi {
171
171
  * @returns {Map<string, boolean>} map with the statuses of deletion for every key
172
172
  */
173
173
  async deleteEntries(kvdbId, keys) {
174
- return this.native.deleteEntries(this.servicePtr, [
175
- kvdbId,
176
- keys,
177
- ]);
174
+ return this.native.deleteEntries(this.servicePtr, [kvdbId, keys]);
178
175
  }
179
176
  // /**
180
177
  // * Subscribes for the KVDB module main events.
@@ -227,7 +224,11 @@ class KvdbApi extends BaseApi_1.BaseApi {
227
224
  * @param {string} selectorId ID of the selector
228
225
  */
229
226
  async buildSubscriptionQuery(eventType, selectorType, selectorId) {
230
- return this.native.buildSubscriptionQuery(this.servicePtr, [eventType, selectorType, selectorId]);
227
+ return this.native.buildSubscriptionQuery(this.servicePtr, [
228
+ eventType,
229
+ selectorType,
230
+ selectorId,
231
+ ]);
231
232
  }
232
233
  /**
233
234
  * Generate subscription Query for the KVDB events for single KvdbEntry.
@@ -236,7 +237,11 @@ class KvdbApi extends BaseApi_1.BaseApi {
236
237
  * @param {string} kvdbEntryKey Key of Kvdb Entry
237
238
  */
238
239
  async buildSubscriptionQueryForSelectedEntry(eventType, kvdbId, kvdbEntryKey) {
239
- return this.native.buildSubscriptionQueryForSelectedEntry(this.servicePtr, [eventType, kvdbId, kvdbEntryKey]);
240
+ return this.native.buildSubscriptionQueryForSelectedEntry(this.servicePtr, [
241
+ eventType,
242
+ kvdbId,
243
+ kvdbEntryKey,
244
+ ]);
240
245
  }
241
246
  }
242
247
  exports.KvdbApi = KvdbApi;
@@ -37,7 +37,7 @@ class StoreApi extends BaseApi_1.BaseApi {
37
37
  managers,
38
38
  publicMeta,
39
39
  privateMeta,
40
- policies
40
+ policies,
41
41
  ]);
42
42
  }
43
43
  /**
@@ -64,7 +64,7 @@ class StoreApi extends BaseApi_1.BaseApi {
64
64
  version,
65
65
  force,
66
66
  forceGenerateNewKey,
67
- policies
67
+ policies,
68
68
  ]);
69
69
  }
70
70
  /**
@@ -110,7 +110,7 @@ class StoreApi extends BaseApi_1.BaseApi {
110
110
  publicMeta,
111
111
  privateMeta,
112
112
  size,
113
- randomWriteSupport
113
+ randomWriteSupport,
114
114
  ]);
115
115
  }
116
116
  /**
@@ -123,12 +123,7 @@ class StoreApi extends BaseApi_1.BaseApi {
123
123
  * @returns {number} handle to write file data
124
124
  */
125
125
  async updateFile(fileId, publicMeta, privateMeta, size) {
126
- return this.native.updateFile(this.servicePtr, [
127
- fileId,
128
- publicMeta,
129
- privateMeta,
130
- size,
131
- ]);
126
+ return this.native.updateFile(this.servicePtr, [fileId, publicMeta, privateMeta, size]);
132
127
  }
133
128
  /**
134
129
  * Update metadata of an existing file in a Store.
@@ -138,11 +133,7 @@ class StoreApi extends BaseApi_1.BaseApi {
138
133
  * @param {Uint8Array} privateMeta private file metadata
139
134
  */
140
135
  async updateFileMeta(fileId, publicMeta, privateMeta) {
141
- return this.native.updateFileMeta(this.servicePtr, [
142
- fileId,
143
- publicMeta,
144
- privateMeta,
145
- ]);
136
+ return this.native.updateFileMeta(this.servicePtr, [fileId, publicMeta, privateMeta]);
146
137
  }
147
138
  /**
148
139
  * Writes a file data.
@@ -276,7 +267,11 @@ class StoreApi extends BaseApi_1.BaseApi {
276
267
  * @param {string} selectorId ID of the selector
277
268
  */
278
269
  async buildSubscriptionQuery(eventType, selectorType, selectorId) {
279
- return this.native.buildSubscriptionQuery(this.servicePtr, [eventType, selectorType, selectorId]);
270
+ return this.native.buildSubscriptionQuery(this.servicePtr, [
271
+ eventType,
272
+ selectorType,
273
+ selectorId,
274
+ ]);
280
275
  }
281
276
  }
282
277
  exports.StoreApi = StoreApi;