@cartridge/controller-wasm 0.7.14-3b036eb → 0.7.14-634aa73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cartridge/controller-wasm",
3
- "version": "0.7.14-3b036eb",
3
+ "version": "0.7.14-634aa73",
4
4
  "description": "Wasm bindings for Cartridge Controller and Session Account",
5
5
  "type": "module",
6
6
  "main": "./pkg-controller/account_wasm.js",
@@ -1,13 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Result type for signExecuteFromOutside containing both the OutsideExecution and signature
5
- */
6
- export interface JsSignedOutsideExecution {
7
- outside_execution: JsOutsideExecutionV3;
8
- signature: JsFelt[];
9
- }
10
-
11
3
  /**
12
4
  * JavaScript-friendly OutsideExecution V3 structure
13
5
  */
@@ -19,6 +11,14 @@ export interface JsOutsideExecutionV3 {
19
11
  nonce: [JsFelt, JsFelt];
20
12
  }
21
13
 
14
+ /**
15
+ * Result type for signExecuteFromOutside containing both the OutsideExecution and signature
16
+ */
17
+ export interface JsSignedOutsideExecution {
18
+ outside_execution: JsOutsideExecutionV3;
19
+ signature: JsFelt[];
20
+ }
21
+
22
22
  export type Felts = JsFelt[];
23
23
 
24
24
  export type JsFelt = Felt;
@@ -36,7 +36,10 @@ export interface Owner {
36
36
  account?: JsFelt;
37
37
  }
38
38
 
39
- export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
39
+ export interface TypedDataPolicy {
40
+ scope_hash: JsFelt;
41
+ authorized?: boolean;
42
+ }
40
43
 
41
44
  export interface ApprovalPolicy {
42
45
  target: JsFelt;
@@ -44,10 +47,7 @@ export interface ApprovalPolicy {
44
47
  amount: JsFelt;
45
48
  }
46
49
 
47
- export interface TypedDataPolicy {
48
- scope_hash: JsFelt;
49
- authorized?: boolean;
50
- }
50
+ export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
51
51
 
52
52
  export interface CallPolicy {
53
53
  target: JsFelt;
@@ -61,6 +61,14 @@ export interface StarknetSigner {
61
61
 
62
62
  export type JsAddSignerInput = SignerInput;
63
63
 
64
+ export interface WebauthnSigner {
65
+ rpId: string;
66
+ credentialId: string;
67
+ publicKey: string;
68
+ }
69
+
70
+ export type JsRemoveSignerInput = SignerInput;
71
+
64
72
  export interface Eip191Signer {
65
73
  address: string;
66
74
  }
@@ -72,14 +80,6 @@ export interface Signer {
72
80
  eip191?: Eip191Signer;
73
81
  }
74
82
 
75
- export interface WebauthnSigner {
76
- rpId: string;
77
- credentialId: string;
78
- publicKey: string;
79
- }
80
-
81
- export type JsRemoveSignerInput = SignerInput;
82
-
83
83
  export interface AuthorizedSession {
84
84
  session: Session;
85
85
  authorization: JsFelt[] | null;
@@ -91,10 +91,6 @@ export interface AuthorizedSession {
91
91
  guardianKeyGuid: JsFelt;
92
92
  }
93
93
 
94
- export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
95
-
96
- export type JsRevokableSession = RevokableSession;
97
-
98
94
  export interface Session {
99
95
  policies: Policy[];
100
96
  expiresAt: number;
@@ -108,6 +104,10 @@ export interface Credentials {
108
104
  privateKey: JsFelt;
109
105
  }
110
106
 
107
+ export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
108
+
109
+ export type JsRevokableSession = RevokableSession;
110
+
111
111
  export interface JsEstimateFeeDetails {
112
112
  nonce: JsFelt;
113
113
  }
@@ -124,10 +124,10 @@ export interface JsFeeEstimate {
124
124
 
125
125
  export type JsPriceUnit = "WEI" | "FRI";
126
126
 
127
- export type JsRegisterResponse = ResponseData;
128
-
129
127
  export type JsRegister = RegisterInput;
130
128
 
129
+ export type JsRegisterResponse = ResponseData;
130
+
131
131
 
132
132
  export class CartridgeAccount {
133
133
  private constructor();
@@ -285,20 +285,20 @@ if (!('encodeInto' in cachedTextEncoder)) {
285
285
 
286
286
  let WASM_VECTOR_LEN = 0;
287
287
 
288
- function __wasm_bindgen_func_elem_8794(arg0, arg1, arg2) {
289
- wasm.__wasm_bindgen_func_elem_8794(arg0, arg1, addHeapObject(arg2));
288
+ function __wasm_bindgen_func_elem_3270(arg0, arg1, arg2) {
289
+ wasm.__wasm_bindgen_func_elem_3270(arg0, arg1, addHeapObject(arg2));
290
290
  }
291
291
 
292
- function __wasm_bindgen_func_elem_3269(arg0, arg1, arg2) {
293
- wasm.__wasm_bindgen_func_elem_3269(arg0, arg1, addHeapObject(arg2));
292
+ function __wasm_bindgen_func_elem_8785(arg0, arg1, arg2) {
293
+ wasm.__wasm_bindgen_func_elem_8785(arg0, arg1, addHeapObject(arg2));
294
294
  }
295
295
 
296
- function __wasm_bindgen_func_elem_8644(arg0, arg1) {
297
- wasm.__wasm_bindgen_func_elem_8644(arg0, arg1);
296
+ function __wasm_bindgen_func_elem_8635(arg0, arg1) {
297
+ wasm.__wasm_bindgen_func_elem_8635(arg0, arg1);
298
298
  }
299
299
 
300
- function __wasm_bindgen_func_elem_10894(arg0, arg1, arg2, arg3) {
301
- wasm.__wasm_bindgen_func_elem_10894(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
300
+ function __wasm_bindgen_func_elem_10881(arg0, arg1, arg2, arg3) {
301
+ wasm.__wasm_bindgen_func_elem_10881(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
302
302
  }
303
303
 
304
304
  const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
@@ -1869,7 +1869,7 @@ export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
1869
1869
  const a = state0.a;
1870
1870
  state0.a = 0;
1871
1871
  try {
1872
- return __wasm_bindgen_func_elem_10894(a, state0.b, arg0, arg1);
1872
+ return __wasm_bindgen_func_elem_10881(a, state0.b, arg0, arg1);
1873
1873
  } finally {
1874
1874
  state0.a = a;
1875
1875
  }
@@ -2189,19 +2189,13 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
2189
2189
 
2190
2190
  export function __wbindgen_cast_4082834687a71a5d(arg0, arg1) {
2191
2191
  // Cast intrinsic for `Closure(Closure { dtor_idx: 1, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
2192
- const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_235, __wasm_bindgen_func_elem_3269);
2192
+ const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_235, __wasm_bindgen_func_elem_3270);
2193
2193
  return addHeapObject(ret);
2194
2194
  };
2195
2195
 
2196
- export function __wbindgen_cast_41f8c1f01ac9df12(arg0, arg1) {
2197
- // Cast intrinsic for `Closure(Closure { dtor_idx: 965, function: Function { arguments: [], shim_idx: 966, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2198
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8635, __wasm_bindgen_func_elem_8644);
2199
- return addHeapObject(ret);
2200
- };
2201
-
2202
- export function __wbindgen_cast_4892f1fb8f346ce7(arg0, arg1) {
2203
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1000, function: Function { arguments: [Externref], shim_idx: 1001, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2204
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8779, __wasm_bindgen_func_elem_8794);
2196
+ export function __wbindgen_cast_448d871898ab3e4e(arg0, arg1) {
2197
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1001, function: Function { arguments: [Externref], shim_idx: 1002, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2198
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8770, __wasm_bindgen_func_elem_8785);
2205
2199
  return addHeapObject(ret);
2206
2200
  };
2207
2201
 
@@ -2217,6 +2211,12 @@ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
2217
2211
  return addHeapObject(ret);
2218
2212
  };
2219
2213
 
2214
+ export function __wbindgen_cast_d5328f274dc9f28a(arg0, arg1) {
2215
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 966, function: Function { arguments: [], shim_idx: 967, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2216
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8626, __wasm_bindgen_func_elem_8635);
2217
+ return addHeapObject(ret);
2218
+ };
2219
+
2220
2220
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
2221
2221
  // Cast intrinsic for `F64 -> Externref`.
2222
2222
  const ret = arg0;
Binary file
@@ -21,10 +21,10 @@ export interface JsOutsideExecutionV3 {
21
21
 
22
22
  export type JsFelt = Felt;
23
23
 
24
- export type JsFeeSource = "PAYMASTER" | "CREDITS";
25
-
26
24
  export type Felts = JsFelt[];
27
25
 
26
+ export type JsFeeSource = "PAYMASTER" | "CREDITS";
27
+
28
28
  export interface JsCall {
29
29
  contractAddress: JsFelt;
30
30
  entrypoint: string;
@@ -42,6 +42,12 @@ export interface CallPolicy {
42
42
  authorized?: boolean;
43
43
  }
44
44
 
45
+ export interface ApprovalPolicy {
46
+ target: JsFelt;
47
+ spender: JsFelt;
48
+ amount: JsFelt;
49
+ }
50
+
45
51
  export interface TypedDataPolicy {
46
52
  scope_hash: JsFelt;
47
53
  authorized?: boolean;
@@ -49,25 +55,12 @@ export interface TypedDataPolicy {
49
55
 
50
56
  export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
51
57
 
52
- export interface ApprovalPolicy {
53
- target: JsFelt;
54
- spender: JsFelt;
55
- amount: JsFelt;
56
- }
58
+ export type JsAddSignerInput = SignerInput;
57
59
 
58
60
  export interface StarknetSigner {
59
61
  privateKey: JsFelt;
60
62
  }
61
63
 
62
- export interface Signer {
63
- webauthns?: WebauthnSigner[];
64
- webauthn?: WebauthnSigner;
65
- starknet?: StarknetSigner;
66
- eip191?: Eip191Signer;
67
- }
68
-
69
- export type JsAddSignerInput = SignerInput;
70
-
71
64
  export interface Eip191Signer {
72
65
  address: string;
73
66
  }
@@ -80,7 +73,12 @@ export interface WebauthnSigner {
80
73
 
81
74
  export type JsRemoveSignerInput = SignerInput;
82
75
 
83
- export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
76
+ export interface Signer {
77
+ webauthns?: WebauthnSigner[];
78
+ webauthn?: WebauthnSigner;
79
+ starknet?: StarknetSigner;
80
+ eip191?: Eip191Signer;
81
+ }
84
82
 
85
83
  export interface AuthorizedSession {
86
84
  session: Session;
@@ -93,6 +91,11 @@ export interface AuthorizedSession {
93
91
  guardianKeyGuid: JsFelt;
94
92
  }
95
93
 
94
+ export interface Credentials {
95
+ authorization: JsFelt[];
96
+ privateKey: JsFelt;
97
+ }
98
+
96
99
  export interface Session {
97
100
  policies: Policy[];
98
101
  expiresAt: number;
@@ -101,19 +104,12 @@ export interface Session {
101
104
  guardianKeyGuid: JsFelt;
102
105
  }
103
106
 
104
- export interface Credentials {
105
- authorization: JsFelt[];
106
- privateKey: JsFelt;
107
- }
107
+ export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
108
108
 
109
109
  export type JsRevokableSession = RevokableSession;
110
110
 
111
111
  export type JsPriceUnit = "WEI" | "FRI";
112
112
 
113
- export interface JsEstimateFeeDetails {
114
- nonce: JsFelt;
115
- }
116
-
117
113
  export interface JsFeeEstimate {
118
114
  l1_gas_consumed: number;
119
115
  l1_gas_price: number;
@@ -124,6 +120,10 @@ export interface JsFeeEstimate {
124
120
  overall_fee: number;
125
121
  }
126
122
 
123
+ export interface JsEstimateFeeDetails {
124
+ nonce: JsFelt;
125
+ }
126
+
127
127
  export type JsRegister = RegisterInput;
128
128
 
129
129
  export type JsRegisterResponse = ResponseData;
@@ -244,16 +244,16 @@ if (!('encodeInto' in cachedTextEncoder)) {
244
244
 
245
245
  let WASM_VECTOR_LEN = 0;
246
246
 
247
- function __wasm_bindgen_func_elem_3880(arg0, arg1) {
248
- wasm.__wasm_bindgen_func_elem_3880(arg0, arg1);
247
+ function __wasm_bindgen_func_elem_4020(arg0, arg1, arg2) {
248
+ wasm.__wasm_bindgen_func_elem_4020(arg0, arg1, addHeapObject(arg2));
249
249
  }
250
250
 
251
- function __wasm_bindgen_func_elem_4025(arg0, arg1, arg2) {
252
- wasm.__wasm_bindgen_func_elem_4025(arg0, arg1, addHeapObject(arg2));
251
+ function __wasm_bindgen_func_elem_3875(arg0, arg1) {
252
+ wasm.__wasm_bindgen_func_elem_3875(arg0, arg1);
253
253
  }
254
254
 
255
- function __wasm_bindgen_func_elem_5813(arg0, arg1, arg2, arg3) {
256
- wasm.__wasm_bindgen_func_elem_5813(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
255
+ function __wasm_bindgen_func_elem_5804(arg0, arg1, arg2, arg3) {
256
+ wasm.__wasm_bindgen_func_elem_5804(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
257
257
  }
258
258
 
259
259
  const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
@@ -892,7 +892,7 @@ export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
892
892
  const a = state0.a;
893
893
  state0.a = 0;
894
894
  try {
895
- return __wasm_bindgen_func_elem_5813(a, state0.b, arg0, arg1);
895
+ return __wasm_bindgen_func_elem_5804(a, state0.b, arg0, arg1);
896
896
  } finally {
897
897
  state0.a = a;
898
898
  }
@@ -1157,15 +1157,15 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
1157
1157
  return addHeapObject(ret);
1158
1158
  };
1159
1159
 
1160
- export function __wbindgen_cast_5878cfe9fa9dbe2e(arg0, arg1) {
1161
- // Cast intrinsic for `Closure(Closure { dtor_idx: 495, function: Function { arguments: [Externref], shim_idx: 496, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1162
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4010, __wasm_bindgen_func_elem_4025);
1160
+ export function __wbindgen_cast_821aeed1a5f992b8(arg0, arg1) {
1161
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 496, function: Function { arguments: [Externref], shim_idx: 497, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1162
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4005, __wasm_bindgen_func_elem_4020);
1163
1163
  return addHeapObject(ret);
1164
1164
  };
1165
1165
 
1166
- export function __wbindgen_cast_c006400c7b517809(arg0, arg1) {
1167
- // Cast intrinsic for `Closure(Closure { dtor_idx: 460, function: Function { arguments: [], shim_idx: 461, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1168
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3871, __wasm_bindgen_func_elem_3880);
1166
+ export function __wbindgen_cast_b35af37582c65a40(arg0, arg1) {
1167
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 461, function: Function { arguments: [], shim_idx: 462, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1168
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3866, __wasm_bindgen_func_elem_3875);
1169
1169
  return addHeapObject(ret);
1170
1170
  };
1171
1171
 
Binary file