mqtt5-wasm 0.2.4 → 0.4.0

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # mqtt5-wasm
2
2
 
3
- MQTT v5.0 WebAssembly client and broker for browser environments.
3
+ MQTT v5.0 and v3.1.1 WebAssembly client and broker for browser environments.
4
4
 
5
5
  ## Features
6
6
 
@@ -23,7 +23,7 @@ npm install mqtt5-wasm
23
23
 
24
24
  ```toml
25
25
  [dependencies]
26
- mqtt5-wasm = "0.2"
26
+ mqtt5-wasm = "0.4"
27
27
  ```
28
28
 
29
29
  Build with wasm-pack:
package/mqtt5_wasm.d.ts CHANGED
@@ -5,13 +5,13 @@ export class WasmBridgeConfig {
5
5
  free(): void;
6
6
  [Symbol.dispose](): void;
7
7
  constructor(name: string);
8
- add_topic(mapping: WasmTopicMapping): void;
9
8
  validate(): void;
9
+ add_topic(mapping: WasmTopicMapping): void;
10
+ set password(value: string | null | undefined);
11
+ set username(value: string | null | undefined);
10
12
  set client_id(value: string);
11
13
  set clean_start(value: boolean);
12
14
  set keep_alive_secs(value: number);
13
- set username(value: string | null | undefined);
14
- set password(value: string | null | undefined);
15
15
  }
16
16
 
17
17
  export enum WasmBridgeDirection {
@@ -23,20 +23,22 @@ export enum WasmBridgeDirection {
23
23
  export class WasmBroker {
24
24
  free(): void;
25
25
  [Symbol.dispose](): void;
26
- constructor();
27
- static with_config(wasm_config: WasmBrokerConfig): WasmBroker;
28
- add_user(username: string, password: string): Promise<void>;
29
- add_user_with_hash(username: string, password_hash: string): Promise<void>;
30
- remove_user(username: string): Promise<boolean>;
31
- has_user(username: string): Promise<boolean>;
26
+ add_bridge(config: WasmBridgeConfig, remote_port: MessagePort): Promise<void>;
32
27
  user_count(): Promise<number>;
33
- set_allow_anonymous(allow: boolean): void;
28
+ remove_user(username: string): Promise<boolean>;
29
+ static with_config(wasm_config: WasmBrokerConfig): WasmBroker;
30
+ add_acl_rule(username: string, topic_pattern: string, permission: string): Promise<void>;
31
+ list_bridges(): string[];
34
32
  static hash_password(password: string): string;
35
- create_client_port(): MessagePort;
36
- add_bridge(config: WasmBridgeConfig, remote_port: MessagePort): Promise<void>;
37
33
  remove_bridge(name: string): Promise<void>;
38
- list_bridges(): string[];
34
+ acl_rule_count(): Promise<number>;
35
+ clear_acl_rules(): Promise<void>;
39
36
  stop_all_bridges(): Promise<void>;
37
+ add_user_with_hash(username: string, password_hash: string): Promise<void>;
38
+ create_client_port(): MessagePort;
39
+ constructor();
40
+ add_user(username: string, password: string): Promise<void>;
41
+ has_user(username: string): Promise<boolean>;
40
42
  }
41
43
 
42
44
  export class WasmBrokerConfig {
@@ -44,281 +46,309 @@ export class WasmBrokerConfig {
44
46
  [Symbol.dispose](): void;
45
47
  constructor();
46
48
  set max_clients(value: number);
47
- set session_expiry_interval_secs(value: number);
49
+ set maximum_qos(value: number);
50
+ set allow_anonymous(value: boolean);
48
51
  set max_packet_size(value: number);
49
- set topic_alias_maximum(value: number);
50
52
  set retain_available(value: boolean);
51
- set maximum_qos(value: number);
53
+ set topic_alias_maximum(value: number);
54
+ set server_keep_alive_secs(value: number | null | undefined);
55
+ set session_expiry_interval_secs(value: number);
56
+ set shared_subscription_available(value: boolean);
52
57
  set wildcard_subscription_available(value: boolean);
53
58
  set subscription_identifier_available(value: boolean);
54
- set shared_subscription_available(value: boolean);
55
- set server_keep_alive_secs(value: number | null | undefined);
56
59
  }
57
60
 
58
61
  export class WasmConnectOptions {
59
62
  free(): void;
60
63
  [Symbol.dispose](): void;
61
- constructor();
62
- set_will(will: WasmWillMessage): void;
63
64
  clear_will(): void;
64
65
  addUserProperty(key: string, value: string): void;
65
66
  clearUserProperties(): void;
66
- keepAlive: number;
67
+ constructor();
68
+ set_will(will: WasmWillMessage): void;
67
69
  cleanStart: boolean;
70
+ set password(value: Uint8Array);
68
71
  get username(): string | undefined;
69
72
  set username(value: string | null | undefined);
70
- set password(value: Uint8Array);
71
- get sessionExpiryInterval(): number | undefined;
72
- set sessionExpiryInterval(value: number | null | undefined);
73
+ keepAlive: number;
73
74
  get receiveMaximum(): number | undefined;
74
75
  set receiveMaximum(value: number | null | undefined);
76
+ protocolVersion: number;
75
77
  get maximumPacketSize(): number | undefined;
76
78
  set maximumPacketSize(value: number | null | undefined);
77
79
  get topicAliasMaximum(): number | undefined;
78
80
  set topicAliasMaximum(value: number | null | undefined);
79
- get requestResponseInformation(): boolean | undefined;
80
- set requestResponseInformation(value: boolean | null | undefined);
81
- get requestProblemInformation(): boolean | undefined;
82
- set requestProblemInformation(value: boolean | null | undefined);
83
81
  get authenticationMethod(): string | undefined;
84
82
  set authenticationMethod(value: string | null | undefined);
83
+ get sessionExpiryInterval(): number | undefined;
84
+ set sessionExpiryInterval(value: number | null | undefined);
85
85
  set authenticationData(value: Uint8Array);
86
+ get requestProblemInformation(): boolean | undefined;
87
+ set requestProblemInformation(value: boolean | null | undefined);
88
+ get requestResponseInformation(): boolean | undefined;
89
+ set requestResponseInformation(value: boolean | null | undefined);
90
+ }
91
+
92
+ export class WasmMessageProperties {
93
+ private constructor();
94
+ free(): void;
95
+ [Symbol.dispose](): void;
96
+ getUserProperties(): Array<any>;
97
+ readonly contentType: string | undefined;
98
+ readonly responseTopic: string | undefined;
99
+ readonly correlationData: Uint8Array | undefined;
100
+ readonly messageExpiryInterval: number | undefined;
101
+ readonly payloadFormatIndicator: boolean | undefined;
102
+ readonly subscriptionIdentifiers: Uint32Array;
86
103
  }
87
104
 
88
105
  export class WasmMqttClient {
89
106
  free(): void;
90
107
  [Symbol.dispose](): void;
91
- constructor(client_id: string);
92
- connect(url: string): Promise<void>;
93
- connect_with_options(url: string, config: WasmConnectOptions): Promise<void>;
94
- connect_message_port(port: MessagePort): Promise<void>;
95
- connect_message_port_with_options(port: MessagePort, config: WasmConnectOptions): Promise<void>;
96
- connect_broadcast_channel(channel_name: string): Promise<void>;
97
- publish(topic: string, payload: Uint8Array): Promise<void>;
98
- publish_with_options(topic: string, payload: Uint8Array, options: WasmPublishOptions): Promise<void>;
108
+ disconnect(): Promise<void>;
109
+ on_connect(callback: Function): void;
110
+ unsubscribe(topic: string): Promise<number>;
111
+ is_connected(): boolean;
99
112
  publish_qos1(topic: string, payload: Uint8Array, callback: Function): Promise<number>;
100
113
  publish_qos2(topic: string, payload: Uint8Array, callback: Function): Promise<number>;
101
- subscribe(topic: string): Promise<number>;
114
+ respond_auth(auth_data: Uint8Array): Promise<void>;
115
+ on_disconnect(callback: Function): void;
116
+ on_auth_challenge(callback: Function): void;
117
+ connect_message_port(port: MessagePort): Promise<void>;
118
+ connect_with_options(url: string, config: WasmConnectOptions): Promise<void>;
119
+ publish_with_options(topic: string, payload: Uint8Array, options: WasmPublishOptions): Promise<void>;
102
120
  subscribe_with_options(topic: string, callback: Function, options: WasmSubscribeOptions): Promise<number>;
103
121
  subscribe_with_callback(topic: string, callback: Function): Promise<number>;
104
- unsubscribe(topic: string): Promise<number>;
105
- disconnect(): Promise<void>;
106
- is_connected(): boolean;
107
- on_connect(callback: Function): void;
108
- on_disconnect(callback: Function): void;
122
+ connect_broadcast_channel(channel_name: string): Promise<void>;
123
+ connect_message_port_with_options(port: MessagePort, config: WasmConnectOptions): Promise<void>;
124
+ constructor(client_id: string);
125
+ connect(url: string): Promise<void>;
126
+ publish(topic: string, payload: Uint8Array): Promise<void>;
109
127
  on_error(callback: Function): void;
110
- on_auth_challenge(callback: Function): void;
111
- respond_auth(auth_data: Uint8Array): Promise<void>;
128
+ subscribe(topic: string): Promise<number>;
112
129
  }
113
130
 
114
131
  export class WasmPublishOptions {
115
132
  free(): void;
116
133
  [Symbol.dispose](): void;
117
- constructor();
118
134
  addUserProperty(key: string, value: string): void;
119
135
  clearUserProperties(): void;
120
- qos: number;
136
+ constructor();
121
137
  retain: boolean;
122
- get payloadFormatIndicator(): boolean | undefined;
123
- set payloadFormatIndicator(value: boolean | null | undefined);
124
- get messageExpiryInterval(): number | undefined;
125
- set messageExpiryInterval(value: number | null | undefined);
126
138
  get topicAlias(): number | undefined;
127
139
  set topicAlias(value: number | null | undefined);
140
+ get contentType(): string | undefined;
141
+ set contentType(value: string | null | undefined);
128
142
  get responseTopic(): string | undefined;
129
143
  set responseTopic(value: string | null | undefined);
130
144
  set correlationData(value: Uint8Array);
131
- get contentType(): string | undefined;
132
- set contentType(value: string | null | undefined);
145
+ get messageExpiryInterval(): number | undefined;
146
+ set messageExpiryInterval(value: number | null | undefined);
147
+ get payloadFormatIndicator(): boolean | undefined;
148
+ set payloadFormatIndicator(value: boolean | null | undefined);
149
+ qos: number;
133
150
  }
134
151
 
135
152
  export class WasmSubscribeOptions {
136
153
  free(): void;
137
154
  [Symbol.dispose](): void;
138
155
  constructor();
139
- qos: number;
140
156
  noLocal: boolean;
141
- retainAsPublished: boolean;
142
157
  retainHandling: number;
158
+ retainAsPublished: boolean;
143
159
  get subscriptionIdentifier(): number | undefined;
144
160
  set subscriptionIdentifier(value: number | null | undefined);
161
+ qos: number;
145
162
  }
146
163
 
147
164
  export class WasmTopicMapping {
148
165
  free(): void;
149
166
  [Symbol.dispose](): void;
150
167
  constructor(pattern: string, direction: WasmBridgeDirection);
151
- set qos(value: number);
152
168
  set local_prefix(value: string | null | undefined);
153
169
  set remote_prefix(value: string | null | undefined);
170
+ set qos(value: number);
154
171
  }
155
172
 
156
173
  export class WasmWillMessage {
157
174
  free(): void;
158
175
  [Symbol.dispose](): void;
159
176
  constructor(topic: string, payload: Uint8Array);
160
- topic: string;
161
- qos: number;
162
177
  retain: boolean;
163
- get willDelayInterval(): number | undefined;
164
- set willDelayInterval(value: number | null | undefined);
165
- get messageExpiryInterval(): number | undefined;
166
- set messageExpiryInterval(value: number | null | undefined);
167
178
  get contentType(): string | undefined;
168
179
  set contentType(value: string | null | undefined);
169
180
  get responseTopic(): string | undefined;
170
181
  set responseTopic(value: string | null | undefined);
182
+ get willDelayInterval(): number | undefined;
183
+ set willDelayInterval(value: number | null | undefined);
184
+ get messageExpiryInterval(): number | undefined;
185
+ set messageExpiryInterval(value: number | null | undefined);
186
+ qos: number;
187
+ topic: string;
171
188
  }
172
189
 
173
190
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
174
191
 
175
192
  export interface InitOutput {
176
193
  readonly memory: WebAssembly.Memory;
177
- readonly __wbg_wasmtopicmapping_free: (a: number, b: number) => void;
178
- readonly wasmtopicmapping_new: (a: number, b: number, c: number) => number;
179
- readonly wasmtopicmapping_set_qos: (a: number, b: number) => void;
180
- readonly wasmtopicmapping_set_local_prefix: (a: number, b: number, c: number) => void;
181
- readonly wasmtopicmapping_set_remote_prefix: (a: number, b: number, c: number) => void;
182
194
  readonly __wbg_wasmbridgeconfig_free: (a: number, b: number) => void;
195
+ readonly __wbg_wasmbroker_free: (a: number, b: number) => void;
196
+ readonly __wbg_wasmbrokerconfig_free: (a: number, b: number) => void;
197
+ readonly __wbg_wasmconnectoptions_free: (a: number, b: number) => void;
198
+ readonly __wbg_wasmmessageproperties_free: (a: number, b: number) => void;
199
+ readonly __wbg_wasmmqttclient_free: (a: number, b: number) => void;
200
+ readonly __wbg_wasmpublishoptions_free: (a: number, b: number) => void;
201
+ readonly __wbg_wasmsubscribeoptions_free: (a: number, b: number) => void;
202
+ readonly __wbg_wasmtopicmapping_free: (a: number, b: number) => void;
203
+ readonly __wbg_wasmwillmessage_free: (a: number, b: number) => void;
204
+ readonly wasmbridgeconfig_add_topic: (a: number, b: number) => void;
183
205
  readonly wasmbridgeconfig_new: (a: number, b: number) => number;
184
- readonly wasmbridgeconfig_set_client_id: (a: number, b: number, c: number) => void;
185
206
  readonly wasmbridgeconfig_set_clean_start: (a: number, b: number) => void;
207
+ readonly wasmbridgeconfig_set_client_id: (a: number, b: number, c: number) => void;
186
208
  readonly wasmbridgeconfig_set_keep_alive_secs: (a: number, b: number) => void;
187
- readonly wasmbridgeconfig_set_username: (a: number, b: number, c: number) => void;
188
209
  readonly wasmbridgeconfig_set_password: (a: number, b: number, c: number) => void;
189
- readonly wasmbridgeconfig_add_topic: (a: number, b: number) => void;
210
+ readonly wasmbridgeconfig_set_username: (a: number, b: number, c: number) => void;
190
211
  readonly wasmbridgeconfig_validate: (a: number) => [number, number];
191
- readonly __wbg_wasmbrokerconfig_free: (a: number, b: number) => void;
192
- readonly wasmbrokerconfig_new: () => number;
193
- readonly wasmbrokerconfig_set_max_clients: (a: number, b: number) => void;
194
- readonly wasmbrokerconfig_set_session_expiry_interval_secs: (a: number, b: number) => void;
195
- readonly wasmbrokerconfig_set_max_packet_size: (a: number, b: number) => void;
196
- readonly wasmbrokerconfig_set_topic_alias_maximum: (a: number, b: number) => void;
197
- readonly wasmbrokerconfig_set_retain_available: (a: number, b: number) => void;
198
- readonly wasmbrokerconfig_set_maximum_qos: (a: number, b: number) => void;
199
- readonly wasmbrokerconfig_set_wildcard_subscription_available: (a: number, b: number) => void;
200
- readonly wasmbrokerconfig_set_subscription_identifier_available: (a: number, b: number) => void;
201
- readonly wasmbrokerconfig_set_shared_subscription_available: (a: number, b: number) => void;
202
- readonly wasmbrokerconfig_set_server_keep_alive_secs: (a: number, b: number) => void;
203
- readonly __wbg_wasmbroker_free: (a: number, b: number) => void;
204
- readonly wasmbroker_new: () => [number, number, number];
205
- readonly wasmbroker_with_config: (a: number) => [number, number, number];
212
+ readonly wasmbroker_acl_rule_count: (a: number) => any;
213
+ readonly wasmbroker_add_acl_rule: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
214
+ readonly wasmbroker_add_bridge: (a: number, b: number, c: any) => any;
206
215
  readonly wasmbroker_add_user: (a: number, b: number, c: number, d: number, e: number) => any;
207
216
  readonly wasmbroker_add_user_with_hash: (a: number, b: number, c: number, d: number, e: number) => any;
208
- readonly wasmbroker_remove_user: (a: number, b: number, c: number) => any;
217
+ readonly wasmbroker_clear_acl_rules: (a: number) => any;
218
+ readonly wasmbroker_create_client_port: (a: number) => [number, number, number];
209
219
  readonly wasmbroker_has_user: (a: number, b: number, c: number) => any;
210
- readonly wasmbroker_user_count: (a: number) => any;
211
- readonly wasmbroker_set_allow_anonymous: (a: number, b: number) => void;
212
220
  readonly wasmbroker_hash_password: (a: number, b: number) => [number, number, number, number];
213
- readonly wasmbroker_create_client_port: (a: number) => [number, number, number];
214
- readonly wasmbroker_add_bridge: (a: number, b: number, c: any) => any;
215
- readonly wasmbroker_remove_bridge: (a: number, b: number, c: number) => any;
216
221
  readonly wasmbroker_list_bridges: (a: number) => [number, number];
222
+ readonly wasmbroker_new: () => [number, number, number];
223
+ readonly wasmbroker_remove_bridge: (a: number, b: number, c: number) => any;
224
+ readonly wasmbroker_remove_user: (a: number, b: number, c: number) => any;
217
225
  readonly wasmbroker_stop_all_bridges: (a: number) => any;
218
- readonly __wbg_wasmmqttclient_free: (a: number, b: number) => void;
219
- readonly wasmmqttclient_new: (a: number, b: number) => number;
226
+ readonly wasmbroker_user_count: (a: number) => any;
227
+ readonly wasmbroker_with_config: (a: number) => [number, number, number];
228
+ readonly wasmbrokerconfig_new: () => number;
229
+ readonly wasmbrokerconfig_set_allow_anonymous: (a: number, b: number) => void;
230
+ readonly wasmbrokerconfig_set_max_clients: (a: number, b: number) => void;
231
+ readonly wasmbrokerconfig_set_max_packet_size: (a: number, b: number) => void;
232
+ readonly wasmbrokerconfig_set_maximum_qos: (a: number, b: number) => void;
233
+ readonly wasmbrokerconfig_set_retain_available: (a: number, b: number) => void;
234
+ readonly wasmbrokerconfig_set_server_keep_alive_secs: (a: number, b: number) => void;
235
+ readonly wasmbrokerconfig_set_session_expiry_interval_secs: (a: number, b: number) => void;
236
+ readonly wasmbrokerconfig_set_shared_subscription_available: (a: number, b: number) => void;
237
+ readonly wasmbrokerconfig_set_subscription_identifier_available: (a: number, b: number) => void;
238
+ readonly wasmbrokerconfig_set_topic_alias_maximum: (a: number, b: number) => void;
239
+ readonly wasmbrokerconfig_set_wildcard_subscription_available: (a: number, b: number) => void;
240
+ readonly wasmconnectoptions_addUserProperty: (a: number, b: number, c: number, d: number, e: number) => void;
241
+ readonly wasmconnectoptions_authenticationMethod: (a: number) => [number, number];
242
+ readonly wasmconnectoptions_cleanStart: (a: number) => number;
243
+ readonly wasmconnectoptions_clearUserProperties: (a: number) => void;
244
+ readonly wasmconnectoptions_clear_will: (a: number) => void;
245
+ readonly wasmconnectoptions_keepAlive: (a: number) => number;
246
+ readonly wasmconnectoptions_maximumPacketSize: (a: number) => number;
247
+ readonly wasmconnectoptions_new: () => number;
248
+ readonly wasmconnectoptions_protocolVersion: (a: number) => number;
249
+ readonly wasmconnectoptions_receiveMaximum: (a: number) => number;
250
+ readonly wasmconnectoptions_requestProblemInformation: (a: number) => number;
251
+ readonly wasmconnectoptions_requestResponseInformation: (a: number) => number;
252
+ readonly wasmconnectoptions_sessionExpiryInterval: (a: number) => number;
253
+ readonly wasmconnectoptions_set_authenticationData: (a: number, b: number, c: number) => void;
254
+ readonly wasmconnectoptions_set_authenticationMethod: (a: number, b: number, c: number) => void;
255
+ readonly wasmconnectoptions_set_cleanStart: (a: number, b: number) => void;
256
+ readonly wasmconnectoptions_set_keepAlive: (a: number, b: number) => void;
257
+ readonly wasmconnectoptions_set_maximumPacketSize: (a: number, b: number) => void;
258
+ readonly wasmconnectoptions_set_password: (a: number, b: number, c: number) => void;
259
+ readonly wasmconnectoptions_set_protocolVersion: (a: number, b: number) => void;
260
+ readonly wasmconnectoptions_set_receiveMaximum: (a: number, b: number) => void;
261
+ readonly wasmconnectoptions_set_requestProblemInformation: (a: number, b: number) => void;
262
+ readonly wasmconnectoptions_set_requestResponseInformation: (a: number, b: number) => void;
263
+ readonly wasmconnectoptions_set_topicAliasMaximum: (a: number, b: number) => void;
264
+ readonly wasmconnectoptions_set_username: (a: number, b: number, c: number) => void;
265
+ readonly wasmconnectoptions_set_will: (a: number, b: number) => void;
266
+ readonly wasmconnectoptions_topicAliasMaximum: (a: number) => number;
267
+ readonly wasmconnectoptions_username: (a: number) => [number, number];
268
+ readonly wasmmessageproperties_contentType: (a: number) => [number, number];
269
+ readonly wasmmessageproperties_correlationData: (a: number) => [number, number];
270
+ readonly wasmmessageproperties_getUserProperties: (a: number) => any;
271
+ readonly wasmmessageproperties_payloadFormatIndicator: (a: number) => number;
272
+ readonly wasmmessageproperties_responseTopic: (a: number) => [number, number];
273
+ readonly wasmmessageproperties_subscriptionIdentifiers: (a: number) => [number, number];
220
274
  readonly wasmmqttclient_connect: (a: number, b: number, c: number) => any;
221
- readonly wasmmqttclient_connect_with_options: (a: number, b: number, c: number, d: number) => any;
275
+ readonly wasmmqttclient_connect_broadcast_channel: (a: number, b: number, c: number) => any;
222
276
  readonly wasmmqttclient_connect_message_port: (a: number, b: any) => any;
223
277
  readonly wasmmqttclient_connect_message_port_with_options: (a: number, b: any, c: number) => any;
224
- readonly wasmmqttclient_connect_broadcast_channel: (a: number, b: number, c: number) => any;
225
- readonly wasmmqttclient_publish: (a: number, b: number, c: number, d: number, e: number) => any;
226
- readonly wasmmqttclient_publish_with_options: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
227
- readonly wasmmqttclient_publish_qos1: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
228
- readonly wasmmqttclient_publish_qos2: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
229
- readonly wasmmqttclient_subscribe: (a: number, b: number, c: number) => any;
230
- readonly wasmmqttclient_subscribe_with_options: (a: number, b: number, c: number, d: any, e: number) => any;
231
- readonly wasmmqttclient_subscribe_with_callback: (a: number, b: number, c: number, d: any) => any;
232
- readonly wasmmqttclient_unsubscribe: (a: number, b: number, c: number) => any;
278
+ readonly wasmmqttclient_connect_with_options: (a: number, b: number, c: number, d: number) => any;
233
279
  readonly wasmmqttclient_disconnect: (a: number) => any;
234
280
  readonly wasmmqttclient_is_connected: (a: number) => number;
281
+ readonly wasmmqttclient_new: (a: number, b: number) => number;
282
+ readonly wasmmqttclient_on_auth_challenge: (a: number, b: any) => void;
235
283
  readonly wasmmqttclient_on_connect: (a: number, b: any) => void;
236
284
  readonly wasmmqttclient_on_disconnect: (a: number, b: any) => void;
237
285
  readonly wasmmqttclient_on_error: (a: number, b: any) => void;
238
- readonly wasmmqttclient_on_auth_challenge: (a: number, b: any) => void;
286
+ readonly wasmmqttclient_publish: (a: number, b: number, c: number, d: number, e: number) => any;
287
+ readonly wasmmqttclient_publish_qos1: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
288
+ readonly wasmmqttclient_publish_qos2: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
289
+ readonly wasmmqttclient_publish_with_options: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
239
290
  readonly wasmmqttclient_respond_auth: (a: number, b: number, c: number) => any;
240
- readonly __wbg_wasmconnectoptions_free: (a: number, b: number) => void;
241
- readonly wasmconnectoptions_new: () => number;
242
- readonly wasmconnectoptions_keepAlive: (a: number) => number;
243
- readonly wasmconnectoptions_set_keepAlive: (a: number, b: number) => void;
244
- readonly wasmconnectoptions_cleanStart: (a: number) => number;
245
- readonly wasmconnectoptions_set_cleanStart: (a: number, b: number) => void;
246
- readonly wasmconnectoptions_username: (a: number) => [number, number];
247
- readonly wasmconnectoptions_set_username: (a: number, b: number, c: number) => void;
248
- readonly wasmconnectoptions_set_password: (a: number, b: number, c: number) => void;
249
- readonly wasmconnectoptions_set_will: (a: number, b: number) => void;
250
- readonly wasmconnectoptions_clear_will: (a: number) => void;
251
- readonly wasmconnectoptions_sessionExpiryInterval: (a: number) => number;
252
- readonly wasmconnectoptions_receiveMaximum: (a: number) => number;
253
- readonly wasmconnectoptions_set_receiveMaximum: (a: number, b: number) => void;
254
- readonly wasmconnectoptions_maximumPacketSize: (a: number) => number;
255
- readonly wasmconnectoptions_set_maximumPacketSize: (a: number, b: number) => void;
256
- readonly wasmconnectoptions_topicAliasMaximum: (a: number) => number;
257
- readonly wasmconnectoptions_set_topicAliasMaximum: (a: number, b: number) => void;
258
- readonly wasmconnectoptions_requestResponseInformation: (a: number) => number;
259
- readonly wasmconnectoptions_set_requestResponseInformation: (a: number, b: number) => void;
260
- readonly wasmconnectoptions_requestProblemInformation: (a: number) => number;
261
- readonly wasmconnectoptions_set_requestProblemInformation: (a: number, b: number) => void;
262
- readonly wasmconnectoptions_authenticationMethod: (a: number) => [number, number];
263
- readonly wasmconnectoptions_set_authenticationMethod: (a: number, b: number, c: number) => void;
264
- readonly wasmconnectoptions_set_authenticationData: (a: number, b: number, c: number) => void;
265
- readonly wasmconnectoptions_addUserProperty: (a: number, b: number, c: number, d: number, e: number) => void;
266
- readonly wasmconnectoptions_clearUserProperties: (a: number) => void;
267
- readonly __wbg_wasmpublishoptions_free: (a: number, b: number) => void;
291
+ readonly wasmmqttclient_subscribe: (a: number, b: number, c: number) => any;
292
+ readonly wasmmqttclient_subscribe_with_callback: (a: number, b: number, c: number, d: any) => any;
293
+ readonly wasmmqttclient_subscribe_with_options: (a: number, b: number, c: number, d: any, e: number) => any;
294
+ readonly wasmmqttclient_unsubscribe: (a: number, b: number, c: number) => any;
295
+ readonly wasmpublishoptions_addUserProperty: (a: number, b: number, c: number, d: number, e: number) => void;
296
+ readonly wasmpublishoptions_clearUserProperties: (a: number) => void;
297
+ readonly wasmpublishoptions_contentType: (a: number) => [number, number];
268
298
  readonly wasmpublishoptions_new: () => number;
299
+ readonly wasmpublishoptions_payloadFormatIndicator: (a: number) => number;
269
300
  readonly wasmpublishoptions_qos: (a: number) => number;
270
- readonly wasmpublishoptions_set_qos: (a: number, b: number) => void;
301
+ readonly wasmpublishoptions_responseTopic: (a: number) => [number, number];
271
302
  readonly wasmpublishoptions_retain: (a: number) => number;
272
- readonly wasmpublishoptions_set_retain: (a: number, b: number) => void;
273
- readonly wasmpublishoptions_payloadFormatIndicator: (a: number) => number;
303
+ readonly wasmpublishoptions_set_contentType: (a: number, b: number, c: number) => void;
304
+ readonly wasmpublishoptions_set_correlationData: (a: number, b: number, c: number) => void;
274
305
  readonly wasmpublishoptions_set_payloadFormatIndicator: (a: number, b: number) => void;
275
- readonly wasmpublishoptions_topicAlias: (a: number) => number;
276
- readonly wasmpublishoptions_set_topicAlias: (a: number, b: number) => void;
277
- readonly wasmpublishoptions_responseTopic: (a: number) => [number, number];
306
+ readonly wasmpublishoptions_set_qos: (a: number, b: number) => void;
278
307
  readonly wasmpublishoptions_set_responseTopic: (a: number, b: number, c: number) => void;
279
- readonly wasmpublishoptions_set_correlationData: (a: number, b: number, c: number) => void;
280
- readonly wasmpublishoptions_contentType: (a: number) => [number, number];
281
- readonly wasmpublishoptions_set_contentType: (a: number, b: number, c: number) => void;
282
- readonly wasmpublishoptions_addUserProperty: (a: number, b: number, c: number, d: number, e: number) => void;
283
- readonly wasmpublishoptions_clearUserProperties: (a: number) => void;
284
- readonly __wbg_wasmsubscribeoptions_free: (a: number, b: number) => void;
308
+ readonly wasmpublishoptions_set_retain: (a: number, b: number) => void;
309
+ readonly wasmpublishoptions_set_topicAlias: (a: number, b: number) => void;
310
+ readonly wasmpublishoptions_topicAlias: (a: number) => number;
285
311
  readonly wasmsubscribeoptions_new: () => number;
286
- readonly wasmsubscribeoptions_qos: (a: number) => number;
287
- readonly wasmsubscribeoptions_set_qos: (a: number, b: number) => void;
288
312
  readonly wasmsubscribeoptions_noLocal: (a: number) => number;
289
- readonly wasmsubscribeoptions_set_noLocal: (a: number, b: number) => void;
313
+ readonly wasmsubscribeoptions_qos: (a: number) => number;
290
314
  readonly wasmsubscribeoptions_retainAsPublished: (a: number) => number;
291
- readonly wasmsubscribeoptions_set_retainAsPublished: (a: number, b: number) => void;
292
315
  readonly wasmsubscribeoptions_retainHandling: (a: number) => number;
316
+ readonly wasmsubscribeoptions_set_noLocal: (a: number, b: number) => void;
317
+ readonly wasmsubscribeoptions_set_qos: (a: number, b: number) => void;
318
+ readonly wasmsubscribeoptions_set_retainAsPublished: (a: number, b: number) => void;
293
319
  readonly wasmsubscribeoptions_set_retainHandling: (a: number, b: number) => void;
294
- readonly __wbg_wasmwillmessage_free: (a: number, b: number) => void;
320
+ readonly wasmtopicmapping_new: (a: number, b: number, c: number) => number;
321
+ readonly wasmtopicmapping_set_local_prefix: (a: number, b: number, c: number) => void;
322
+ readonly wasmtopicmapping_set_qos: (a: number, b: number) => void;
323
+ readonly wasmtopicmapping_set_remote_prefix: (a: number, b: number, c: number) => void;
324
+ readonly wasmwillmessage_contentType: (a: number) => [number, number];
295
325
  readonly wasmwillmessage_new: (a: number, b: number, c: number, d: number) => number;
296
- readonly wasmwillmessage_topic: (a: number) => [number, number];
297
- readonly wasmwillmessage_set_topic: (a: number, b: number, c: number) => void;
298
326
  readonly wasmwillmessage_qos: (a: number) => number;
299
- readonly wasmwillmessage_set_qos: (a: number, b: number) => void;
327
+ readonly wasmwillmessage_responseTopic: (a: number) => [number, number];
300
328
  readonly wasmwillmessage_retain: (a: number) => number;
301
- readonly wasmwillmessage_set_retain: (a: number, b: number) => void;
302
- readonly wasmwillmessage_contentType: (a: number) => [number, number];
303
329
  readonly wasmwillmessage_set_contentType: (a: number, b: number, c: number) => void;
304
- readonly wasmwillmessage_responseTopic: (a: number) => [number, number];
330
+ readonly wasmwillmessage_set_qos: (a: number, b: number) => void;
305
331
  readonly wasmwillmessage_set_responseTopic: (a: number, b: number, c: number) => void;
332
+ readonly wasmwillmessage_set_retain: (a: number, b: number) => void;
333
+ readonly wasmwillmessage_set_topic: (a: number, b: number, c: number) => void;
334
+ readonly wasmwillmessage_topic: (a: number) => [number, number];
335
+ readonly wasmmessageproperties_messageExpiryInterval: (a: number) => number;
336
+ readonly wasmpublishoptions_messageExpiryInterval: (a: number) => number;
337
+ readonly wasmsubscribeoptions_subscriptionIdentifier: (a: number) => number;
338
+ readonly wasmwillmessage_messageExpiryInterval: (a: number) => number;
339
+ readonly wasmwillmessage_willDelayInterval: (a: number) => number;
306
340
  readonly wasmconnectoptions_set_sessionExpiryInterval: (a: number, b: number) => void;
307
341
  readonly wasmpublishoptions_set_messageExpiryInterval: (a: number, b: number) => void;
308
342
  readonly wasmsubscribeoptions_set_subscriptionIdentifier: (a: number, b: number) => void;
309
343
  readonly wasmwillmessage_set_willDelayInterval: (a: number, b: number) => void;
310
- readonly wasmpublishoptions_messageExpiryInterval: (a: number) => number;
311
- readonly wasmsubscribeoptions_subscriptionIdentifier: (a: number) => number;
312
- readonly wasmwillmessage_willDelayInterval: (a: number) => number;
313
- readonly wasmwillmessage_messageExpiryInterval: (a: number) => number;
314
344
  readonly wasmwillmessage_set_messageExpiryInterval: (a: number, b: number) => void;
315
- readonly wasm_bindgen__convert__closures_____invoke__h28af81100ba72912: (a: number, b: number, c: any) => void;
316
- readonly wasm_bindgen__closure__destroy__h37234bac070c7b88: (a: number, b: number) => void;
317
- readonly wasm_bindgen__convert__closures_____invoke__hf8b807ed3211f368: (a: number, b: number) => void;
318
- readonly wasm_bindgen__closure__destroy__h41d50b86eff9c0fb: (a: number, b: number) => void;
319
- readonly wasm_bindgen__convert__closures_____invoke__ha8b0b9fe7fac12a4: (a: number, b: number, c: any) => void;
320
- readonly wasm_bindgen__closure__destroy__h60ca8c1f3f61ef16: (a: number, b: number) => void;
321
- readonly wasm_bindgen__convert__closures_____invoke__h22971f3c49e1e8f1: (a: number, b: number, c: any, d: any) => void;
345
+ readonly wasm_bindgen__convert__closures_____invoke__h01763d79c10fe65e: (a: number, b: number, c: any) => void;
346
+ readonly wasm_bindgen__closure__destroy__h21a697eaf8c5d6e0: (a: number, b: number) => void;
347
+ readonly wasm_bindgen__convert__closures_____invoke__hf9723d0014506a5b: (a: number, b: number) => void;
348
+ readonly wasm_bindgen__closure__destroy__he9d43d9a42a0e056: (a: number, b: number) => void;
349
+ readonly wasm_bindgen__convert__closures_____invoke__ha9d3e198cd0951b0: (a: number, b: number, c: any) => void;
350
+ readonly wasm_bindgen__closure__destroy__h849099dfd9acf928: (a: number, b: number) => void;
351
+ readonly wasm_bindgen__convert__closures_____invoke__h1ee277075b103ebf: (a: number, b: number, c: any, d: any) => void;
322
352
  readonly __wbindgen_malloc: (a: number, b: number) => number;
323
353
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
324
354
  readonly __wbindgen_exn_store: (a: number) => void;