@concordium/rust-bindings
Advanced tools
Comparing version
{ | ||
"name": "@concordium/rust-bindings", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"license": "Apache-2.0", | ||
@@ -16,3 +16,3 @@ "engines": { | ||
"lint": "cargo clippy", | ||
"lint-fix": "cargo +nightly-2021-06-09-x86_64-unknown-linux-gnu fmt", | ||
"lint-fix": "cargo +nightly-2022-06-09-x86_64-unknown-linux-gnu fmt", | ||
"build": "wasm-pack build --target web --out-dir pkg/bundler && wasm-pack build --target nodejs --out-dir pkg/node", | ||
@@ -19,0 +19,0 @@ "build:rust-bindings": "yarn build" |
@@ -10,2 +10,6 @@ /* tslint:disable */ | ||
export function deserializeReceiveReturnValue(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): void; | ||
export function deserializeReceiveError(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): void; | ||
export function deserializeInitError(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; | ||
export function serializeReceiveContractParameters(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): void; | ||
export function serializeInitContractParameters(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void; | ||
export function createIdRequestV1(a: number, b: number, c: number): void; | ||
@@ -27,2 +31,11 @@ export function createIdentityRecoveryRequest(a: number, b: number, c: number): void; | ||
export function ar_info_ar_identity(a: number): number; | ||
export function ar_info_name(a: number, b: number): number; | ||
export function ar_info_url(a: number, b: number): number; | ||
export function ar_info_description(a: number, b: number): number; | ||
export function ar_info_public_key(a: number, b: number): number; | ||
export function ip_info_name(a: number, b: number): number; | ||
export function ip_info_url(a: number, b: number): number; | ||
export function ip_info_description(a: number, b: number): number; | ||
export function ip_info_verify_key(a: number, b: number): number; | ||
export function ip_info_cdi_verify_key(a: number, b: number): number; | ||
export function pedersen_key_from_bytes(a: number, b: number): number; | ||
@@ -29,0 +42,0 @@ export function pedersen_key_to_bytes(a: number, b: number): number; |
@@ -43,2 +43,34 @@ /* tslint:disable */ | ||
/** | ||
* @param {string} error_bytes | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {string} function_name | ||
* @returns {string} | ||
*/ | ||
export function deserializeReceiveError(error_bytes: string, schema: string, contract_name: string, function_name: string): string; | ||
/** | ||
* @param {string} error_bytes | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @returns {string} | ||
*/ | ||
export function deserializeInitError(error_bytes: string, schema: string, contract_name: string): string; | ||
/** | ||
* @param {string} parameters | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {string} function_name | ||
* @param {number | undefined} schema_version | ||
* @returns {string} | ||
*/ | ||
export function serializeReceiveContractParameters(parameters: string, schema: string, contract_name: string, function_name: string, schema_version?: number): string; | ||
/** | ||
* @param {string} parameters | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {number | undefined} schema_version | ||
* @returns {string} | ||
*/ | ||
export function serializeInitContractParameters(parameters: string, schema: string, contract_name: string, schema_version?: number): string; | ||
/** | ||
* @param {string} input | ||
@@ -131,2 +163,6 @@ * @returns {string} | ||
readonly deserializeReceiveReturnValue: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void; | ||
readonly deserializeReceiveError: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void; | ||
readonly deserializeInitError: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void; | ||
readonly serializeReceiveContractParameters: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void; | ||
readonly serializeInitContractParameters: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void; | ||
readonly createIdRequestV1: (a: number, b: number, c: number) => void; | ||
@@ -148,2 +184,11 @@ readonly createIdentityRecoveryRequest: (a: number, b: number, c: number) => void; | ||
readonly ar_info_ar_identity: (a: number) => number; | ||
readonly ar_info_name: (a: number, b: number) => number; | ||
readonly ar_info_url: (a: number, b: number) => number; | ||
readonly ar_info_description: (a: number, b: number) => number; | ||
readonly ar_info_public_key: (a: number, b: number) => number; | ||
readonly ip_info_name: (a: number, b: number) => number; | ||
readonly ip_info_url: (a: number, b: number) => number; | ||
readonly ip_info_description: (a: number, b: number) => number; | ||
readonly ip_info_verify_key: (a: number, b: number) => number; | ||
readonly ip_info_cdi_verify_key: (a: number, b: number) => number; | ||
readonly pedersen_key_from_bytes: (a: number, b: number) => number; | ||
@@ -150,0 +195,0 @@ readonly pedersen_key_to_bytes: (a: number, b: number) => number; |
@@ -264,2 +264,110 @@ | ||
/** | ||
* @param {string} error_bytes | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {string} function_name | ||
* @returns {string} | ||
*/ | ||
export function deserializeReceiveError(error_bytes, schema, contract_name, function_name) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(error_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passStringToWasm0(contract_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
const ptr3 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len3 = WASM_VECTOR_LEN; | ||
wasm.deserializeReceiveError(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3); | ||
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} error_bytes | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @returns {string} | ||
*/ | ||
export function deserializeInitError(error_bytes, schema, contract_name) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(error_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passStringToWasm0(contract_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
wasm.deserializeInitError(retptr, ptr0, len0, ptr1, len1, ptr2, len2); | ||
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} parameters | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {string} function_name | ||
* @param {number | undefined} schema_version | ||
* @returns {string} | ||
*/ | ||
export function serializeReceiveContractParameters(parameters, schema, contract_name, function_name, schema_version) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(parameters, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passStringToWasm0(contract_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
const ptr3 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len3 = WASM_VECTOR_LEN; | ||
wasm.serializeReceiveContractParameters(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(schema_version) ? 0xFFFFFF : schema_version); | ||
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} parameters | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {number | undefined} schema_version | ||
* @returns {string} | ||
*/ | ||
export function serializeInitContractParameters(parameters, schema, contract_name, schema_version) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(parameters, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passStringToWasm0(contract_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
wasm.serializeInitContractParameters(retptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(schema_version) ? 0xFFFFFF : schema_version); | ||
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 | ||
@@ -266,0 +374,0 @@ * @returns {string} |
@@ -10,2 +10,6 @@ /* tslint:disable */ | ||
export function deserializeReceiveReturnValue(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): void; | ||
export function deserializeReceiveError(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): void; | ||
export function deserializeInitError(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; | ||
export function serializeReceiveContractParameters(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): void; | ||
export function serializeInitContractParameters(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void; | ||
export function createIdRequestV1(a: number, b: number, c: number): void; | ||
@@ -27,2 +31,11 @@ export function createIdentityRecoveryRequest(a: number, b: number, c: number): void; | ||
export function ar_info_ar_identity(a: number): number; | ||
export function ar_info_name(a: number, b: number): number; | ||
export function ar_info_url(a: number, b: number): number; | ||
export function ar_info_description(a: number, b: number): number; | ||
export function ar_info_public_key(a: number, b: number): number; | ||
export function ip_info_name(a: number, b: number): number; | ||
export function ip_info_url(a: number, b: number): number; | ||
export function ip_info_description(a: number, b: number): number; | ||
export function ip_info_verify_key(a: number, b: number): number; | ||
export function ip_info_cdi_verify_key(a: number, b: number): number; | ||
export function pedersen_key_from_bytes(a: number, b: number): number; | ||
@@ -29,0 +42,0 @@ export function pedersen_key_to_bytes(a: number, b: number): number; |
@@ -43,2 +43,34 @@ /* tslint:disable */ | ||
/** | ||
* @param {string} error_bytes | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {string} function_name | ||
* @returns {string} | ||
*/ | ||
export function deserializeReceiveError(error_bytes: string, schema: string, contract_name: string, function_name: string): string; | ||
/** | ||
* @param {string} error_bytes | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @returns {string} | ||
*/ | ||
export function deserializeInitError(error_bytes: string, schema: string, contract_name: string): string; | ||
/** | ||
* @param {string} parameters | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {string} function_name | ||
* @param {number | undefined} schema_version | ||
* @returns {string} | ||
*/ | ||
export function serializeReceiveContractParameters(parameters: string, schema: string, contract_name: string, function_name: string, schema_version?: number): string; | ||
/** | ||
* @param {string} parameters | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {number | undefined} schema_version | ||
* @returns {string} | ||
*/ | ||
export function serializeInitContractParameters(parameters: string, schema: string, contract_name: string, schema_version?: number): string; | ||
/** | ||
* @param {string} input | ||
@@ -45,0 +77,0 @@ * @returns {string} |
@@ -266,2 +266,110 @@ let imports = {}; | ||
/** | ||
* @param {string} error_bytes | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {string} function_name | ||
* @returns {string} | ||
*/ | ||
module.exports.deserializeReceiveError = function(error_bytes, schema, contract_name, function_name) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(error_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passStringToWasm0(contract_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
const ptr3 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len3 = WASM_VECTOR_LEN; | ||
wasm.deserializeReceiveError(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3); | ||
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} error_bytes | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @returns {string} | ||
*/ | ||
module.exports.deserializeInitError = function(error_bytes, schema, contract_name) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(error_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passStringToWasm0(contract_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
wasm.deserializeInitError(retptr, ptr0, len0, ptr1, len1, ptr2, len2); | ||
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} parameters | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {string} function_name | ||
* @param {number | undefined} schema_version | ||
* @returns {string} | ||
*/ | ||
module.exports.serializeReceiveContractParameters = function(parameters, schema, contract_name, function_name, schema_version) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(parameters, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passStringToWasm0(contract_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
const ptr3 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len3 = WASM_VECTOR_LEN; | ||
wasm.serializeReceiveContractParameters(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(schema_version) ? 0xFFFFFF : schema_version); | ||
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} parameters | ||
* @param {string} schema | ||
* @param {string} contract_name | ||
* @param {number | undefined} schema_version | ||
* @returns {string} | ||
*/ | ||
module.exports.serializeInitContractParameters = function(parameters, schema, contract_name, schema_version) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(parameters, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passStringToWasm0(contract_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
wasm.serializeInitContractParameters(retptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(schema_version) ? 0xFFFFFF : schema_version); | ||
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 | ||
@@ -268,0 +376,0 @@ * @returns {string} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
4108539
12.53%1834
20.42%