@biscuit-auth/biscuit-wasm-support
Advanced tools
Comparing version 0.4.0-alpha1 to 0.4.0-alpha2
@@ -23,2 +23,7 @@ /* tslint:disable */ | ||
/** | ||
* @param {string} private_key | ||
* @returns {string} | ||
*/ | ||
export function get_public_key(private_key: string): string; | ||
/** | ||
* @param {any} query | ||
@@ -45,2 +50,3 @@ * @returns {string} | ||
readonly generate_keypair: () => number; | ||
readonly get_public_key: (a: number, b: number, c: number) => void; | ||
readonly generate_token: (a: number, b: number) => void; | ||
@@ -47,0 +53,0 @@ readonly parse_token: (a: number) => number; |
@@ -1,2 +0,2 @@ | ||
import * as __wbg_star0 from './snippets/biscuit-auth-c97ecfb83f825843/inline0.js'; | ||
import * as __wbg_star0 from './snippets/biscuit-auth-9839c5a0e8279f50/inline0.js'; | ||
@@ -170,2 +170,29 @@ let wasm; | ||
/** | ||
* @param {string} private_key | ||
* @returns {string} | ||
*/ | ||
export function get_public_key(private_key) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(private_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.get_public_key(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
var r3 = getInt32Memory0()[retptr / 4 + 3]; | ||
var ptr1 = r0; | ||
var len1 = r1; | ||
if (r3) { | ||
ptr1 = 0; len1 = 0; | ||
throw takeObject(r2); | ||
} | ||
return getStringFromWasm0(ptr1, len1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(ptr1, len1); | ||
} | ||
} | ||
/** | ||
* @param {any} query | ||
@@ -273,3 +300,3 @@ * @returns {string} | ||
}; | ||
imports.wbg.__wbg_log_7fed12fedef36f90 = function(arg0, arg1) { | ||
imports.wbg.__wbg_log_34b559bc40942c44 = function(arg0, arg1) { | ||
console.log(getStringFromWasm0(arg0, arg1)); | ||
@@ -384,3 +411,3 @@ }; | ||
}; | ||
imports['./snippets/biscuit-auth-c97ecfb83f825843/inline0.js'] = __wbg_star0; | ||
imports['./snippets/biscuit-auth-9839c5a0e8279f50/inline0.js'] = __wbg_star0; | ||
@@ -387,0 +414,0 @@ return imports; |
@@ -6,3 +6,3 @@ { | ||
], | ||
"version": "0.4.0-alpha1", | ||
"version": "0.4.0-alpha2", | ||
"license": "Apache-2.0", | ||
@@ -21,3 +21,5 @@ "repository": { | ||
"types": "biscuit.d.ts", | ||
"sideEffects": false | ||
} | ||
"sideEffects": [ | ||
"./snippets/*" | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
473
1211967