@concordium/rust-bindings
Advanced tools
Comparing version
{ | ||
"name": "@concordium/rust-bindings", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -9,2 +9,11 @@ /* tslint:disable */ | ||
export function deserializeCredentialDeployment(a: number, b: number, c: number): void; | ||
export function createIdRequestV1(a: number, b: number, c: number): void; | ||
export function createIdentityRecoveryRequest(a: number, b: number, c: number): void; | ||
export function createCredentialV1(a: number, b: number, c: number): void; | ||
export function getAccountSigningKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; | ||
export function getAccountPublicKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; | ||
export function getPrfKey(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
export function getIdCredSec(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
export function getSignatureBlindingRandomness(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
export function getAttributeCommitmentRandomness(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void; | ||
export function verify_initial_cdi_ffi(a: number, b: number, c: number, d: number): number; | ||
@@ -11,0 +20,0 @@ export function verify_cdi_ffi(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; |
@@ -33,2 +33,63 @@ /* tslint:disable */ | ||
export function deserializeCredentialDeployment(serialized: string): string; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function createIdRequestV1(input: string): string; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function createIdentityRecoveryRequest(input: string): string; | ||
/** | ||
* @param {string} raw_input | ||
* @returns {string} | ||
*/ | ||
export function createCredentialV1(raw_input: string): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @returns {string} | ||
*/ | ||
export function getAccountSigningKey(seed_as_hex: string, raw_net: string, identity_index: number, credential_counter: number): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @returns {string} | ||
*/ | ||
export function getAccountPublicKey(seed_as_hex: string, raw_net: string, identity_index: number, credential_counter: number): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
export function getPrfKey(seed_as_hex: string, raw_net: string, identity_index: number): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
export function getIdCredSec(seed_as_hex: string, raw_net: string, identity_index: number): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
export function getSignatureBlindingRandomness(seed_as_hex: string, raw_net: string, identity_index: number): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @param {number} attribute | ||
* @returns {string} | ||
*/ | ||
export function getAttributeCommitmentRandomness(seed_as_hex: string, raw_net: string, identity_index: number, credential_counter: number, attribute: number): string; | ||
@@ -44,2 +105,11 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; | ||
readonly deserializeCredentialDeployment: (a: number, b: number, c: number) => void; | ||
readonly createIdRequestV1: (a: number, b: number, c: number) => void; | ||
readonly createIdentityRecoveryRequest: (a: number, b: number, c: number) => void; | ||
readonly createCredentialV1: (a: number, b: number, c: number) => void; | ||
readonly getAccountSigningKey: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void; | ||
readonly getAccountPublicKey: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void; | ||
readonly getPrfKey: (a: number, b: number, c: number, d: number, e: number, f: number) => void; | ||
readonly getIdCredSec: (a: number, b: number, c: number, d: number, e: number, f: number) => void; | ||
readonly getSignatureBlindingRandomness: (a: number, b: number, c: number, d: number, e: number, f: number) => void; | ||
readonly getAttributeCommitmentRandomness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void; | ||
readonly verify_initial_cdi_ffi: (a: number, b: number, c: number, d: number) => number; | ||
@@ -46,0 +116,0 @@ readonly verify_cdi_ffi: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number; |
@@ -231,2 +231,201 @@ | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function createIdRequestV1(input) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.createIdRequestV1(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
} | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function createIdentityRecoveryRequest(input) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.createIdentityRecoveryRequest(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
} | ||
/** | ||
* @param {string} raw_input | ||
* @returns {string} | ||
*/ | ||
export function createCredentialV1(raw_input) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(raw_input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.createCredentialV1(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
} | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @returns {string} | ||
*/ | ||
export function getAccountSigningKey(seed_as_hex, raw_net, identity_index, credential_counter) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getAccountSigningKey(retptr, ptr0, len0, ptr1, len1, identity_index, credential_counter); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
} | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @returns {string} | ||
*/ | ||
export function getAccountPublicKey(seed_as_hex, raw_net, identity_index, credential_counter) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getAccountPublicKey(retptr, ptr0, len0, ptr1, len1, identity_index, credential_counter); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
} | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
export function getPrfKey(seed_as_hex, raw_net, identity_index) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getPrfKey(retptr, ptr0, len0, ptr1, len1, identity_index); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
} | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
export function getIdCredSec(seed_as_hex, raw_net, identity_index) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getIdCredSec(retptr, ptr0, len0, ptr1, len1, identity_index); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
} | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
export function getSignatureBlindingRandomness(seed_as_hex, raw_net, identity_index) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getSignatureBlindingRandomness(retptr, ptr0, len0, ptr1, len1, identity_index); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
} | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @param {number} attribute | ||
* @returns {string} | ||
*/ | ||
export function getAttributeCommitmentRandomness(seed_as_hex, raw_net, identity_index, credential_counter, attribute) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getAttributeCommitmentRandomness(retptr, ptr0, len0, ptr1, len1, identity_index, credential_counter, attribute); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
} | ||
function handleError(f, args) { | ||
@@ -233,0 +432,0 @@ try { |
@@ -9,2 +9,11 @@ /* tslint:disable */ | ||
export function deserializeCredentialDeployment(a: number, b: number, c: number): void; | ||
export function createIdRequestV1(a: number, b: number, c: number): void; | ||
export function createIdentityRecoveryRequest(a: number, b: number, c: number): void; | ||
export function createCredentialV1(a: number, b: number, c: number): void; | ||
export function getAccountSigningKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; | ||
export function getAccountPublicKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; | ||
export function getPrfKey(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
export function getIdCredSec(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
export function getSignatureBlindingRandomness(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
export function getAttributeCommitmentRandomness(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void; | ||
export function verify_initial_cdi_ffi(a: number, b: number, c: number, d: number): number; | ||
@@ -11,0 +20,0 @@ export function verify_cdi_ffi(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; |
@@ -33,1 +33,62 @@ /* tslint:disable */ | ||
export function deserializeCredentialDeployment(serialized: string): string; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function createIdRequestV1(input: string): string; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function createIdentityRecoveryRequest(input: string): string; | ||
/** | ||
* @param {string} raw_input | ||
* @returns {string} | ||
*/ | ||
export function createCredentialV1(raw_input: string): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @returns {string} | ||
*/ | ||
export function getAccountSigningKey(seed_as_hex: string, raw_net: string, identity_index: number, credential_counter: number): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @returns {string} | ||
*/ | ||
export function getAccountPublicKey(seed_as_hex: string, raw_net: string, identity_index: number, credential_counter: number): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
export function getPrfKey(seed_as_hex: string, raw_net: string, identity_index: number): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
export function getIdCredSec(seed_as_hex: string, raw_net: string, identity_index: number): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
export function getSignatureBlindingRandomness(seed_as_hex: string, raw_net: string, identity_index: number): string; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @param {number} attribute | ||
* @returns {string} | ||
*/ | ||
export function getAttributeCommitmentRandomness(seed_as_hex: string, raw_net: string, identity_index: number, credential_counter: number, attribute: number): string; |
@@ -233,2 +233,201 @@ let imports = {}; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
module.exports.createIdRequestV1 = function(input) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.createIdRequestV1(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
}; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
module.exports.createIdentityRecoveryRequest = function(input) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.createIdentityRecoveryRequest(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
}; | ||
/** | ||
* @param {string} raw_input | ||
* @returns {string} | ||
*/ | ||
module.exports.createCredentialV1 = function(raw_input) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(raw_input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.createCredentialV1(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
}; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @returns {string} | ||
*/ | ||
module.exports.getAccountSigningKey = function(seed_as_hex, raw_net, identity_index, credential_counter) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getAccountSigningKey(retptr, ptr0, len0, ptr1, len1, identity_index, credential_counter); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
}; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @returns {string} | ||
*/ | ||
module.exports.getAccountPublicKey = function(seed_as_hex, raw_net, identity_index, credential_counter) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getAccountPublicKey(retptr, ptr0, len0, ptr1, len1, identity_index, credential_counter); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
}; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
module.exports.getPrfKey = function(seed_as_hex, raw_net, identity_index) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getPrfKey(retptr, ptr0, len0, ptr1, len1, identity_index); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
}; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
module.exports.getIdCredSec = function(seed_as_hex, raw_net, identity_index) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getIdCredSec(retptr, ptr0, len0, ptr1, len1, identity_index); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
}; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @returns {string} | ||
*/ | ||
module.exports.getSignatureBlindingRandomness = function(seed_as_hex, raw_net, identity_index) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getSignatureBlindingRandomness(retptr, ptr0, len0, ptr1, len1, identity_index); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
}; | ||
/** | ||
* @param {string} seed_as_hex | ||
* @param {string} raw_net | ||
* @param {number} identity_index | ||
* @param {number} credential_counter | ||
* @param {number} attribute | ||
* @returns {string} | ||
*/ | ||
module.exports.getAttributeCommitmentRandomness = function(seed_as_hex, raw_net, identity_index, credential_counter, attribute) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(seed_as_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(raw_net, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.getAttributeCommitmentRandomness(retptr, ptr0, len0, ptr1, len1, identity_index, credential_counter, attribute); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(r0, r1); | ||
} | ||
}; | ||
function handleError(f, args) { | ||
@@ -235,0 +434,0 @@ try { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3671533
25.89%1339
65.31%