@oxidezap/whatsapp-rust-bridge 0.20.0 → 0.21.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/dist/proto.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { UnpairedSurrogateError } from "./proto-reader";
1
+ import { UnpairedSurrogateError } from "./proto-reader.js";
2
2
  export { UnpairedSurrogateError };
3
3
  /**
4
4
  * Encode `obj` as `typeName`.
@@ -133,7 +133,7 @@ export interface ArchiveUpdate {
133
133
  /** The chat being archived or unarchived. */
134
134
  jid: Jid;
135
135
  timestamp: string;
136
- action: import('./proto-types').proto.SyncActionValue.IArchiveChatAction;
136
+ action: import('./proto-types.js').proto.SyncActionValue.IArchiveChatAction;
137
137
  from_full_sync: boolean;
138
138
  }
139
139
 
@@ -210,10 +210,11 @@ export interface CachedNoiseCert {
210
210
  not_after: number | string;
211
211
  }
212
212
 
213
- /** Cached form of the server's two-cert chain. `leaf.key` is the server static public key consumed by Noise IK; the intermediate is kept solely to mirror WA Web's expiry checks. */
213
+ /** Cached form of the server's two-cert chain. `leaf.key` is the server static public key consumed by Noise IK; the intermediate is kept solely to mirror WA Web's expiry checks. `signature_verified` records that both XEdDSA signatures were actually checked when this chain was cached. Only such chains may authorize IK. Records written before this field existed deserialize it as `false` and fall back to one XX, which then stores a verified chain. This is upgrade hygiene, not tamper-proofing: the storage backend remains the trust boundary, and a backend that rewrites this flag can already rewrite the keys it guards. */
214
214
  export interface CachedServerCertChain {
215
215
  intermediate: CachedNoiseCert;
216
216
  leaf: CachedNoiseCert;
217
+ signature_verified: boolean;
217
218
  }
218
219
 
219
220
  /** Fields kept per-variant (not a shared `BasicCallMeta`) so the `serde` shape mirrors the stanza 1:1 for downstream JS consumers. */
@@ -289,7 +290,7 @@ export interface CallLogSync {
289
290
  from_me: boolean;
290
291
  /** When the mutation was written, not when the call happened — the call's own time is `record.start_time`. This is the field WA Web measures against the pairing timestamp to decide whether a record predates the device, so it is worth having; it is not a time to file the call under. A mutation that arrives without one falls back to the moment it was received, as every other app-state event does. */
291
292
  timestamp: string;
292
- record: import('./proto-types').proto.ICallLogRecord;
293
+ record: import('./proto-types.js').proto.ICallLogRecord;
293
294
  from_full_sync: boolean;
294
295
  }
295
296
 
@@ -330,7 +331,7 @@ export interface ClearChatUpdate {
330
331
  /** From the index, not the proto. */
331
332
  delete_media: boolean;
332
333
  timestamp: string;
333
- action: import('./proto-types').proto.SyncActionValue.IClearChatAction;
334
+ action: import('./proto-types.js').proto.SyncActionValue.IClearChatAction;
334
335
  from_full_sync: boolean;
335
336
  }
336
337
 
@@ -396,7 +397,7 @@ export interface ContactUpdate {
396
397
  /** The chat/contact this sync action applies to. */
397
398
  jid: Jid;
398
399
  timestamp: string;
399
- action: import('./proto-types').proto.SyncActionValue.IContactAction;
400
+ action: import('./proto-types.js').proto.SyncActionValue.IContactAction;
400
401
  from_full_sync: boolean;
401
402
  }
402
403
 
@@ -432,7 +433,7 @@ export interface DeleteChatUpdate {
432
433
  /** From the index, not the proto — DeleteChatAction only has messageRange. */
433
434
  delete_media: boolean;
434
435
  timestamp: string;
435
- action: import('./proto-types').proto.SyncActionValue.IDeleteChatAction;
436
+ action: import('./proto-types.js').proto.SyncActionValue.IDeleteChatAction;
436
437
  from_full_sync: boolean;
437
438
  }
438
439
 
@@ -443,7 +444,7 @@ export interface DeleteMessageForMeUpdate {
443
444
  message_id: string;
444
445
  from_me: boolean;
445
446
  timestamp: string;
446
- action: import('./proto-types').proto.SyncActionValue.IDeleteMessageForMeAction;
447
+ action: import('./proto-types.js').proto.SyncActionValue.IDeleteMessageForMeAction;
447
448
  from_full_sync: boolean;
448
449
  }
449
450
 
@@ -457,7 +458,7 @@ export interface Device {
457
458
  signed_pre_key_id: number;
458
459
  signed_pre_key_signature: Uint8Array;
459
460
  adv_secret_key: Uint8Array;
460
- account?: import('./proto-types').proto.IADVSignedDeviceIdentity | null;
461
+ account?: import('./proto-types.js').proto.IADVSignedDeviceIdentity | null;
461
462
  push_name: string;
462
463
  app_version_primary: number;
463
464
  app_version_secondary: number;
@@ -475,7 +476,7 @@ export interface Device {
475
476
  server_has_prekeys: boolean;
476
477
  /** NCT salt provisioned by the server via app state sync or history sync. */
477
478
  nct_salt?: Uint8Array | null;
478
- /** Server cert chain cached from the last successful XX (or XX-fallback) handshake. Enables Noise IK on the next connect by exposing `leaf.key` as the server's static public key, and lets us reject stale entries via `not_after` before even attempting IK. `None` forces XX on the next connect. */
479
+ /** Server cert chain cached from the last successful XX (or XX-fallback) handshake. Enables Noise IK on the next connect by exposing `leaf.key` as the server's static public key, and lets us reject stale entries via `not_after` before even attempting IK. Only chains whose signatures were checked (`signature_verified`) authorize IK; `None` — or an unmarked legacy record — forces XX on the next connect. */
479
480
  server_cert_chain?: CachedServerCertChain | null;
480
481
  /** Login counter sent as `ClientPayload.lc` on every login. WA Web's `WAWebUserPrefsGeneral.getLoginCounter()` reads (and bumps) this from localStorage on each connect; the server uses it as an anti-abuse signal. Persisted so it survives restarts. */
481
482
  login_counter: number;
@@ -595,7 +596,7 @@ export interface DisableLinkPreviewsUpdate {
595
596
  /** `true` when link previews are now disabled. Only emitted when the wire carried the flag; WA Web treats an absent one as a malformed mutation. */
596
597
  previews_disabled: boolean;
597
598
  timestamp: string;
598
- action: import('./proto-types').proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction;
599
+ action: import('./proto-types.js').proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction;
599
600
  from_full_sync: boolean;
600
601
  }
601
602
 
@@ -842,12 +843,12 @@ export interface IdentityChange {
842
843
 
843
844
  /** One decrypted inbound message. The same items (and order) back both consumer surfaces: the durability hook's batch and [`Event::Messages`]. */
844
845
  export interface InboundMessage {
845
- message: import('./proto-types').proto.IMessage;
846
+ message: import('./proto-types.js').proto.IMessage;
846
847
  info: MessageInfo;
847
848
  /** Ephemeral duration in seconds, from the decrypted message's `contextInfo.expiration`. Lives here rather than on `info` because it is only known after decryption, and `info` is shared with every `<enc>` of the stanza by then: writing it there cost a deep copy of the whole `MessageInfo` on every disappearing-chat message. */
848
849
  ephemeral_expiration?: number | null;
849
850
  /** Parent post key when `message` is a decrypted CAG channel comment (`enc_comment_message`). The inner `Message` proto has no slot for the threading link, so it surfaces here. Boxed: rare. */
850
- comment_target?: import('./proto-types').proto.IMessageKey | null;
851
+ comment_target?: import('./proto-types.js').proto.IMessageKey | null;
851
852
  }
852
853
 
853
854
  export interface IncomingCall {
@@ -891,7 +892,7 @@ export interface LabelAssociationUpdate {
891
892
  /** The chat the label was associated with or removed from. */
892
893
  chat_jid: Jid;
893
894
  timestamp: string;
894
- action: import('./proto-types').proto.SyncActionValue.ILabelAssociationAction;
895
+ action: import('./proto-types.js').proto.SyncActionValue.ILabelAssociationAction;
895
896
  from_full_sync: boolean;
896
897
  }
897
898
 
@@ -900,7 +901,7 @@ export interface LabelEditUpdate {
900
901
  /** The label identifier (the index key, not a JID). */
901
902
  label_id: string;
902
903
  timestamp: string;
903
- action: import('./proto-types').proto.SyncActionValue.ILabelEditAction;
904
+ action: import('./proto-types.js').proto.SyncActionValue.ILabelEditAction;
904
905
  from_full_sync: boolean;
905
906
  }
906
907
 
@@ -954,7 +955,7 @@ export interface MarkChatAsReadUpdate {
954
955
  /** The chat being marked as read or unread. */
955
956
  jid: Jid;
956
957
  timestamp: string;
957
- action: import('./proto-types').proto.SyncActionValue.IMarkChatAsReadAction;
958
+ action: import('./proto-types.js').proto.SyncActionValue.IMarkChatAsReadAction;
958
959
  from_full_sync: boolean;
959
960
  }
960
961
 
@@ -1024,7 +1025,7 @@ export interface MessageLabelAssociationUpdate {
1024
1025
  /** The labelled message's id. */
1025
1026
  message_id: string;
1026
1027
  timestamp: string;
1027
- action: import('./proto-types').proto.SyncActionValue.ILabelAssociationAction;
1028
+ action: import('./proto-types.js').proto.SyncActionValue.ILabelAssociationAction;
1028
1029
  from_full_sync: boolean;
1029
1030
  }
1030
1031
 
@@ -1130,7 +1131,7 @@ export interface MuteUpdate {
1130
1131
  /** The chat being muted or unmuted. */
1131
1132
  jid: Jid;
1132
1133
  timestamp: string;
1133
- action: import('./proto-types').proto.SyncActionValue.IMuteAction;
1134
+ action: import('./proto-types.js').proto.SyncActionValue.IMuteAction;
1134
1135
  from_full_sync: boolean;
1135
1136
  }
1136
1137
 
@@ -1188,8 +1189,8 @@ export interface OfflineSyncPreview {
1188
1189
  export type PairCodeRejection = number;
1189
1190
 
1190
1191
  export interface PairError {
1191
- id: Jid;
1192
- lid: Jid;
1192
+ id: string;
1193
+ lid: string;
1193
1194
  business_name: string;
1194
1195
  platform: string;
1195
1196
  error: string;
@@ -1214,8 +1215,8 @@ export interface PairPasskeyRequest {
1214
1215
  }
1215
1216
 
1216
1217
  export interface PairSuccess {
1217
- id: Jid;
1218
- lid: Jid;
1218
+ id: string;
1219
+ lid: string;
1219
1220
  business_name: string;
1220
1221
  platform: string;
1221
1222
  }
@@ -1277,7 +1278,7 @@ export interface PinUpdate {
1277
1278
  /** The chat being pinned or unpinned. */
1278
1279
  jid: Jid;
1279
1280
  timestamp: string;
1280
- action: import('./proto-types').proto.SyncActionValue.IPinAction;
1281
+ action: import('./proto-types.js').proto.SyncActionValue.IPinAction;
1281
1282
  from_full_sync: boolean;
1282
1283
  }
1283
1284
 
@@ -1314,7 +1315,7 @@ export interface QuickReplyUpdate {
1314
1315
  /** The quick reply's identifier (the index key, not a JID). */
1315
1316
  id: string;
1316
1317
  timestamp: string;
1317
- action: import('./proto-types').proto.SyncActionValue.IQuickReplyAction;
1318
+ action: import('./proto-types.js').proto.SyncActionValue.IQuickReplyAction;
1318
1319
  from_full_sync: boolean;
1319
1320
  }
1320
1321
 
@@ -1408,7 +1409,7 @@ export interface StarUpdate {
1408
1409
  message_id: string;
1409
1410
  from_me: boolean;
1410
1411
  timestamp: string;
1411
- action: import('./proto-types').proto.SyncActionValue.IStarAction;
1412
+ action: import('./proto-types.js').proto.SyncActionValue.IStarAction;
1412
1413
  from_full_sync: boolean;
1413
1414
  }
1414
1415
 
@@ -1468,7 +1469,7 @@ export interface UserStatusMuteUpdate {
1468
1469
  /** `true` = status muted, `false` = unmuted. */
1469
1470
  muted: boolean;
1470
1471
  timestamp: string;
1471
- action: import('./proto-types').proto.SyncActionValue.IUserStatusMuteAction;
1472
+ action: import('./proto-types.js').proto.SyncActionValue.IUserStatusMuteAction;
1472
1473
  from_full_sync: boolean;
1473
1474
  }
1474
1475
 
@@ -1961,6 +1962,11 @@ export function initWasmEngine(logger?: any, crypto?: JsCryptoCallbacks): void;
1961
1962
  * @param wanted_pre_key_count Optional pre-key upload batch size (default 812);
1962
1963
  * clamped to the protocol-safe range at upload time. Smaller batches reduce
1963
1964
  * memory pressure on embedded/WASM hosts.
1965
+ * @param danger_skip_cert_chain_verify Optional testing-only bypass for the
1966
+ * Noise server-cert XEdDSA check, for mock servers that cannot sign a chain
1967
+ * rooted in WhatsApp's issuer. Absent, null or false keeps strict
1968
+ * verification; only an explicit `true` opts in. Anything else rejects the
1969
+ * construction as invalid-argument.
1964
1970
  */
1965
1971
  export function createWhatsAppClient(
1966
1972
  transport_config: JsTransportCallbacks,
@@ -1970,6 +1976,7 @@ store?: JsStoreCallbacks | null,
1970
1976
  cache_config?: CacheConfig | null,
1971
1977
  version?: readonly [number, number, number] | null,
1972
1978
  wanted_pre_key_count?: number | null,
1979
+ danger_skip_cert_chain_verify?: boolean | null,
1973
1980
  ): Promise<WasmWhatsAppClient>;
1974
1981
 
1975
1982
  /** Cache entry configuration. */
@@ -3071,6 +3078,12 @@ export interface SignalSignedPreKeyInput {
3071
3078
  signature: Uint8Array;
3072
3079
  }
3073
3080
 
3081
+ /**
3082
+ * Terminal protocol cause the reader captured before its expected-disconnect
3083
+ * flag suppressed the transport outcome.
3084
+ */
3085
+ export type ProtocolTerminalReasonResult = { kind: "stream-error"; code: number } | { kind: "connect-failure"; reason: string } | { kind: "conflict" } | { kind: "unknown"; detail: string };
3086
+
3074
3087
  /**
3075
3088
  * The bot the server marks as the one to offer by default.
3076
3089
  */
@@ -3121,6 +3134,44 @@ export type UsernameLookupResult = { status: "notFound" } | { status: "keyRequir
3121
3134
  */
3122
3135
  export type Reachability = "reachable" | "reconnecting" | "paused" | "unsupervised" | "finished" | "unknown";
3123
3136
 
3137
+ /**
3138
+ * Which core Noise handshake step failed, for a `core` handshake failure.
3139
+ */
3140
+ export type NoiseHandshakeFailureResult = { kind: "proto-decode"; message: string } | { kind: "incomplete-response" } | { kind: "crypto"; detail: string } | { kind: "cert-verification"; detail: string } | { kind: "invalid-length"; name: string; expected: number; got: number } | { kind: "invalid-key-length" } | { kind: "noise"; message: string };
3141
+
3142
+ /**
3143
+ * Which handshake step failed, for a `handshake` connect error.
3144
+ */
3145
+ export type HandshakeFailureResult = { kind: "transport"; message: string } | { kind: "core"; reason: NoiseHandshakeFailureResult } | { kind: "timeout" } | { kind: "stream-closed" } | { kind: "disconnected" } | { kind: "unexpected-event"; detail: string } | { kind: "unknown"; detail: string };
3146
+
3147
+ /**
3148
+ * Why a connection attempt failed, as the final attempt reported it.
3149
+ *
3150
+ * `anyhow` causes cross as their rendered message: the detail is diagnostic
3151
+ * text, not a boundary contract.
3152
+ */
3153
+ export type ConnectErrorResult = { kind: "already-connected" } | { kind: "not-activated" } | { kind: "shutdown" } | { kind: "paused" } | { kind: "timeout"; stage: string; timeoutMs: number } | { kind: "version"; message: string } | { kind: "transport"; message: string } | { kind: "handshake"; reason: HandshakeFailureResult } | { kind: "unknown"; detail: string };
3154
+
3155
+ /**
3156
+ * Why the supervised run loop started by `run()` ended.
3157
+ *
3158
+ * The core's `RunCompletionReason`, carried across unflattened: the
3159
+ * discriminant says which branch ended the run, and only the
3160
+ * `auto-reconnect-disabled` branch carries causes. Every cause is typed at
3161
+ * the boundary (no `Debug` rendering), and every absence is an absent key.
3162
+ * `generation` keys the result to the `run()` call that produced it; a stale
3163
+ * task can never overwrite a newer run's result.
3164
+ *
3165
+ * `unknown` is not one of the core's: the enum is `#[non_exhaustive]`, and a
3166
+ * reason added upstream has no shape here yet.
3167
+ */
3168
+ export type RunCompletionResult = { reason: "shutdown-requested"; generation: number } | { reason: "auto-reconnect-disabled"; generation: number; connection?: DisconnectReasonResult; connectError?: ConnectErrorResult; protocolError?: ProtocolTerminalReasonResult } | { reason: "stopped"; generation: number } | { reason: "already-running"; generation: number } | { reason: "unknown"; generation: number; detail: string };
3169
+
3170
+ /**
3171
+ * Why the transport connection ended, as the final reader observed it.
3172
+ */
3173
+ export type DisconnectReasonResult = { kind: "server-close"; code?: number; reason: string } | { kind: "stream-ended" } | { kind: "read-error"; message: string } | { kind: "unknown" };
3174
+
3124
3175
  export interface AllocationBucketSnapshot {
3125
3176
  allocatedBytes: number;
3126
3177
  allocations: number;
@@ -3511,7 +3562,7 @@ export type WhatsAppEvent =
3511
3562
  | { type: 'qr_scanned_without_multidevice'; data: Record<string, never> }
3512
3563
  | { type: 'client_outdated'; data: Record<string, never> }
3513
3564
  | { type: 'raw_node'; data: { tag: string; attrs: Record<string, string>; content?: unknown } }
3514
- | { type: 'history_sync'; data: import('./proto-types').proto.IHistorySync & { syncType: number; chunkOrder?: number; progress?: number; peerDataRequestSessionId?: string } }
3565
+ | { type: 'history_sync'; data: import('./proto-types.js').proto.IHistorySync & { syncType: number; chunkOrder?: number; progress?: number; peerDataRequestSessionId?: string } }
3515
3566
  | { type: 'pairing_code_error'; data: PairingCodeError }
3516
3567
  ;
3517
3568
 
@@ -4534,6 +4585,31 @@ export class WasmWhatsAppClient {
4534
4585
  * connection is fully ready. Rejects with `kind === 'timeout'` on expiry.
4535
4586
  */
4536
4587
  waitForConnected(timeout_ms: number): Promise<void>;
4588
+ /**
4589
+ * Wait for the supervised run loop started by `run()` to end, and report
4590
+ * why it ended.
4591
+ *
4592
+ * Resolves with the core's own completion reason, typed per branch: only
4593
+ * `auto-reconnect-disabled` carries causes, and every absence is an
4594
+ * absent key. The result is stored at termination, so a waiter that
4595
+ * arrives after the run already ended reads the same completion, and any
4596
+ * number of simultaneous waiters each receive it.
4597
+ *
4598
+ * A plain function returning a `Promise`, so the pending wait holds no
4599
+ * borrow on the client: `disconnect()`, `free()` and a second `run()`
4600
+ * all reach the client while it is outstanding.
4601
+ *
4602
+ * Three endings are told apart. A resolved promise is always the
4603
+ * supervision's own completion. The bridge cancelling its waiter is a
4604
+ * rejection on exactly one path: the host freed the client while the
4605
+ * wait was pending, reported as `not-connected`. The host tearing down
4606
+ * after the call returned is not awaited here and is not claimed. A
4607
+ * manual `connect()` drives one connection outside supervision and never
4608
+ * touches this observation.
4609
+ *
4610
+ * Rejects with `invalid-argument` when `run()` was never called.
4611
+ */
4612
+ waitForRunCompletion(): Promise<RunCompletionResult>;
4537
4613
  /**
4538
4614
  * Wait until the socket is connected, or the timeout elapses.
4539
4615
  *
@@ -4668,7 +4744,7 @@ export interface InitOutput {
4668
4744
  readonly beginWasmAllocationProfile: () => void;
4669
4745
  readonly calculateAgreement: (a: number, b: number, c: number, d: number, e: number) => void;
4670
4746
  readonly calculateSignature: (a: number, b: number, c: number, d: number, e: number) => void;
4671
- readonly createWhatsAppClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
4747
+ readonly createWhatsAppClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
4672
4748
  readonly decodeSenderKeyRecordComponents: (a: number, b: number, c: number) => void;
4673
4749
  readonly decodeSessionRecordComponents: (a: number, b: number, c: number) => void;
4674
4750
  readonly decryptEventResponsePayload: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
@@ -4866,6 +4942,7 @@ export interface InitOutput {
4866
4942
  readonly wasmwhatsappclient_validateKeyBundle: (a: number) => number;
4867
4943
  readonly wasmwhatsappclient_votePoll: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => number;
4868
4944
  readonly wasmwhatsappclient_waitForConnected: (a: number, b: number) => number;
4945
+ readonly wasmwhatsappclient_waitForRunCompletion: (a: number) => number;
4869
4946
  readonly wasmwhatsappclient_waitForSocket: (a: number, b: number) => number;
4870
4947
  readonly wasmwhatsappclient_waitUntilReachable: (a: number) => number;
4871
4948
  readonly wasmwhatsappclient_withdrawParkedCalls: (a: number) => number;
@@ -4883,12 +4960,12 @@ export interface InitOutput {
4883
4960
  readonly intounderlyingsink_write: (a: number, b: number) => number;
4884
4961
  readonly intounderlyingsource_cancel: (a: number) => void;
4885
4962
  readonly intounderlyingsource_pull: (a: number, b: number) => number;
4886
- readonly __wasm_bindgen_func_elem_4571: (a: number, b: number, c: number) => void;
4887
- readonly __wasm_bindgen_func_elem_27550: (a: number, b: number, c: number, d: number) => void;
4888
- readonly __wasm_bindgen_func_elem_27552: (a: number, b: number, c: number, d: number) => void;
4889
- readonly __wasm_bindgen_func_elem_9675: (a: number, b: number, c: number) => void;
4890
- readonly __wasm_bindgen_func_elem_4570: (a: number, b: number, c: number) => void;
4891
- readonly __wasm_bindgen_func_elem_4569: (a: number, b: number) => void;
4963
+ readonly __wasm_bindgen_func_elem_4619: (a: number, b: number, c: number) => void;
4964
+ readonly __wasm_bindgen_func_elem_27691: (a: number, b: number, c: number, d: number) => void;
4965
+ readonly __wasm_bindgen_func_elem_27693: (a: number, b: number, c: number, d: number) => void;
4966
+ readonly __wasm_bindgen_func_elem_9785: (a: number, b: number, c: number) => void;
4967
+ readonly __wasm_bindgen_func_elem_4618: (a: number, b: number, c: number) => void;
4968
+ readonly __wasm_bindgen_func_elem_4617: (a: number, b: number) => void;
4892
4969
  readonly __wbindgen_export: (a: number, b: number) => number;
4893
4970
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
4894
4971
  readonly __wbindgen_export3: (a: number) => void;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxidezap/whatsapp-rust-bridge",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "A high-performance utilities for WhatsApp, powered by Rust and WebAssembly.",
5
5
  "author": "João Lucas <jlucaso@hotmail.com>",
6
6
  "license": "MIT",
@@ -49,19 +49,22 @@
49
49
  "build:dev": "bun run gen && bun run build:wasm:dev && bun run build:ts && bun run build:finalize",
50
50
  "build:profile": "cargo build --profile profiling --target wasm32-unknown-unknown && wasm-bindgen --target web --out-dir pkg --keep-debug target/wasm32-unknown-unknown/profiling/whatsapp_rust_bridge.wasm && wasm-tools strip pkg/whatsapp_rust_bridge_bg.wasm -o pkg/whatsapp_rust_bridge_bg.wasm && bun run build:ts && bun run build:finalize",
51
51
  "build:memory-profile": "cargo build --profile profiling --target wasm32-unknown-unknown --features memory-profiling && wasm-bindgen --target web --out-dir pkg --keep-debug target/wasm32-unknown-unknown/profiling/whatsapp_rust_bridge.wasm && wasm-tools strip pkg/whatsapp_rust_bridge_bg.wasm -o pkg/whatsapp_rust_bridge_bg.wasm && bun run build:ts && bun run build:finalize",
52
- "bump:wacore": "cargo update -p whatsapp-rust && bun run build",
52
+ "bump:wacore": "bun run scripts/bump-wacore.ts",
53
53
  "example": "NODE_TLS_REJECT_UNAUTHORIZED=0 bun run examples/connect.ts",
54
54
  "test:rust": "wasm-pack test --node",
55
55
  "check:size": "bun run scripts/check-size.ts",
56
56
  "check:wasm-shape": "node scripts/check-wasm-shape.mjs",
57
57
  "check:test-clock": "bun run scripts/check-test-clock.ts",
58
+ "check:published-tarball": "bun run scripts/check-published-tarball.ts",
58
59
  "measure:fn-sizes": "node scripts/wasm-fn-sizes.mjs pkg/whatsapp_rust_bridge_bg.wasm",
59
60
  "measure:zone-peak": "node scripts/wasm-zone-peak.mjs pkg/whatsapp_rust_bridge_bg.wasm",
60
61
  "prepack": "bun run scripts/check-pack.ts",
61
62
  "prepublishOnly": "bun run build"
62
63
  },
64
+ "dependencies": {
65
+ "@bufbuild/protobuf": "^2.12.0"
66
+ },
63
67
  "devDependencies": {
64
- "@bufbuild/protobuf": "^2.12.0",
65
68
  "@types/bun": "^1.3.13",
66
69
  "@types/node": "^25.6.0",
67
70
  "pkg-pr-new": "^0.0.88",