Skip to content

Commit

Permalink
Refactor session registration / deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed Sep 9, 2024
1 parent 0a28af1 commit 019736e
Show file tree
Hide file tree
Showing 12 changed files with 343 additions and 385 deletions.
48 changes: 18 additions & 30 deletions packages/account-wasm/pkg/account_wasm.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
/* tslint:disable */
/* eslint-disable */
export interface JsInvocationsDetails {
nonce: Felt;
maxFee: Felt;
}

export interface JsOutsideExecution {
caller: Felt;
executeBefore: number;
Expand All @@ -13,24 +8,29 @@ export interface JsOutsideExecution {
nonce: Felt;
}

export interface JsPolicy {
target: string;
method: string;
}
export type Felts = JsFelt[];

export type JsFelt = Felt;

export interface JsCall {
contractAddress: Felt;
entrypoint: string;
calldata: Felt[];
}

export interface JsEstimateFeeDetails {
export interface JsInvocationsDetails {
nonce: Felt;
maxFee: Felt;
}

export type Felts = JsFelt[];
export interface JsPolicy {
target: string;
method: string;
}

export type JsFelt = Felt;
export interface JsEstimateFeeDetails {
nonce: Felt;
}

export interface JsSession {
policies: JsPolicy[];
Expand Down Expand Up @@ -115,13 +115,6 @@ export class CartridgeAccount {
*/
sessionJson(): any;
/**
* @param {(JsPolicy)[]} policies
* @param {bigint} expires_at
* @param {any} external_account
* @returns {any}
*/
static registerSessionCalldata(policies: (JsPolicy)[], expires_at: bigint, external_account: any): any;
/**
*/
revokeSession(): void;
/**
Expand All @@ -139,19 +132,14 @@ export class CartridgeAccount {
*/
delegateAccount(): Promise<JsFelt>;
/**
* @param {any} salt
* @param {any} external_owner
* @returns {any}
*/
static getUdcDeployedAddress(salt: any, external_owner: any): any;
/**
* @returns {any}
*/
static getAccountClassHash(): any;
/**
* @param {any} owner
* @param {any} username
* @param {(JsPolicy)[]} policies
* @param {bigint} expires_at
* @param {bigint} initial_deposit
* @returns {any}
*/
static getUdcAddress(): any;
static externalDeploymentCalls(owner: any, username: any, policies: (JsPolicy)[], expires_at: bigint, initial_deposit: bigint): any;
}
/**
*/
Expand Down
1 change: 1 addition & 0 deletions packages/account-wasm/pkg/account_wasm.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import * as wasm from "./account_wasm_bg.wasm";
import { __wbg_set_wasm } from "./account_wasm_bg.js";
__wbg_set_wasm(wasm);
Expand Down
Loading

0 comments on commit 019736e

Please sign in to comment.