diff --git a/nodejs/hublib.d.ts b/nodejs/hublib.d.ts index 4ef2959..4075f0e 100644 --- a/nodejs/hublib.d.ts +++ b/nodejs/hublib.d.ts @@ -1,3 +1,3 @@ /* tslint:disable */ /* eslint-disable */ -export function get_secret_value(given_time: bigint, user_agent: string, url: string): string; +export function get_secret_value(http_time: string, user_agent: string, url: string): string; diff --git a/nodejs/hublib.js b/nodejs/hublib.js index 0b5e8b8..3fa00d7 100644 --- a/nodejs/hublib.js +++ b/nodejs/hublib.js @@ -78,25 +78,27 @@ function passStringToWasm0(arg, malloc, realloc) { return ptr; } /** - * @param {bigint} given_time + * @param {string} http_time * @param {string} user_agent * @param {string} url * @returns {string} */ -module.exports.get_secret_value = function(given_time, user_agent, url) { - let deferred3_0; - let deferred3_1; +module.exports.get_secret_value = function(http_time, user_agent, url) { + let deferred4_0; + let deferred4_1; try { - const ptr0 = passStringToWasm0(user_agent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const ptr0 = passStringToWasm0(http_time, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const ptr1 = passStringToWasm0(user_agent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; - const ret = wasm.get_secret_value(given_time, ptr0, len0, ptr1, len1); - deferred3_0 = ret[0]; - deferred3_1 = ret[1]; + const ptr2 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + const ret = wasm.get_secret_value(ptr0, len0, ptr1, len1, ptr2, len2); + deferred4_0 = ret[0]; + deferred4_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { - wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); + wasm.__wbindgen_free(deferred4_0, deferred4_1, 1); } }; diff --git a/nodejs/hublib_bg.wasm b/nodejs/hublib_bg.wasm index da6eb6f..b9b581d 100644 Binary files a/nodejs/hublib_bg.wasm and b/nodejs/hublib_bg.wasm differ diff --git a/nodejs/hublib_bg.wasm.d.ts b/nodejs/hublib_bg.wasm.d.ts index c8b7836..e578956 100644 --- a/nodejs/hublib_bg.wasm.d.ts +++ b/nodejs/hublib_bg.wasm.d.ts @@ -58,10 +58,10 @@ export const ffi_hublib_rust_future_poll_void: (a: bigint, b: number, c: bigint) export const ffi_hublib_rust_future_cancel_void: (a: bigint) => void; export const ffi_hublib_rust_future_complete_void: (a: bigint, b: number) => void; export const ffi_hublib_rust_future_free_void: (a: bigint) => void; -export const uniffi_hublib_fn_func_get_secret_value: (a: number, b: bigint, c: bigint, d: bigint, e: number, f: number, g: bigint, h: bigint, i: number, j: number, k: number) => void; +export const uniffi_hublib_fn_func_get_secret_value: (a: number, b: bigint, c: bigint, d: number, e: number, f: bigint, g: bigint, h: number, i: number, j: bigint, k: bigint, l: number, m: number, n: number) => void; export const uniffi_hublib_checksum_func_get_secret_value: () => number; -export const get_secret_value: (a: bigint, b: number, c: number, d: number, e: number) => [number, number]; -export const uniffi_hublib_fn_func_recreate_secret_value: (a: number, b: bigint, c: bigint, d: bigint, e: number, f: number, g: bigint, h: bigint, i: number, j: number, k: bigint, l: bigint, m: number, n: number, o: number) => void; +export const get_secret_value: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number]; +export const uniffi_hublib_fn_func_recreate_secret_value: (a: number, b: bigint, c: bigint, d: number, e: number, f: bigint, g: bigint, h: number, i: number, j: bigint, k: bigint, l: number, m: number, n: bigint, o: bigint, p: number, q: number, r: number) => void; export const uniffi_hublib_checksum_func_recreate_secret_value: () => number; export const __wbindgen_export_0: WebAssembly.Table; export const __wbindgen_malloc: (a: number, b: number) => number;