@puzzlehq/aleo-wasm-web 0.9.10 → 0.9.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mainnet/aleo_wasm.d.ts +4 -2
- package/dist/mainnet/aleo_wasm.wasm +0 -0
- package/dist/mainnet/index.js +29 -19
- package/dist/mainnet/index.js.map +1 -1
- package/dist/mainnet/worker.js +29 -19
- package/dist/mainnet/worker.js.map +1 -1
- package/dist/testnet/aleo_wasm.d.ts +4 -2
- package/dist/testnet/aleo_wasm.wasm +0 -0
- package/dist/testnet/index.js +29 -19
- package/dist/testnet/index.js.map +1 -1
- package/dist/testnet/worker.js +29 -19
- package/dist/testnet/worker.js.map +1 -1
- package/package.json +2 -2
|
@@ -2273,7 +2273,7 @@ export class ProgramManager {
|
|
|
2273
2273
|
* @param inputs A javascript array of inputs to the function.
|
|
2274
2274
|
* @param imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
|
|
2275
2275
|
*/
|
|
2276
|
-
static authExecute(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, imports?: object | null, edition?: number | null): Promise<Authorization>;
|
|
2276
|
+
static authExecute(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, imports?: object | null, edition?: number | null, import_editions?: object | null): Promise<Authorization>;
|
|
2277
2277
|
/**
|
|
2278
2278
|
* Create an `Authorization` for `credits.aleo/fee_public` or `credits.aleo/fee_private`.
|
|
2279
2279
|
* This object requires an associated execution or deployment ID. This can be gained from
|
|
@@ -2296,8 +2296,10 @@ export class ProgramManager {
|
|
|
2296
2296
|
* @param function_name The function to authorize.
|
|
2297
2297
|
* @param inputs A javascript array of inputs to the function.
|
|
2298
2298
|
* @param imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
|
|
2299
|
+
* @param edition The edition of the main program (defaults to 1 if not provided).
|
|
2300
|
+
* @param import_editions The editions of imported programs in the format {"programname.aleo": edition_number} (defaults to 1 for each import if not provided).
|
|
2299
2301
|
*/
|
|
2300
|
-
static buildAuthorizationUnchecked(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, imports?: object | null, edition?: number | null): Promise<Authorization>;
|
|
2302
|
+
static buildAuthorizationUnchecked(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, imports?: object | null, edition?: number | null, import_editions?: object | null): Promise<Authorization>;
|
|
2301
2303
|
/**
|
|
2302
2304
|
* Deploy an Aleo program
|
|
2303
2305
|
*
|
|
Binary file
|
package/dist/mainnet/index.js
CHANGED
|
@@ -7101,15 +7101,16 @@ class ProgramManager {
|
|
|
7101
7101
|
* @param {Array<any>} inputs
|
|
7102
7102
|
* @param {object | null} [imports]
|
|
7103
7103
|
* @param {number | null} [edition]
|
|
7104
|
+
* @param {object | null} [import_editions]
|
|
7104
7105
|
* @returns {Promise<Authorization>}
|
|
7105
7106
|
*/
|
|
7106
|
-
static authExecute(private_key, program, function_name, inputs, imports, edition) {
|
|
7107
|
+
static authExecute(private_key, program, function_name, inputs, imports, edition, import_editions) {
|
|
7107
7108
|
_assertClass(private_key, PrivateKey);
|
|
7108
7109
|
const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
7109
7110
|
const len0 = WASM_VECTOR_LEN;
|
|
7110
7111
|
const ptr1 = passStringToWasm0(function_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
7111
7112
|
const len1 = WASM_VECTOR_LEN;
|
|
7112
|
-
const ret = wasm.programmanager_authExecute(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition);
|
|
7113
|
+
const ret = wasm.programmanager_authExecute(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition, isLikeNone(import_editions) ? 0 : addHeapObject(import_editions));
|
|
7113
7114
|
return takeObject(ret);
|
|
7114
7115
|
}
|
|
7115
7116
|
/**
|
|
@@ -7151,21 +7152,24 @@ class ProgramManager {
|
|
|
7151
7152
|
* @param function_name The function to authorize.
|
|
7152
7153
|
* @param inputs A javascript array of inputs to the function.
|
|
7153
7154
|
* @param imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
|
|
7155
|
+
* @param edition The edition of the main program (defaults to 1 if not provided).
|
|
7156
|
+
* @param import_editions The editions of imported programs in the format {"programname.aleo": edition_number} (defaults to 1 for each import if not provided).
|
|
7154
7157
|
* @param {PrivateKey} private_key
|
|
7155
7158
|
* @param {string} program
|
|
7156
7159
|
* @param {string} function_name
|
|
7157
7160
|
* @param {Array<any>} inputs
|
|
7158
7161
|
* @param {object | null} [imports]
|
|
7159
7162
|
* @param {number | null} [edition]
|
|
7163
|
+
* @param {object | null} [import_editions]
|
|
7160
7164
|
* @returns {Promise<Authorization>}
|
|
7161
7165
|
*/
|
|
7162
|
-
static buildAuthorizationUnchecked(private_key, program, function_name, inputs, imports, edition) {
|
|
7166
|
+
static buildAuthorizationUnchecked(private_key, program, function_name, inputs, imports, edition, import_editions) {
|
|
7163
7167
|
_assertClass(private_key, PrivateKey);
|
|
7164
7168
|
const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
7165
7169
|
const len0 = WASM_VECTOR_LEN;
|
|
7166
7170
|
const ptr1 = passStringToWasm0(function_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
7167
7171
|
const len1 = WASM_VECTOR_LEN;
|
|
7168
|
-
const ret = wasm.programmanager_buildAuthorizationUnchecked(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition);
|
|
7172
|
+
const ret = wasm.programmanager_buildAuthorizationUnchecked(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition, isLikeNone(import_editions) ? 0 : addHeapObject(import_editions));
|
|
7169
7173
|
return takeObject(ret);
|
|
7170
7174
|
}
|
|
7171
7175
|
/**
|
|
@@ -12619,6 +12623,12 @@ function __wbg_get_imports(memory) {
|
|
|
12619
12623
|
const ret = wasmModule;
|
|
12620
12624
|
return addHeapObject(ret);
|
|
12621
12625
|
},
|
|
12626
|
+
__wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
|
|
12627
|
+
const obj = getObject(arg1);
|
|
12628
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
12629
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
12630
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
12631
|
+
},
|
|
12622
12632
|
__wbg___wbindgen_rethrow_05525c567f154472: function(arg0) {
|
|
12623
12633
|
throw takeObject(arg0);
|
|
12624
12634
|
},
|
|
@@ -12781,7 +12791,7 @@ function __wbg_get_imports(memory) {
|
|
|
12781
12791
|
const ret = getObject(arg0).length;
|
|
12782
12792
|
return ret;
|
|
12783
12793
|
},
|
|
12784
|
-
|
|
12794
|
+
__wbg_log_bf427d7de6a9bf32: function(arg0, arg1) {
|
|
12785
12795
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
12786
12796
|
},
|
|
12787
12797
|
__wbg_msCrypto_d562bbe83e0d4b91: function(arg0) {
|
|
@@ -12823,7 +12833,7 @@ function __wbg_get_imports(memory) {
|
|
|
12823
12833
|
const a = state0.a;
|
|
12824
12834
|
state0.a = 0;
|
|
12825
12835
|
try {
|
|
12826
|
-
return
|
|
12836
|
+
return __wasm_bindgen_func_elem_6952(a, state0.b, arg0, arg1);
|
|
12827
12837
|
} finally {
|
|
12828
12838
|
state0.a = a;
|
|
12829
12839
|
}
|
|
@@ -12993,7 +13003,7 @@ function __wbg_get_imports(memory) {
|
|
|
12993
13003
|
const ret = Signature.__wrap(arg0);
|
|
12994
13004
|
return addHeapObject(ret);
|
|
12995
13005
|
},
|
|
12996
|
-
|
|
13006
|
+
__wbg_spawnWorker_dbf0b39172b37e8e: function(arg0, arg1, arg2, arg3) {
|
|
12997
13007
|
const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
|
|
12998
13008
|
return addHeapObject(ret);
|
|
12999
13009
|
},
|
|
@@ -13084,18 +13094,18 @@ function __wbg_get_imports(memory) {
|
|
|
13084
13094
|
return addHeapObject(ret);
|
|
13085
13095
|
},
|
|
13086
13096
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
13087
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
13088
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
13097
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 431, function: Function { arguments: [Externref], shim_idx: 432, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
13098
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7408, __wasm_bindgen_func_elem_8089);
|
|
13089
13099
|
return addHeapObject(ret);
|
|
13090
13100
|
},
|
|
13091
13101
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
13092
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
13093
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
13102
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 431, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 432, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
13103
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7408, __wasm_bindgen_func_elem_8089);
|
|
13094
13104
|
return addHeapObject(ret);
|
|
13095
13105
|
},
|
|
13096
13106
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
13097
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
13098
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
13107
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 431, function: Function { arguments: [], shim_idx: 545, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
13108
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7408, __wasm_bindgen_func_elem_7409);
|
|
13099
13109
|
return addHeapObject(ret);
|
|
13100
13110
|
},
|
|
13101
13111
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
@@ -13162,16 +13172,16 @@ function __wbg_get_imports(memory) {
|
|
|
13162
13172
|
};
|
|
13163
13173
|
}
|
|
13164
13174
|
|
|
13165
|
-
function
|
|
13166
|
-
wasm.
|
|
13175
|
+
function __wasm_bindgen_func_elem_7409(arg0, arg1) {
|
|
13176
|
+
wasm.__wasm_bindgen_func_elem_7409(arg0, arg1);
|
|
13167
13177
|
}
|
|
13168
13178
|
|
|
13169
|
-
function
|
|
13170
|
-
wasm.
|
|
13179
|
+
function __wasm_bindgen_func_elem_8089(arg0, arg1, arg2) {
|
|
13180
|
+
wasm.__wasm_bindgen_func_elem_8089(arg0, arg1, addHeapObject(arg2));
|
|
13171
13181
|
}
|
|
13172
13182
|
|
|
13173
|
-
function
|
|
13174
|
-
wasm.
|
|
13183
|
+
function __wasm_bindgen_func_elem_6952(arg0, arg1, arg2, arg3) {
|
|
13184
|
+
wasm.__wasm_bindgen_func_elem_6952(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
13175
13185
|
}
|
|
13176
13186
|
|
|
13177
13187
|
|