@cartridge/controller-wasm 0.7.14-634aa73 → 0.7.14-8688cb9

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-634aa73",
3
+ "version": "0.7.14-8688cb9",
4
4
  "description": "Wasm bindings for Cartridge Controller and Session Account",
5
5
  "type": "module",
6
6
  "main": "./pkg-controller/account_wasm.js",
@@ -1,5 +1,13 @@
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
+
3
11
  /**
4
12
  * JavaScript-friendly OutsideExecution V3 structure
5
13
  */
@@ -11,19 +19,11 @@ export interface JsOutsideExecutionV3 {
11
19
  nonce: [JsFelt, JsFelt];
12
20
  }
13
21
 
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
- export type Felts = JsFelt[];
22
+ export type JsFeeSource = "PAYMASTER" | "CREDITS";
23
23
 
24
24
  export type JsFelt = Felt;
25
25
 
26
- export type JsFeeSource = "PAYMASTER" | "CREDITS";
26
+ export type Felts = JsFelt[];
27
27
 
28
28
  export interface JsCall {
29
29
  contractAddress: JsFelt;
@@ -36,48 +36,48 @@ export interface Owner {
36
36
  account?: JsFelt;
37
37
  }
38
38
 
39
- export interface TypedDataPolicy {
40
- scope_hash: JsFelt;
41
- authorized?: boolean;
42
- }
43
-
44
39
  export interface ApprovalPolicy {
45
40
  target: JsFelt;
46
41
  spender: JsFelt;
47
42
  amount: JsFelt;
48
43
  }
49
44
 
50
- export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
51
-
52
45
  export interface CallPolicy {
53
46
  target: JsFelt;
54
47
  method: JsFelt;
55
48
  authorized?: boolean;
56
49
  }
57
50
 
58
- export interface StarknetSigner {
59
- privateKey: JsFelt;
51
+ export interface TypedDataPolicy {
52
+ scope_hash: JsFelt;
53
+ authorized?: boolean;
60
54
  }
61
55
 
62
- export type JsAddSignerInput = SignerInput;
56
+ export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
63
57
 
64
- export interface WebauthnSigner {
65
- rpId: string;
66
- credentialId: string;
67
- publicKey: string;
58
+ export interface Signer {
59
+ webauthns?: WebauthnSigner[];
60
+ webauthn?: WebauthnSigner;
61
+ starknet?: StarknetSigner;
62
+ eip191?: Eip191Signer;
68
63
  }
69
64
 
70
- export type JsRemoveSignerInput = SignerInput;
71
-
72
65
  export interface Eip191Signer {
73
66
  address: string;
74
67
  }
75
68
 
76
- export interface Signer {
77
- webauthns?: WebauthnSigner[];
78
- webauthn?: WebauthnSigner;
79
- starknet?: StarknetSigner;
80
- eip191?: Eip191Signer;
69
+ export type JsRemoveSignerInput = SignerInput;
70
+
71
+ export type JsAddSignerInput = SignerInput;
72
+
73
+ export interface StarknetSigner {
74
+ privateKey: JsFelt;
75
+ }
76
+
77
+ export interface WebauthnSigner {
78
+ rpId: string;
79
+ credentialId: string;
80
+ publicKey: string;
81
81
  }
82
82
 
83
83
  export interface AuthorizedSession {
@@ -91,6 +91,8 @@ export interface AuthorizedSession {
91
91
  guardianKeyGuid: JsFelt;
92
92
  }
93
93
 
94
+ export type JsRevokableSession = RevokableSession;
95
+
94
96
  export interface Session {
95
97
  policies: Policy[];
96
98
  expiresAt: number;
@@ -99,14 +101,14 @@ export interface Session {
99
101
  guardianKeyGuid: JsFelt;
100
102
  }
101
103
 
104
+ export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
105
+
102
106
  export interface Credentials {
103
107
  authorization: JsFelt[];
104
108
  privateKey: JsFelt;
105
109
  }
106
110
 
107
- export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
108
-
109
- export type JsRevokableSession = RevokableSession;
111
+ export type JsPriceUnit = "WEI" | "FRI";
110
112
 
111
113
  export interface JsEstimateFeeDetails {
112
114
  nonce: JsFelt;
@@ -122,8 +124,6 @@ export interface JsFeeEstimate {
122
124
  overall_fee: number;
123
125
  }
124
126
 
125
- export type JsPriceUnit = "WEI" | "FRI";
126
-
127
127
  export type JsRegister = RegisterInput;
128
128
 
129
129
  export type JsRegisterResponse = ResponseData;
@@ -289,16 +289,16 @@ function __wasm_bindgen_func_elem_3270(arg0, arg1, arg2) {
289
289
  wasm.__wasm_bindgen_func_elem_3270(arg0, arg1, addHeapObject(arg2));
290
290
  }
291
291
 
292
- function __wasm_bindgen_func_elem_8785(arg0, arg1, arg2) {
293
- wasm.__wasm_bindgen_func_elem_8785(arg0, arg1, addHeapObject(arg2));
292
+ function __wasm_bindgen_func_elem_8786(arg0, arg1, arg2) {
293
+ wasm.__wasm_bindgen_func_elem_8786(arg0, arg1, addHeapObject(arg2));
294
294
  }
295
295
 
296
- function __wasm_bindgen_func_elem_8635(arg0, arg1) {
297
- wasm.__wasm_bindgen_func_elem_8635(arg0, arg1);
296
+ function __wasm_bindgen_func_elem_8636(arg0, arg1) {
297
+ wasm.__wasm_bindgen_func_elem_8636(arg0, arg1);
298
298
  }
299
299
 
300
- function __wasm_bindgen_func_elem_10881(arg0, arg1, arg2, arg3) {
301
- wasm.__wasm_bindgen_func_elem_10881(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
300
+ function __wasm_bindgen_func_elem_10880(arg0, arg1, arg2, arg3) {
301
+ wasm.__wasm_bindgen_func_elem_10880(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_10881(a, state0.b, arg0, arg1);
1872
+ return __wasm_bindgen_func_elem_10880(a, state0.b, arg0, arg1);
1873
1873
  } finally {
1874
1874
  state0.a = a;
1875
1875
  }
@@ -2193,9 +2193,15 @@ export function __wbindgen_cast_4082834687a71a5d(arg0, arg1) {
2193
2193
  return addHeapObject(ret);
2194
2194
  };
2195
2195
 
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);
2196
+ export function __wbindgen_cast_7150eb18024763bc(arg0, arg1) {
2197
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 969, function: Function { arguments: [], shim_idx: 970, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2198
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8627, __wasm_bindgen_func_elem_8636);
2199
+ return addHeapObject(ret);
2200
+ };
2201
+
2202
+ export function __wbindgen_cast_838747baf6b6553b(arg0, arg1) {
2203
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1004, function: Function { arguments: [Externref], shim_idx: 1005, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2204
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8771, __wasm_bindgen_func_elem_8786);
2199
2205
  return addHeapObject(ret);
2200
2206
  };
2201
2207
 
@@ -2211,12 +2217,6 @@ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
2211
2217
  return addHeapObject(ret);
2212
2218
  };
2213
2219
 
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
@@ -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,12 +11,20 @@ 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
+ export type JsFeeSource = "PAYMASTER" | "CREDITS";
23
+
22
24
  export type JsFelt = Felt;
23
25
 
24
26
  export type Felts = JsFelt[];
25
27
 
26
- export type JsFeeSource = "PAYMASTER" | "CREDITS";
27
-
28
28
  export interface JsCall {
29
29
  contractAddress: JsFelt;
30
30
  entrypoint: string;
@@ -36,12 +36,6 @@ export interface Owner {
36
36
  account?: JsFelt;
37
37
  }
38
38
 
39
- export interface CallPolicy {
40
- target: JsFelt;
41
- method: JsFelt;
42
- authorized?: boolean;
43
- }
44
-
45
39
  export interface ApprovalPolicy {
46
40
  target: JsFelt;
47
41
  spender: JsFelt;
@@ -53,16 +47,29 @@ export interface TypedDataPolicy {
53
47
  authorized?: boolean;
54
48
  }
55
49
 
50
+ export interface CallPolicy {
51
+ target: JsFelt;
52
+ method: JsFelt;
53
+ authorized?: boolean;
54
+ }
55
+
56
56
  export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
57
57
 
58
+ export interface Eip191Signer {
59
+ address: string;
60
+ }
61
+
58
62
  export type JsAddSignerInput = SignerInput;
59
63
 
60
64
  export interface StarknetSigner {
61
65
  privateKey: JsFelt;
62
66
  }
63
67
 
64
- export interface Eip191Signer {
65
- address: string;
68
+ export interface Signer {
69
+ webauthns?: WebauthnSigner[];
70
+ webauthn?: WebauthnSigner;
71
+ starknet?: StarknetSigner;
72
+ eip191?: Eip191Signer;
66
73
  }
67
74
 
68
75
  export interface WebauthnSigner {
@@ -73,29 +80,15 @@ export interface WebauthnSigner {
73
80
 
74
81
  export type JsRemoveSignerInput = SignerInput;
75
82
 
76
- export interface Signer {
77
- webauthns?: WebauthnSigner[];
78
- webauthn?: WebauthnSigner;
79
- starknet?: StarknetSigner;
80
- eip191?: Eip191Signer;
81
- }
82
-
83
- export interface AuthorizedSession {
84
- session: Session;
85
- authorization: JsFelt[] | null;
86
- isRegistered: boolean;
87
- expiresAt: number;
88
- allowedPoliciesRoot: JsFelt;
89
- metadataHash: JsFelt;
90
- sessionKeyGuid: JsFelt;
91
- guardianKeyGuid: JsFelt;
92
- }
83
+ export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
93
84
 
94
85
  export interface Credentials {
95
86
  authorization: JsFelt[];
96
87
  privateKey: JsFelt;
97
88
  }
98
89
 
90
+ export type JsRevokableSession = RevokableSession;
91
+
99
92
  export interface Session {
100
93
  policies: Policy[];
101
94
  expiresAt: number;
@@ -104,11 +97,20 @@ export interface Session {
104
97
  guardianKeyGuid: JsFelt;
105
98
  }
106
99
 
107
- export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
108
-
109
- export type JsRevokableSession = RevokableSession;
100
+ export interface AuthorizedSession {
101
+ session: Session;
102
+ authorization: JsFelt[] | null;
103
+ isRegistered: boolean;
104
+ expiresAt: number;
105
+ allowedPoliciesRoot: JsFelt;
106
+ metadataHash: JsFelt;
107
+ sessionKeyGuid: JsFelt;
108
+ guardianKeyGuid: JsFelt;
109
+ }
110
110
 
111
- export type JsPriceUnit = "WEI" | "FRI";
111
+ export interface JsEstimateFeeDetails {
112
+ nonce: JsFelt;
113
+ }
112
114
 
113
115
  export interface JsFeeEstimate {
114
116
  l1_gas_consumed: number;
@@ -120,9 +122,7 @@ export interface JsFeeEstimate {
120
122
  overall_fee: number;
121
123
  }
122
124
 
123
- export interface JsEstimateFeeDetails {
124
- nonce: JsFelt;
125
- }
125
+ export type JsPriceUnit = "WEI" | "FRI";
126
126
 
127
127
  export type JsRegister = RegisterInput;
128
128
 
@@ -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_4020(arg0, arg1, arg2) {
248
- wasm.__wasm_bindgen_func_elem_4020(arg0, arg1, addHeapObject(arg2));
247
+ function __wasm_bindgen_func_elem_4023(arg0, arg1, arg2) {
248
+ wasm.__wasm_bindgen_func_elem_4023(arg0, arg1, addHeapObject(arg2));
249
249
  }
250
250
 
251
- function __wasm_bindgen_func_elem_3875(arg0, arg1) {
252
- wasm.__wasm_bindgen_func_elem_3875(arg0, arg1);
251
+ function __wasm_bindgen_func_elem_3878(arg0, arg1) {
252
+ wasm.__wasm_bindgen_func_elem_3878(arg0, arg1);
253
253
  }
254
254
 
255
- function __wasm_bindgen_func_elem_5804(arg0, arg1, arg2, arg3) {
256
- wasm.__wasm_bindgen_func_elem_5804(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
255
+ function __wasm_bindgen_func_elem_5806(arg0, arg1, arg2, arg3) {
256
+ wasm.__wasm_bindgen_func_elem_5806(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_5804(a, state0.b, arg0, arg1);
895
+ return __wasm_bindgen_func_elem_5806(a, state0.b, arg0, arg1);
896
896
  } finally {
897
897
  state0.a = a;
898
898
  }
@@ -1151,21 +1151,15 @@ export function __wbg_versions_c01dfd4722a88165(arg0) {
1151
1151
  return addHeapObject(ret);
1152
1152
  };
1153
1153
 
1154
- export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
1155
- // Cast intrinsic for `Ref(String) -> Externref`.
1156
- const ret = getStringFromWasm0(arg0, arg1);
1157
- return addHeapObject(ret);
1158
- };
1159
-
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);
1154
+ export function __wbindgen_cast_012c9f0b783cb7f4(arg0, arg1) {
1155
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 500, function: Function { arguments: [Externref], shim_idx: 501, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1156
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4008, __wasm_bindgen_func_elem_4023);
1163
1157
  return addHeapObject(ret);
1164
1158
  };
1165
1159
 
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);
1160
+ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
1161
+ // Cast intrinsic for `Ref(String) -> Externref`.
1162
+ const ret = getStringFromWasm0(arg0, arg1);
1169
1163
  return addHeapObject(ret);
1170
1164
  };
1171
1165
 
@@ -1181,6 +1175,12 @@ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
1181
1175
  return addHeapObject(ret);
1182
1176
  };
1183
1177
 
1178
+ export function __wbindgen_cast_e585a18257edad45(arg0, arg1) {
1179
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 465, function: Function { arguments: [], shim_idx: 466, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1180
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3869, __wasm_bindgen_func_elem_3878);
1181
+ return addHeapObject(ret);
1182
+ };
1183
+
1184
1184
  export function __wbindgen_object_clone_ref(arg0) {
1185
1185
  const ret = getObject(arg0);
1186
1186
  return addHeapObject(ret);
Binary file