Skip to content

Commit bec4e0d

Browse files
committed
feat: Bump version to 0.5.2 and enhance HkdfInfo's default handling and TypeScript type definition for optional fields.
1 parent 68a2fb7 commit bec4e0d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "whatsapp-rust-bridge",
3-
"version": "0.5.1",
3+
"version": "0.5.2",
44
"description": "A high-performance utilities for WhatsApp, powered by Rust and WebAssembly.",
55
"author": "João Lucas <jlucaso@hotmail.com>",
66
"license": "MIT",

src/crypto.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ pub fn md5_hash(buffer: &[u8]) -> Uint8Array {
1616
arr
1717
}
1818

19-
#[derive(Debug, Clone, Serialize, Deserialize, Tsify)]
19+
#[derive(Debug, Clone, Serialize, Deserialize, Tsify, Default)]
2020
#[tsify(from_wasm_abi)]
21-
#[serde(rename_all = "camelCase")]
21+
#[serde(rename_all = "camelCase", default)]
2222
pub struct HkdfInfo {
23-
#[tsify(type = "Uint8Array | null")]
23+
#[tsify(type = "Uint8Array | undefined")]
2424
#[serde(with = "serde_bytes")]
2525
pub salt: Option<Vec<u8>>,
2626
pub info: Option<String>,

0 commit comments

Comments
 (0)