@azguardwallet/types 0.3.2 → 0.4.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/operation.d.ts +19 -19
- package/package.json +1 -1
package/dist/operation.d.ts
CHANGED
|
@@ -2,22 +2,11 @@ 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" | "
|
|
5
|
+
export type OperationKind = "add_note" | "get_complete_address" | "register_contract" | "register_sender" | "register_token" | "send_transaction" | "simulate_transaction" | "simulate_utility" | "simulate_views";
|
|
6
6
|
/** A request to perform some operation */
|
|
7
|
-
export type Operation =
|
|
7
|
+
export type Operation = GetCompleteAddressOperation | RegisterContractOperation | RegisterSenderOperation | RegisterTokenOperation | SendTransactionOperation | SimulateTransactionOperation | SimulateUtilityOperation | SimulateViewsOperation;
|
|
8
8
|
/** Operation result */
|
|
9
|
-
export type OperationResult = Result<
|
|
10
|
-
/** A request to add a note to PXE */
|
|
11
|
-
export type AddNoteOperation = {
|
|
12
|
-
/** Operation kind */
|
|
13
|
-
kind: "add_note";
|
|
14
|
-
/** Account to add the note for */
|
|
15
|
-
account: CaipAccount;
|
|
16
|
-
/** Note to add (ExtendedNote) */
|
|
17
|
-
note: unknown;
|
|
18
|
-
};
|
|
19
|
-
/** A result of the "add_note" operation */
|
|
20
|
-
export type AddNoteResult = void;
|
|
9
|
+
export type OperationResult = Result<GetCompleteAddressResult> | Result<RegisterContractResult> | Result<RegisterSenderResult> | Result<RegisterTokenResult> | Result<SendTransactionResult> | Result<SimulateTransactionResult> | Result<SimulateUtilityResult> | Result<SimulateViewsResult>;
|
|
21
10
|
/** A request to get complete address of the specified account */
|
|
22
11
|
export type GetCompleteAddressOperation = {
|
|
23
12
|
/** Operation kind */
|
|
@@ -59,6 +48,17 @@ export type RegisterSenderOperation = {
|
|
|
59
48
|
};
|
|
60
49
|
/** A result of the "register_sender" operation */
|
|
61
50
|
export type RegisterSenderResult = void;
|
|
51
|
+
/** A request to import the token into the wallet */
|
|
52
|
+
export type RegisterTokenOperation = {
|
|
53
|
+
/** Operation kind */
|
|
54
|
+
kind: "register_token";
|
|
55
|
+
/** Address of the account to add the token for */
|
|
56
|
+
account: CaipAccount;
|
|
57
|
+
/** Address of the token contract (AztecAddress) */
|
|
58
|
+
address: string;
|
|
59
|
+
};
|
|
60
|
+
/** A result of the "register_token" operation */
|
|
61
|
+
export type RegisterTokenResult = Result<void>;
|
|
62
62
|
/** A request to send the transaction */
|
|
63
63
|
export type SendTransactionOperation = {
|
|
64
64
|
/** Operation kind */
|
|
@@ -106,10 +106,10 @@ export type SimulateTransactionResult = {
|
|
|
106
106
|
/** Public return values (NestedProcessReturnValues[]) */
|
|
107
107
|
publicReturn: unknown[];
|
|
108
108
|
};
|
|
109
|
-
/** A request to simulate the
|
|
110
|
-
export type
|
|
109
|
+
/** A request to simulate the utility function */
|
|
110
|
+
export type SimulateUtilityOperation = {
|
|
111
111
|
/** Operation kind */
|
|
112
|
-
kind: "
|
|
112
|
+
kind: "simulate_utility";
|
|
113
113
|
/** Address of the account to simulate for */
|
|
114
114
|
account: CaipAccount;
|
|
115
115
|
/** Address of the contract (AztecAddress) */
|
|
@@ -119,8 +119,8 @@ export type SimulateUnconstrainedOperation = {
|
|
|
119
119
|
/** Arguments (unencoded) */
|
|
120
120
|
args: any[];
|
|
121
121
|
};
|
|
122
|
-
/** A result of the "
|
|
123
|
-
export type
|
|
122
|
+
/** A result of the "simulate_utility" operation (AbiDecoded) */
|
|
123
|
+
export type SimulateUtilityResult = unknown;
|
|
124
124
|
/** A request to simulate the batch of view calls */
|
|
125
125
|
export type SimulateViewsOperation = {
|
|
126
126
|
/** Operation kind */
|
package/package.json
CHANGED