diff --git a/packages/account-wasm/crate/src/lib.rs b/packages/account-wasm/crate/src/lib.rs index c78be2d99..77a3f71fa 100644 --- a/packages/account-wasm/crate/src/lib.rs +++ b/packages/account-wasm/crate/src/lib.rs @@ -13,7 +13,7 @@ use base64::{engine::general_purpose, Engine}; use coset::{CborSerializable, CoseKey}; use serde_wasm_bindgen::{from_value, to_value}; use starknet::accounts::Account; -use starknet::macros::felt; +use starknet::macros::short_string; use starknet::signers::SigningKey; use starknet::{ accounts::Call, @@ -23,7 +23,6 @@ use starknet::{ use types::{JsCall, JsCredentials, JsInvocationsDetails, JsPolicy, JsSession}; use url::Url; use wasm_bindgen::prelude::*; -use web_sys::console; #[wasm_bindgen] pub struct CartridgeAccount { @@ -70,8 +69,8 @@ impl CartridgeAccount { CredentialID(credential_id), cose, ); - - let dummy_guardian = SigningKey::from_secret_scalar(felt!("0x42")); + + let dummy_guardian = SigningKey::from_secret_scalar(short_string!("CARTRIDGE_GUARDIAN")); let address = FieldElement::from_str(&address).map_err(|e| JsValue::from_str(&format!("{}", e)))?; let chain_id = @@ -79,7 +78,7 @@ impl CartridgeAccount { let account = CartridgeGuardianAccount::new( provider, webauthn_signer, - dummy_guardian.clone(), + dummy_guardian, address, chain_id, ); @@ -158,7 +157,7 @@ impl CartridgeAccount { }) .collect::, _>>()?; - let dummy_guardian = SigningKey::from_secret_scalar(felt!("0x42")); + let dummy_guardian = SigningKey::from_secret_scalar(short_string!("CARTRIDGE_GUARDIAN")); let session_signer = SigningKey::from_secret_scalar(session_details.credentials.private_key); let expires_at: u64 = session_details diff --git a/packages/account-wasm/pkg/account_wasm_bg.js b/packages/account-wasm/pkg/account_wasm_bg.js index acfde2a73..d9db3ffb6 100644 --- a/packages/account-wasm/pkg/account_wasm_bg.js +++ b/packages/account-wasm/pkg/account_wasm_bg.js @@ -229,7 +229,7 @@ function makeMutClosure(arg0, arg1, dtor, f) { return real; } function __wbg_adapter_38(arg0, arg1, arg2) { - wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h69eb95563fcef018(arg0, arg1, addHeapObject(arg2)); + wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha2648cd2104b2460(arg0, arg1, addHeapObject(arg2)); } let cachedUint32Memory0 = null; @@ -270,7 +270,7 @@ function handleError(f, args) { } } function __wbg_adapter_152(arg0, arg1, arg2, arg3) { - wasm.wasm_bindgen__convert__closures__invoke2_mut__h612b10610057ec07(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); + wasm.wasm_bindgen__convert__closures__invoke2_mut__h7a1b6aac49563e3d(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); } const CartridgeAccountFinalization = (typeof FinalizationRegistry === 'undefined') @@ -655,22 +655,22 @@ export function __wbg_clientDataJSON_c62fc9ad5f2cb8ba(arg0) { return addHeapObject(ret); }; -export function __wbg_crypto_566d7465cdbb6b7a(arg0) { +export function __wbg_crypto_1d1f22824a6a080c(arg0) { const ret = getObject(arg0).crypto; return addHeapObject(ret); }; -export function __wbg_process_dc09a8c7d59982f6(arg0) { +export function __wbg_process_4a72847cc503995b(arg0) { const ret = getObject(arg0).process; return addHeapObject(ret); }; -export function __wbg_versions_d98c6400c6ca2bd8(arg0) { +export function __wbg_versions_f686565e586dd935(arg0) { const ret = getObject(arg0).versions; return addHeapObject(ret); }; -export function __wbg_node_caaf83d002149bd5(arg0) { +export function __wbg_node_104a2ff8d6ea03a2(arg0) { const ret = getObject(arg0).node; return addHeapObject(ret); }; @@ -680,21 +680,21 @@ export function __wbindgen_is_string(arg0) { return ret; }; -export function __wbg_require_94a9da52636aacbf() { return handleError(function () { +export function __wbg_require_cca90b1a94a0255b() { return handleError(function () { const ret = module.require; return addHeapObject(ret); }, arguments) }; -export function __wbg_msCrypto_0b84745e9245cdf6(arg0) { +export function __wbg_msCrypto_eb05e62b530a1508(arg0) { const ret = getObject(arg0).msCrypto; return addHeapObject(ret); }; -export function __wbg_randomFillSync_290977693942bf03() { return handleError(function (arg0, arg1) { +export function __wbg_randomFillSync_5c9c955aa56b6049() { return handleError(function (arg0, arg1) { getObject(arg0).randomFillSync(takeObject(arg1)); }, arguments) }; -export function __wbg_getRandomValues_260cc23a41afad9a() { return handleError(function (arg0, arg1) { +export function __wbg_getRandomValues_3aa56aa6edec874c() { return handleError(function (arg0, arg1) { getObject(arg0).getRandomValues(getObject(arg1)); }, arguments) }; @@ -919,8 +919,8 @@ export function __wbindgen_memory() { return addHeapObject(ret); }; -export function __wbindgen_closure_wrapper1117(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 400, __wbg_adapter_38); +export function __wbindgen_closure_wrapper1118(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 401, __wbg_adapter_38); return addHeapObject(ret); }; diff --git a/packages/account-wasm/pkg/account_wasm_bg.wasm b/packages/account-wasm/pkg/account_wasm_bg.wasm index d67598a30..c33158094 100644 Binary files a/packages/account-wasm/pkg/account_wasm_bg.wasm and b/packages/account-wasm/pkg/account_wasm_bg.wasm differ diff --git a/packages/account-wasm/pkg/account_wasm_bg.wasm.d.ts b/packages/account-wasm/pkg/account_wasm_bg.wasm.d.ts index 2d0a8424a..8b96b3dff 100644 --- a/packages/account-wasm/pkg/account_wasm_bg.wasm.d.ts +++ b/packages/account-wasm/pkg/account_wasm_bg.wasm.d.ts @@ -10,8 +10,8 @@ export function cartridgeaccount_signMessage(a: number, b: number): void; export function __wbindgen_malloc(a: number, b: number): number; export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number; export const __wbindgen_export_2: WebAssembly.Table; -export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h69eb95563fcef018(a: number, b: number, c: number): void; +export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha2648cd2104b2460(a: number, b: number, c: number): void; export function __wbindgen_add_to_stack_pointer(a: number): number; export function __wbindgen_free(a: number, b: number, c: number): void; export function __wbindgen_exn_store(a: number): void; -export function wasm_bindgen__convert__closures__invoke2_mut__h612b10610057ec07(a: number, b: number, c: number, d: number): void; +export function wasm_bindgen__convert__closures__invoke2_mut__h7a1b6aac49563e3d(a: number, b: number, c: number, d: number): void;