Skip to content

Commit 3731184

Browse files
committed
Refactor session registration / deployment
1 parent 0a28af1 commit 3731184

File tree

12 files changed

+343
-385
lines changed

12 files changed

+343
-385
lines changed

packages/account-wasm/pkg/account_wasm.d.ts

+18-30
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
/* tslint:disable */
22
/* eslint-disable */
3-
export interface JsInvocationsDetails {
4-
nonce: Felt;
5-
maxFee: Felt;
6-
}
7-
83
export interface JsOutsideExecution {
94
caller: Felt;
105
executeBefore: number;
@@ -13,24 +8,29 @@ export interface JsOutsideExecution {
138
nonce: Felt;
149
}
1510

16-
export interface JsPolicy {
17-
target: string;
18-
method: string;
19-
}
11+
export type Felts = JsFelt[];
12+
13+
export type JsFelt = Felt;
2014

2115
export interface JsCall {
2216
contractAddress: Felt;
2317
entrypoint: string;
2418
calldata: Felt[];
2519
}
2620

27-
export interface JsEstimateFeeDetails {
21+
export interface JsInvocationsDetails {
2822
nonce: Felt;
23+
maxFee: Felt;
2924
}
3025

31-
export type Felts = JsFelt[];
26+
export interface JsPolicy {
27+
target: string;
28+
method: string;
29+
}
3230

33-
export type JsFelt = Felt;
31+
export interface JsEstimateFeeDetails {
32+
nonce: Felt;
33+
}
3434

3535
export interface JsSession {
3636
policies: JsPolicy[];
@@ -115,13 +115,6 @@ export class CartridgeAccount {
115115
*/
116116
sessionJson(): any;
117117
/**
118-
* @param {(JsPolicy)[]} policies
119-
* @param {bigint} expires_at
120-
* @param {any} external_account
121-
* @returns {any}
122-
*/
123-
static registerSessionCalldata(policies: (JsPolicy)[], expires_at: bigint, external_account: any): any;
124-
/**
125118
*/
126119
revokeSession(): void;
127120
/**
@@ -139,19 +132,14 @@ export class CartridgeAccount {
139132
*/
140133
delegateAccount(): Promise<JsFelt>;
141134
/**
142-
* @param {any} salt
143-
* @param {any} external_owner
144-
* @returns {any}
145-
*/
146-
static getUdcDeployedAddress(salt: any, external_owner: any): any;
147-
/**
148-
* @returns {any}
149-
*/
150-
static getAccountClassHash(): any;
151-
/**
135+
* @param {any} owner
136+
* @param {any} username
137+
* @param {bigint} initial_deposit
138+
* @param {(JsPolicy)[]} policies
139+
* @param {bigint} expires_at
152140
* @returns {any}
153141
*/
154-
static getUdcAddress(): any;
142+
static externalDeploymentCalls(owner: any, username: any, initial_deposit: bigint, policies: (JsPolicy)[], expires_at: bigint): any;
155143
}
156144
/**
157145
*/

packages/account-wasm/pkg/account_wasm.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
import * as wasm from "./account_wasm_bg.wasm";
23
import { __wbg_set_wasm } from "./account_wasm_bg.js";
34
__wbg_set_wasm(wasm);

0 commit comments

Comments
 (0)