@cartridge/controller-wasm 0.7.14-d14c877 → 0.7.14-ef2704c

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-d14c877",
3
+ "version": "0.7.14-ef2704c",
4
4
  "description": "Wasm bindings for Cartridge Controller and Session Account",
5
5
  "type": "module",
6
6
  "main": "./pkg-controller/account_wasm.js",
@@ -21,10 +21,10 @@ export interface JsSignedOutsideExecution {
21
21
 
22
22
  export type Felts = JsFelt[];
23
23
 
24
- export type JsFelt = Felt;
25
-
26
24
  export type JsFeeSource = "PAYMASTER" | "CREDITS";
27
25
 
26
+ export type JsFelt = Felt;
27
+
28
28
  export interface JsCall {
29
29
  contractAddress: JsFelt;
30
30
  entrypoint: string;
@@ -36,39 +36,31 @@ 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
+
39
45
  export interface TypedDataPolicy {
40
46
  scope_hash: JsFelt;
41
47
  authorized?: boolean;
42
48
  }
43
49
 
50
+ export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
51
+
44
52
  export interface ApprovalPolicy {
45
53
  target: JsFelt;
46
54
  spender: JsFelt;
47
55
  amount: JsFelt;
48
56
  }
49
57
 
50
- export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
51
-
52
- export interface CallPolicy {
53
- target: JsFelt;
54
- method: JsFelt;
55
- authorized?: boolean;
56
- }
57
-
58
- export interface StarknetSigner {
59
- privateKey: JsFelt;
60
- }
61
-
62
- export type JsAddSignerInput = SignerInput;
63
-
64
58
  export interface WebauthnSigner {
65
59
  rpId: string;
66
60
  credentialId: string;
67
61
  publicKey: string;
68
62
  }
69
63
 
70
- export type JsRemoveSignerInput = SignerInput;
71
-
72
64
  export interface Eip191Signer {
73
65
  address: string;
74
66
  }
@@ -80,6 +72,16 @@ export interface Signer {
80
72
  eip191?: Eip191Signer;
81
73
  }
82
74
 
75
+ export interface StarknetSigner {
76
+ privateKey: JsFelt;
77
+ }
78
+
79
+ export type JsRemoveSignerInput = SignerInput;
80
+
81
+ export type JsAddSignerInput = SignerInput;
82
+
83
+ export type JsRevokableSession = RevokableSession;
84
+
83
85
  export interface AuthorizedSession {
84
86
  session: Session;
85
87
  authorization: JsFelt[] | null;
@@ -91,14 +93,6 @@ export interface AuthorizedSession {
91
93
  guardianKeyGuid: JsFelt;
92
94
  }
93
95
 
94
- export interface Session {
95
- policies: Policy[];
96
- expiresAt: number;
97
- metadataHash: JsFelt;
98
- sessionKeyGuid: JsFelt;
99
- guardianKeyGuid: JsFelt;
100
- }
101
-
102
96
  export interface Credentials {
103
97
  authorization: JsFelt[];
104
98
  privateKey: JsFelt;
@@ -106,10 +100,12 @@ export interface Credentials {
106
100
 
107
101
  export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
108
102
 
109
- export type JsRevokableSession = RevokableSession;
110
-
111
- export interface JsEstimateFeeDetails {
112
- nonce: JsFelt;
103
+ export interface Session {
104
+ policies: Policy[];
105
+ expiresAt: number;
106
+ metadataHash: JsFelt;
107
+ sessionKeyGuid: JsFelt;
108
+ guardianKeyGuid: JsFelt;
113
109
  }
114
110
 
115
111
  export interface JsFeeEstimate {
@@ -124,10 +120,14 @@ export interface JsFeeEstimate {
124
120
 
125
121
  export type JsPriceUnit = "WEI" | "FRI";
126
122
 
127
- export type JsRegister = RegisterInput;
123
+ export interface JsEstimateFeeDetails {
124
+ nonce: JsFelt;
125
+ }
128
126
 
129
127
  export type JsRegisterResponse = ResponseData;
130
128
 
129
+ export type JsRegister = RegisterInput;
130
+
131
131
 
132
132
  export class CartridgeAccount {
133
133
  private constructor();
@@ -289,12 +289,12 @@ 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_8635(arg0, arg1) {
293
- wasm.__wasm_bindgen_func_elem_8635(arg0, arg1);
292
+ function __wasm_bindgen_func_elem_8787(arg0, arg1, arg2) {
293
+ wasm.__wasm_bindgen_func_elem_8787(arg0, arg1, addHeapObject(arg2));
294
294
  }
295
295
 
296
- function __wasm_bindgen_func_elem_8785(arg0, arg1, arg2) {
297
- wasm.__wasm_bindgen_func_elem_8785(arg0, arg1, addHeapObject(arg2));
296
+ function __wasm_bindgen_func_elem_8637(arg0, arg1) {
297
+ wasm.__wasm_bindgen_func_elem_8637(arg0, arg1);
298
298
  }
299
299
 
300
300
  function __wasm_bindgen_func_elem_10881(arg0, arg1, arg2, arg3) {
@@ -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_8628, __wasm_bindgen_func_elem_8637);
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_8772, __wasm_bindgen_func_elem_8787);
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
@@ -36,48 +36,58 @@ 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;
48
42
  amount: JsFelt;
49
43
  }
50
44
 
45
+ export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
46
+
47
+ export interface CallPolicy {
48
+ target: JsFelt;
49
+ method: JsFelt;
50
+ authorized?: boolean;
51
+ }
52
+
51
53
  export interface TypedDataPolicy {
52
54
  scope_hash: JsFelt;
53
55
  authorized?: boolean;
54
56
  }
55
57
 
56
- export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
58
+ export type JsRemoveSignerInput = SignerInput;
57
59
 
58
- export type JsAddSignerInput = SignerInput;
60
+ export interface Signer {
61
+ webauthns?: WebauthnSigner[];
62
+ webauthn?: WebauthnSigner;
63
+ starknet?: StarknetSigner;
64
+ eip191?: Eip191Signer;
65
+ }
59
66
 
60
- export interface StarknetSigner {
61
- privateKey: JsFelt;
67
+ export interface WebauthnSigner {
68
+ rpId: string;
69
+ credentialId: string;
70
+ publicKey: string;
62
71
  }
63
72
 
73
+ export type JsAddSignerInput = SignerInput;
74
+
64
75
  export interface Eip191Signer {
65
76
  address: string;
66
77
  }
67
78
 
68
- export interface WebauthnSigner {
69
- rpId: string;
70
- credentialId: string;
71
- publicKey: string;
79
+ export interface StarknetSigner {
80
+ privateKey: JsFelt;
72
81
  }
73
82
 
74
- export type JsRemoveSignerInput = SignerInput;
83
+ export type JsRevokableSession = RevokableSession;
75
84
 
76
- export interface Signer {
77
- webauthns?: WebauthnSigner[];
78
- webauthn?: WebauthnSigner;
79
- starknet?: StarknetSigner;
80
- eip191?: Eip191Signer;
85
+ export interface Session {
86
+ policies: Policy[];
87
+ expiresAt: number;
88
+ metadataHash: JsFelt;
89
+ sessionKeyGuid: JsFelt;
90
+ guardianKeyGuid: JsFelt;
81
91
  }
82
92
 
83
93
  export interface AuthorizedSession {
@@ -91,23 +101,13 @@ export interface AuthorizedSession {
91
101
  guardianKeyGuid: JsFelt;
92
102
  }
93
103
 
104
+ export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
105
+
94
106
  export interface Credentials {
95
107
  authorization: JsFelt[];
96
108
  privateKey: JsFelt;
97
109
  }
98
110
 
99
- export interface Session {
100
- policies: Policy[];
101
- expiresAt: number;
102
- metadataHash: JsFelt;
103
- sessionKeyGuid: JsFelt;
104
- guardianKeyGuid: JsFelt;
105
- }
106
-
107
- export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
108
-
109
- export type JsRevokableSession = RevokableSession;
110
-
111
111
  export type JsPriceUnit = "WEI" | "FRI";
112
112
 
113
113
  export interface JsFeeEstimate {
@@ -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_3875(arg0, arg1) {
248
- wasm.__wasm_bindgen_func_elem_3875(arg0, arg1);
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_4020(arg0, arg1, arg2) {
252
- wasm.__wasm_bindgen_func_elem_4020(arg0, arg1, addHeapObject(arg2));
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