@azguardwallet/types 0.3.0 → 0.3.1
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/dist/action.d.ts +4 -4
- package/dist/authwit-content.d.ts +4 -4
- package/dist/dapp-session.d.ts +2 -1
- package/dist/event.d.ts +2 -0
- package/dist/operation.d.ts +22 -4
- package/package.json +1 -1
package/dist/action.d.ts
CHANGED
|
@@ -49,17 +49,17 @@ export type EncodedCallAction = {
|
|
|
49
49
|
/** Action kind */
|
|
50
50
|
kind: "encoded_call";
|
|
51
51
|
/** Name of the function */
|
|
52
|
-
name
|
|
52
|
+
name?: string;
|
|
53
53
|
/** Address of the contract (AztecAddress) */
|
|
54
54
|
to: string;
|
|
55
55
|
/** Selector of the function (FunctionSelector) */
|
|
56
56
|
selector: string;
|
|
57
57
|
/** Type of the function (FunctionType) */
|
|
58
|
-
type
|
|
58
|
+
type?: string;
|
|
59
59
|
/** Whether this call can makes modifications to state or not */
|
|
60
|
-
isStatic
|
|
60
|
+
isStatic?: boolean;
|
|
61
61
|
/** Encoded arguments (Fr[]) */
|
|
62
62
|
args: string[];
|
|
63
63
|
/** Return types for decoding (AbiType[]) */
|
|
64
|
-
returnTypes
|
|
64
|
+
returnTypes?: unknown[];
|
|
65
65
|
};
|
|
@@ -20,19 +20,19 @@ export type EncodedCallAuthwitContent = {
|
|
|
20
20
|
/** Address of the caller (AztecAddress) */
|
|
21
21
|
caller: string;
|
|
22
22
|
/** Name of the function */
|
|
23
|
-
name
|
|
23
|
+
name?: string;
|
|
24
24
|
/** Address of the contract (AztecAddress) */
|
|
25
25
|
to: string;
|
|
26
26
|
/** Selector of the function (FunctionSelector) */
|
|
27
27
|
selector: string;
|
|
28
28
|
/** Type of the function (FunctionType) */
|
|
29
|
-
type
|
|
29
|
+
type?: string;
|
|
30
30
|
/** Whether this call can makes modifications to state or not */
|
|
31
|
-
isStatic
|
|
31
|
+
isStatic?: boolean;
|
|
32
32
|
/** Encoded arguments (Fr[]) */
|
|
33
33
|
args: string[];
|
|
34
34
|
/** Return types for decoding (AbiType[]) */
|
|
35
|
-
returnTypes
|
|
35
|
+
returnTypes?: unknown[];
|
|
36
36
|
};
|
|
37
37
|
/** Arbitrary intent to be authorized */
|
|
38
38
|
export type IntentAuthwitContent = {
|
package/dist/dapp-session.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ActionKind } from "./action";
|
|
2
|
+
import { EventKind } from "./event";
|
|
2
3
|
import { OperationKind } from "./operation";
|
|
3
4
|
/** Chain id (CAIP-2) */
|
|
4
5
|
export type CaipChain = `aztec:${number}`;
|
|
@@ -22,7 +23,7 @@ export type DappPermissions = {
|
|
|
22
23
|
/** List of methods */
|
|
23
24
|
methods?: (OperationKind | ActionKind)[];
|
|
24
25
|
/** List of events */
|
|
25
|
-
events?:
|
|
26
|
+
events?: EventKind[];
|
|
26
27
|
};
|
|
27
28
|
/** Dapp session */
|
|
28
29
|
export type DappSession = {
|
package/dist/event.d.ts
ADDED
package/dist/operation.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Action } from "./action";
|
|
1
|
+
import { Action, CallAction, EncodedCallAction } from "./action";
|
|
2
2
|
import { Result } from "./result";
|
|
3
3
|
import { CaipAccount, CaipChain } from "./dapp-session";
|
|
4
4
|
/** Operation kind */
|
|
5
|
-
export type OperationKind = "add_note" | "get_complete_address" | "register_contract" | "register_sender" | "send_transaction" | "simulate_transaction" | "simulate_unconstrained";
|
|
5
|
+
export type OperationKind = "add_note" | "get_complete_address" | "register_contract" | "register_sender" | "send_transaction" | "simulate_transaction" | "simulate_unconstrained" | "simulate_views";
|
|
6
6
|
/** A request to perform some operation */
|
|
7
|
-
export type Operation = AddNoteOperation | GetCompleteAddressOperation | RegisterContractOperation | RegisterSenderOperation | SendTransactionOperation | SimulateTransactionOperation | SimulateUnconstrainedOperation;
|
|
7
|
+
export type Operation = AddNoteOperation | GetCompleteAddressOperation | RegisterContractOperation | RegisterSenderOperation | SendTransactionOperation | SimulateTransactionOperation | SimulateUnconstrainedOperation | SimulateViewsOperation;
|
|
8
8
|
/** Operation result */
|
|
9
|
-
export type OperationResult = AddNoteResult | GetCompleteAddressResult | RegisterContractResult | RegisterSenderResult | SendTransactionResult | SimulateTransactionResult | SimulateUnconstrainedResult;
|
|
9
|
+
export type OperationResult = AddNoteResult | GetCompleteAddressResult | RegisterContractResult | RegisterSenderResult | SendTransactionResult | SimulateTransactionResult | SimulateUnconstrainedResult | SimulateViewsResult;
|
|
10
10
|
/** A request to add a note to PXE */
|
|
11
11
|
export type AddNoteOperation = {
|
|
12
12
|
/** Operation kind */
|
|
@@ -123,3 +123,21 @@ export type SimulateUnconstrainedOperation = {
|
|
|
123
123
|
};
|
|
124
124
|
/** A result of the "simulate_unconstrained" operation (AbiDecoded) */
|
|
125
125
|
export type SimulateUnconstrainedResult = Result<unknown>;
|
|
126
|
+
/** A request to simulate the batch of view calls */
|
|
127
|
+
export type SimulateViewsOperation = {
|
|
128
|
+
/** Operation kind */
|
|
129
|
+
kind: "simulate_views";
|
|
130
|
+
/** Address of the account to simulate for */
|
|
131
|
+
account: CaipAccount;
|
|
132
|
+
/** Batch of view calls to simulate */
|
|
133
|
+
calls: (CallAction | EncodedCallAction)[];
|
|
134
|
+
};
|
|
135
|
+
/** Wrapped views simulation results */
|
|
136
|
+
export type ViewsSimulationResult = {
|
|
137
|
+
/** List of results, encoded with function return types ABI (Fr[][]) */
|
|
138
|
+
encoded: string[][];
|
|
139
|
+
/** List of results, decoded with function return types ABI (AbiDecoded[]) */
|
|
140
|
+
decoded: unknown[];
|
|
141
|
+
};
|
|
142
|
+
/** A result of the "simulate_views" operation */
|
|
143
|
+
export type SimulateViewsResult = Result<ViewsSimulationResult>;
|
package/package.json
CHANGED