Skip to content

Commit

Permalink
Merge branch 'main' into test-d
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed May 20, 2024
2 parents c7ec7a6 + 8edc83e commit c5e5c01
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
11 changes: 5 additions & 6 deletions packages/account-wasm/crate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 {
Expand Down Expand Up @@ -70,16 +69,16 @@ 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 =
FieldElement::from_str(&chain_id).map_err(|e| JsValue::from_str(&format!("{}", e)))?;
let account = CartridgeGuardianAccount::new(
provider,
webauthn_signer,
dummy_guardian.clone(),
dummy_guardian,
address,
chain_id,
);
Expand Down Expand Up @@ -158,7 +157,7 @@ impl CartridgeAccount {
})
.collect::<Result<Vec<AllowedMethod>, _>>()?;

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
Expand Down
24 changes: 12 additions & 12 deletions packages/account-wasm/pkg/account_wasm_bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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);
};
Expand All @@ -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) };

Expand Down Expand Up @@ -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);
};

Binary file modified packages/account-wasm/pkg/account_wasm_bg.wasm
Binary file not shown.
4 changes: 2 additions & 2 deletions packages/account-wasm/pkg/account_wasm_bg.wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit c5e5c01

Please sign in to comment.