@cartridge/controller-wasm 0.3.5 → 0.3.7
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 +1 -1
- package/pkg-controller/account_wasm.d.ts +23 -11
- package/pkg-controller/account_wasm_bg.js +341 -374
- package/pkg-controller/account_wasm_bg.wasm +0 -0
- package/pkg-session/session_wasm.d.ts +12 -1
- package/pkg-session/session_wasm_bg.js +216 -196
- package/pkg-session/session_wasm_bg.wasm +0 -0
|
Binary file
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Subscribes to the creation of a session for a given controller, session_key_guid and cartridge api url.
|
|
5
|
+
* The goal of this function is to know from any place when the register session flow has been completed, and to
|
|
6
|
+
* get the authorization.
|
|
7
|
+
*/
|
|
8
|
+
export function subscribeCreateSession(session_key_guid: JsFelt, cartridge_api_url: string): Promise<JsSubscribeSessionResult>;
|
|
9
|
+
export function signerToGuid(signer: Signer): JsFelt;
|
|
3
10
|
export enum ErrorCode {
|
|
4
11
|
StarknetFailedToReceiveTransaction = 1,
|
|
5
12
|
StarknetContractNotFound = 20,
|
|
@@ -69,6 +76,8 @@ export enum ErrorCode {
|
|
|
69
76
|
TransactionTimeout = 139,
|
|
70
77
|
ConversionError = 140,
|
|
71
78
|
InvalidChainId = 141,
|
|
79
|
+
SessionRefreshRequired = 142,
|
|
80
|
+
ManualExecutionRequired = 143,
|
|
72
81
|
}
|
|
73
82
|
export interface JsCall {
|
|
74
83
|
contractAddress: JsFelt;
|
|
@@ -164,7 +173,7 @@ export type Felts = JsFelt[];
|
|
|
164
173
|
|
|
165
174
|
export type JsFeeSource = "PAYMASTER" | "CREDITS";
|
|
166
175
|
|
|
167
|
-
export type JsSubscribeSessionResult =
|
|
176
|
+
export type JsSubscribeSessionResult = SubscribeCreateSessionSubscribeCreateSession;
|
|
168
177
|
|
|
169
178
|
export type JsRevokableSession = RevokableSession;
|
|
170
179
|
|
|
@@ -195,6 +204,7 @@ export interface Credentials {
|
|
|
195
204
|
export class CartridgeSessionAccount {
|
|
196
205
|
private constructor();
|
|
197
206
|
free(): void;
|
|
207
|
+
[Symbol.dispose](): void;
|
|
198
208
|
static new(rpc_url: string, signer: JsFelt, address: JsFelt, chain_id: JsFelt, session_authorization: JsFelt[], session: Session): CartridgeSessionAccount;
|
|
199
209
|
static newAsRegistered(rpc_url: string, signer: JsFelt, address: JsFelt, owner_guid: JsFelt, chain_id: JsFelt, session: Session): CartridgeSessionAccount;
|
|
200
210
|
sign(hash: JsFelt, calls: JsCall[]): Promise<Felts>;
|
|
@@ -204,6 +214,7 @@ export class CartridgeSessionAccount {
|
|
|
204
214
|
export class JsControllerError {
|
|
205
215
|
private constructor();
|
|
206
216
|
free(): void;
|
|
217
|
+
[Symbol.dispose](): void;
|
|
207
218
|
code: ErrorCode;
|
|
208
219
|
message: string;
|
|
209
220
|
get data(): string | undefined;
|