@azguardwallet/types 0.5.0 → 0.7.0
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 +12 -1
- package/dist/authwit-content.d.ts +5 -24
- package/dist/operation.d.ts +106 -279
- package/package.json +1 -1
package/dist/action.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AuthwitContent } from "./authwit-content";
|
|
|
2
2
|
/** Action kind */
|
|
3
3
|
export type ActionKind = Action["kind"];
|
|
4
4
|
/** A request to perform some action */
|
|
5
|
-
export type Action = AddCapsuleAction | AddPrivateAuthwitAction | AddPublicAuthwitAction | CallAction | EncodedCallAction;
|
|
5
|
+
export type Action = AddCapsuleAction | AddExtraArgsAction | AddPrivateAuthwitAction | AddPublicAuthwitAction | CallAction | EncodedCallAction;
|
|
6
6
|
/** A request to add a capsule to PXE */
|
|
7
7
|
export type AddCapsuleAction = {
|
|
8
8
|
/** Action kind */
|
|
@@ -14,6 +14,13 @@ export type AddCapsuleAction = {
|
|
|
14
14
|
/** Capsule to be added (Fr[]) */
|
|
15
15
|
capsule: string[];
|
|
16
16
|
};
|
|
17
|
+
/** A request to add extra args to be available during execution */
|
|
18
|
+
export type AddExtraArgsAction = {
|
|
19
|
+
/** Action kind */
|
|
20
|
+
kind: "add_extra_args";
|
|
21
|
+
/** Args (Fr[]) */
|
|
22
|
+
args: string[];
|
|
23
|
+
};
|
|
17
24
|
/** A request to add an authwit for the message hash computed from the given content to PXE */
|
|
18
25
|
export type AddPrivateAuthwitAction = {
|
|
19
26
|
/** Action kind */
|
|
@@ -43,6 +50,8 @@ export type CallAction = {
|
|
|
43
50
|
method: string;
|
|
44
51
|
/** Arguments (unencoded) */
|
|
45
52
|
args: any[];
|
|
53
|
+
/** Whether or not the caller's address should be hidden from the called contract */
|
|
54
|
+
hideSender?: boolean;
|
|
46
55
|
};
|
|
47
56
|
/** A request to call a contract with encoded args (matches FunctionCall from aztec.js) */
|
|
48
57
|
export type EncodedCallAction = {
|
|
@@ -56,6 +65,8 @@ export type EncodedCallAction = {
|
|
|
56
65
|
selector: string;
|
|
57
66
|
/** Type of the function (FunctionType) */
|
|
58
67
|
type?: string;
|
|
68
|
+
/** Whether or not the caller's address should be hidden from the called contract */
|
|
69
|
+
hideMsgSender?: boolean;
|
|
59
70
|
/** Whether this call can makes modifications to state or not */
|
|
60
71
|
isStatic?: boolean;
|
|
61
72
|
/** Encoded arguments (Fr[]) */
|
|
@@ -1,38 +1,19 @@
|
|
|
1
|
+
import { CallAction, EncodedCallAction } from "./action";
|
|
1
2
|
/** Content to add authwitness for. */
|
|
2
3
|
export type AuthwitContent = CallAuthwitContent | EncodedCallAuthwitContent | IntentAuthwitContent | MessageHashAuthwitContent;
|
|
3
4
|
/** Contract call to be authorized */
|
|
4
|
-
export type CallAuthwitContent = {
|
|
5
|
+
export type CallAuthwitContent = Omit<CallAction, "kind"> & {
|
|
5
6
|
/** Authwit content kind */
|
|
6
|
-
kind: "call";
|
|
7
|
+
readonly kind: "call";
|
|
7
8
|
/** Address of the caller (AztecAddress) */
|
|
8
|
-
caller: string;
|
|
9
|
-
/** Address of the contract (AztecAddress) */
|
|
10
|
-
contract: string;
|
|
11
|
-
/** Name of the function */
|
|
12
|
-
method: string;
|
|
13
|
-
/** Arguments (unencoded) */
|
|
14
|
-
args: any[];
|
|
9
|
+
readonly caller: string;
|
|
15
10
|
};
|
|
16
11
|
/** Encoded contract call to be authorized */
|
|
17
|
-
export type EncodedCallAuthwitContent = {
|
|
12
|
+
export type EncodedCallAuthwitContent = Omit<EncodedCallAction, "kind"> & {
|
|
18
13
|
/** Authwit content kind */
|
|
19
14
|
kind: "encoded_call";
|
|
20
15
|
/** Address of the caller (AztecAddress) */
|
|
21
16
|
caller: string;
|
|
22
|
-
/** Name of the function */
|
|
23
|
-
name?: string;
|
|
24
|
-
/** Address of the contract (AztecAddress) */
|
|
25
|
-
to: string;
|
|
26
|
-
/** Selector of the function (FunctionSelector) */
|
|
27
|
-
selector: string;
|
|
28
|
-
/** Type of the function (FunctionType) */
|
|
29
|
-
type?: string;
|
|
30
|
-
/** Whether this call can makes modifications to state or not */
|
|
31
|
-
isStatic?: boolean;
|
|
32
|
-
/** Encoded arguments (Fr[]) */
|
|
33
|
-
args: string[];
|
|
34
|
-
/** Return types for decoding (AbiType[]) */
|
|
35
|
-
returnTypes?: unknown[];
|
|
36
17
|
};
|
|
37
18
|
/** Arbitrary intent to be authorized */
|
|
38
19
|
export type IntentAuthwitContent = {
|
package/dist/operation.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { CaipAccount, CaipChain } from "./dapp-session";
|
|
|
4
4
|
/** Operation kind */
|
|
5
5
|
export type OperationKind = Operation["kind"];
|
|
6
6
|
/** A request to perform some operation */
|
|
7
|
-
export type Operation = GetCompleteAddressOperation | RegisterContractOperation | RegisterSenderOperation | RegisterTokenOperation | SendTransactionOperation | SimulateTransactionOperation | SimulateUtilityOperation | SimulateViewsOperation |
|
|
7
|
+
export type Operation = GetCompleteAddressOperation | RegisterContractOperation | RegisterSenderOperation | RegisterTokenOperation | SendTransactionOperation | SimulateTransactionOperation | SimulateUtilityOperation | SimulateViewsOperation | AztecGetContractClassMetadataOperation | AztecGetContractMetadataOperation | AztecGetPrivateEventsOperation | AztecGetChainInfoOperation | AztecGetTxReceiptOperation | AztecRegisterSenderOperation | AztecGetAddressBookOperation | AztecRegisterContractOperation | AztecSimulateTxOperation | AztecSimulateUtilityOperation | AztecProfileTxOperation | AztecSendTxOperation | AztecCreateAuthWitOperation;
|
|
8
8
|
/** Operation result */
|
|
9
|
-
export type OperationResult = Result<GetCompleteAddressResult> | Result<RegisterContractResult> | Result<RegisterSenderResult> | Result<RegisterTokenResult> | Result<SendTransactionResult> | Result<SimulateTransactionResult> | Result<SimulateUtilityResult> | Result<SimulateViewsResult> | Result<
|
|
9
|
+
export type OperationResult = Result<GetCompleteAddressResult> | Result<RegisterContractResult> | Result<RegisterSenderResult> | Result<RegisterTokenResult> | Result<SendTransactionResult> | Result<SimulateTransactionResult> | Result<SimulateUtilityResult> | Result<SimulateViewsResult> | Result<AztecGetContractClassMetadataResult> | Result<AztecGetContractMetadataResult> | Result<AztecGetPrivateEventsResult> | Result<AztecGetChainInfoResult> | Result<AztecGetTxReceiptResult> | Result<AztecRegisterSenderResult> | Result<AztecGetAddressBookResult> | Result<AztecRegisterContractResult> | Result<AztecSimulateTxResult> | Result<AztecSimulateUtilityResult> | Result<AztecProfileTxResult> | Result<AztecSendTxResult> | Result<AztecCreateAuthWitResult>;
|
|
10
10
|
/** A request to get complete address of the specified account */
|
|
11
11
|
export type GetCompleteAddressOperation = {
|
|
12
12
|
/** Operation kind */
|
|
@@ -59,6 +59,24 @@ export type RegisterTokenOperation = {
|
|
|
59
59
|
};
|
|
60
60
|
/** A result of the "register_token" operation */
|
|
61
61
|
export type RegisterTokenResult = Result<void>;
|
|
62
|
+
/** Fees and gas options */
|
|
63
|
+
export type FeeOptions = {
|
|
64
|
+
/** Tells if fee payment payload (either fee juice with claim or fpc) is included */
|
|
65
|
+
readonly embeddedFeePayment?: "fjwc" | "fpc";
|
|
66
|
+
/** Suggest gas limits to be used at the first step of estimation */
|
|
67
|
+
readonly gasLimits?: GasLimits;
|
|
68
|
+
/** Suggest teardown gas limits to be used at the first step of estimation */
|
|
69
|
+
readonly teardownGasLimits?: GasLimits;
|
|
70
|
+
/** Multiplier for the simulated gas */
|
|
71
|
+
readonly gasPadding?: number;
|
|
72
|
+
};
|
|
73
|
+
/** Gas limits */
|
|
74
|
+
export type GasLimits = {
|
|
75
|
+
/** DA gas */
|
|
76
|
+
readonly daGas: number;
|
|
77
|
+
/** L2 gas */
|
|
78
|
+
readonly l2Gas: number;
|
|
79
|
+
};
|
|
62
80
|
/** A request to send the transaction */
|
|
63
81
|
export type SendTransactionOperation = {
|
|
64
82
|
/** Operation kind */
|
|
@@ -66,15 +84,12 @@ export type SendTransactionOperation = {
|
|
|
66
84
|
/** Address of the account to send transaction from */
|
|
67
85
|
account: CaipAccount;
|
|
68
86
|
/**
|
|
69
|
-
* Batch of calls to be passed to the account contract
|
|
87
|
+
* Batch of calls to be passed to the account contract
|
|
70
88
|
* and additional actions, that may be needed for its execution
|
|
71
89
|
* */
|
|
72
90
|
actions: Action[];
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
-
* and additional actions, that may be needed for its execution
|
|
76
|
-
* */
|
|
77
|
-
setup?: Action[];
|
|
91
|
+
/** Fees and gas options */
|
|
92
|
+
fee?: FeeOptions;
|
|
78
93
|
};
|
|
79
94
|
/** A result of the "send_transaction" operation (TxHash) */
|
|
80
95
|
export type SendTransactionResult = string;
|
|
@@ -85,15 +100,12 @@ export type SimulateTransactionOperation = {
|
|
|
85
100
|
/** Address of the account to send transaction from */
|
|
86
101
|
account: CaipAccount;
|
|
87
102
|
/**
|
|
88
|
-
* Batch of calls to be passed to the account contract
|
|
103
|
+
* Batch of calls to be passed to the account contract
|
|
89
104
|
* and additional actions, that may be needed for its execution
|
|
90
105
|
* */
|
|
91
106
|
actions: Action[];
|
|
92
|
-
/**
|
|
93
|
-
|
|
94
|
-
* and additional actions, that may be needed for its execution
|
|
95
|
-
* */
|
|
96
|
-
setup?: Action[];
|
|
107
|
+
/** Fees and gas options */
|
|
108
|
+
fee?: FeeOptions;
|
|
97
109
|
/** Whether to also simulate enqueued public calls or not */
|
|
98
110
|
simulatePublic?: boolean;
|
|
99
111
|
};
|
|
@@ -138,80 +150,10 @@ export type SimulateViewsResult = {
|
|
|
138
150
|
decoded: unknown[];
|
|
139
151
|
};
|
|
140
152
|
/** Aztec.js Wallet request */
|
|
141
|
-
export type AztecSimulateTxOperation = {
|
|
142
|
-
/** Operation kind */
|
|
143
|
-
kind: "aztec_simulateTx";
|
|
144
|
-
/** Chain to execute PXE request for */
|
|
145
|
-
chain: CaipChain;
|
|
146
|
-
/** An authenticated tx request ready for simulation (TxExecutionRequest) */
|
|
147
|
-
txRequest: unknown;
|
|
148
|
-
/** Whether to simulate the public part of the transaction */
|
|
149
|
-
simulatePublic: boolean;
|
|
150
|
-
/** (Optional) If false, this function throws if the transaction is unable to be included in a block at the current state */
|
|
151
|
-
skipTxValidation?: boolean;
|
|
152
|
-
/** (Optional) If false, fees are enforced */
|
|
153
|
-
skipFeeEnforcement?: boolean;
|
|
154
|
-
/** (Optional) State overrides for the simulation, such as msgSender, contract instances and artifacts (SimulationOverrides) */
|
|
155
|
-
overrides?: unknown;
|
|
156
|
-
/** (Optional) The accounts whose notes we can access in this call. Currently optional and will default to all (AztecAddress[]) */
|
|
157
|
-
scopes?: unknown[];
|
|
158
|
-
};
|
|
159
|
-
/** A result of the "aztec_simulateTx" operation (TxSimulationResult) */
|
|
160
|
-
export type AztecSimulateTxResult = unknown;
|
|
161
|
-
/** Aztec.js Wallet request */
|
|
162
|
-
export type AztecSimulateUtilityOperation = {
|
|
163
|
-
/** Operation kind */
|
|
164
|
-
kind: "aztec_simulateUtility";
|
|
165
|
-
/** Chain to execute PXE request for */
|
|
166
|
-
chain: CaipChain;
|
|
167
|
-
/** The name of the utility contract function to be called */
|
|
168
|
-
functionName: string;
|
|
169
|
-
/** The arguments to be provided to the function */
|
|
170
|
-
args: any[];
|
|
171
|
-
/** The address of the contract to be called (AztecAddress) */
|
|
172
|
-
to: unknown;
|
|
173
|
-
/** (Optional) The authentication witnesses required for the function call (AuthWitness[]) */
|
|
174
|
-
authwits?: unknown[];
|
|
175
|
-
/** (Optional) The msg sender to set for the call (AztecAddress) */
|
|
176
|
-
from?: unknown;
|
|
177
|
-
/** (Optional) The accounts whose notes we can access in this call. Currently optional and will default to all (AztecAddress[]) */
|
|
178
|
-
scopes?: unknown[];
|
|
179
|
-
};
|
|
180
|
-
/** A result of the "aztec_simulateUtility" operation (UtilitySimulationResult) */
|
|
181
|
-
export type AztecSimulateUtilityResult = unknown;
|
|
182
|
-
/** Aztec.js Wallet request */
|
|
183
|
-
export type AztecProfileTxOperation = {
|
|
184
|
-
/** Operation kind */
|
|
185
|
-
kind: "aztec_profileTx";
|
|
186
|
-
/** Chain to execute PXE request for */
|
|
187
|
-
chain: CaipChain;
|
|
188
|
-
/** An authenticated tx request ready for simulation (TxExecutionRequest) */
|
|
189
|
-
txRequest: unknown;
|
|
190
|
-
/** Profile mode */
|
|
191
|
-
profileMode: "gates" | "execution-steps" | "full";
|
|
192
|
-
/** (Optional) The message sender to use for the simulation */
|
|
193
|
-
skipProofGeneration?: boolean;
|
|
194
|
-
/** (Optional) If false, this function throws if the transaction is unable to be included in a block at the current state (AztecAddress) */
|
|
195
|
-
msgSender?: unknown;
|
|
196
|
-
};
|
|
197
|
-
/** A result of the "aztec_profileTx" operation (TxProfileResult) */
|
|
198
|
-
export type AztecProfileTxResult = unknown;
|
|
199
|
-
/** Aztec.js Wallet request */
|
|
200
|
-
export type AztecSendTxOperation = {
|
|
201
|
-
/** Operation kind */
|
|
202
|
-
kind: "aztec_sendTx";
|
|
203
|
-
/** Chain to execute PXE request for */
|
|
204
|
-
chain: CaipChain;
|
|
205
|
-
/** The transaction as created via `proveTx` (Tx) */
|
|
206
|
-
tx: unknown;
|
|
207
|
-
};
|
|
208
|
-
/** A result of the "aztec_sendTx" operation (TxHash) */
|
|
209
|
-
export type AztecSendTxResult = unknown;
|
|
210
|
-
/** Aztec.js Wallet request */
|
|
211
153
|
export type AztecGetContractClassMetadataOperation = {
|
|
212
154
|
/** Operation kind */
|
|
213
155
|
kind: "aztec_getContractClassMetadata";
|
|
214
|
-
/** Chain to execute
|
|
156
|
+
/** Chain to execute request for */
|
|
215
157
|
chain: CaipChain;
|
|
216
158
|
/** Identifier of the class (Fr) */
|
|
217
159
|
id: unknown;
|
|
@@ -224,7 +166,7 @@ export type AztecGetContractClassMetadataResult = unknown;
|
|
|
224
166
|
export type AztecGetContractMetadataOperation = {
|
|
225
167
|
/** Operation kind */
|
|
226
168
|
kind: "aztec_getContractMetadata";
|
|
227
|
-
/** Chain to execute
|
|
169
|
+
/** Chain to execute request for */
|
|
228
170
|
chain: CaipChain;
|
|
229
171
|
/** The address that the contract instance resides at (AztecAddress) */
|
|
230
172
|
address: unknown;
|
|
@@ -232,250 +174,135 @@ export type AztecGetContractMetadataOperation = {
|
|
|
232
174
|
/** A result of the "aztec_getContractMetadata" operation (ContractMetadata) */
|
|
233
175
|
export type AztecGetContractMetadataResult = unknown;
|
|
234
176
|
/** Aztec.js Wallet request */
|
|
235
|
-
export type
|
|
236
|
-
/** Operation kind */
|
|
237
|
-
kind: "aztec_registerContract";
|
|
238
|
-
/** Chain to execute PXE request for */
|
|
239
|
-
chain: CaipChain;
|
|
240
|
-
/** A contract instance to register, with an optional artifact which can be omitted if the contract class has already been registered */
|
|
241
|
-
contract: {
|
|
242
|
-
/** Contract instance (ContractInstanceWithAddress) */
|
|
243
|
-
instance: unknown;
|
|
244
|
-
/** Contract artifact (ContractArtifact) */
|
|
245
|
-
artifact?: unknown;
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
/** A result of the "aztec_registerContract" operation */
|
|
249
|
-
export type AztecRegisterContractResult = void;
|
|
250
|
-
/** Aztec.js Wallet request */
|
|
251
|
-
export type AztecRegisterContractClassOperation = {
|
|
252
|
-
/** Operation kind */
|
|
253
|
-
kind: "aztec_registerContractClass";
|
|
254
|
-
/** Chain to execute PXE request for */
|
|
255
|
-
chain: CaipChain;
|
|
256
|
-
/** The build artifact for the contract class (ContractArtifact) */
|
|
257
|
-
artifact: unknown;
|
|
258
|
-
};
|
|
259
|
-
/** A result of the "aztec_registerContractClass" operation */
|
|
260
|
-
export type AztecRegisterContractClassResult = void;
|
|
261
|
-
/** Aztec.js Wallet request */
|
|
262
|
-
export type AztecProveTxOperation = {
|
|
263
|
-
/** Operation kind */
|
|
264
|
-
kind: "aztec_proveTx";
|
|
265
|
-
/** Chain to execute PXE request for */
|
|
266
|
-
chain: CaipChain;
|
|
267
|
-
/** An authenticated tx request ready for simulation (TxExecutionRequest) */
|
|
268
|
-
txRequest: unknown;
|
|
269
|
-
/** (Optional) The result of the private execution of the transaction. The txRequest will be executed if not provided (PrivateExecutionResult) */
|
|
270
|
-
privateExecutionResult?: unknown;
|
|
271
|
-
};
|
|
272
|
-
/** A result of the "aztec_proveTx" operation (TxProvingResult) */
|
|
273
|
-
export type AztecProveTxResult = unknown;
|
|
274
|
-
/** Aztec.js Wallet request */
|
|
275
|
-
export type AztecGetNodeInfoOperation = {
|
|
276
|
-
/** Operation kind */
|
|
277
|
-
kind: "aztec_getNodeInfo";
|
|
278
|
-
/** Chain to execute PXE request for */
|
|
279
|
-
chain: CaipChain;
|
|
280
|
-
};
|
|
281
|
-
/** A result of the "aztec_getNodeInfo" operation (NodeInfo) */
|
|
282
|
-
export type AztecGetNodeInfoResult = unknown;
|
|
283
|
-
/** Aztec.js Wallet request */
|
|
284
|
-
export type AztecGetPXEInfoOperation = {
|
|
177
|
+
export type AztecGetPrivateEventsOperation = {
|
|
285
178
|
/** Operation kind */
|
|
286
|
-
kind: "
|
|
287
|
-
/** Chain to execute
|
|
179
|
+
kind: "aztec_getPrivateEvents";
|
|
180
|
+
/** Chain to execute request for */
|
|
288
181
|
chain: CaipChain;
|
|
182
|
+
/** Metadata of the event. This should be the class generated from the contract. e.g. Contract.events.Event (EventMetadataDefinition) */
|
|
183
|
+
eventMetadata: unknown;
|
|
184
|
+
/** Private event filter (PrivateEventFilter) */
|
|
185
|
+
eventFilter: unknown;
|
|
289
186
|
};
|
|
290
|
-
/** A result of the "
|
|
291
|
-
export type
|
|
187
|
+
/** A result of the "aztec_getPrivateEvents" operation (T[]) */
|
|
188
|
+
export type AztecGetPrivateEventsResult = unknown;
|
|
292
189
|
/** Aztec.js Wallet request */
|
|
293
|
-
export type
|
|
190
|
+
export type AztecGetChainInfoOperation = {
|
|
294
191
|
/** Operation kind */
|
|
295
|
-
kind: "
|
|
296
|
-
/** Chain to execute
|
|
192
|
+
kind: "aztec_getChainInfo";
|
|
193
|
+
/** Chain to execute request for */
|
|
297
194
|
chain: CaipChain;
|
|
298
195
|
};
|
|
299
|
-
/** A result of the "
|
|
300
|
-
export type
|
|
196
|
+
/** A result of the "aztec_getChainInfo" operation (ChainInfo) */
|
|
197
|
+
export type AztecGetChainInfoResult = unknown;
|
|
301
198
|
/** Aztec.js Wallet request */
|
|
302
|
-
export type
|
|
199
|
+
export type AztecGetTxReceiptOperation = {
|
|
303
200
|
/** Operation kind */
|
|
304
|
-
kind: "
|
|
305
|
-
/** Chain to execute
|
|
201
|
+
kind: "aztec_getTxReceipt";
|
|
202
|
+
/** Chain to execute request for */
|
|
306
203
|
chain: CaipChain;
|
|
307
|
-
/** The
|
|
308
|
-
|
|
309
|
-
/** The updated artifact for the contract (ContractArtifact) */
|
|
310
|
-
artifact: unknown;
|
|
204
|
+
/** The transaction hash (TxHash) */
|
|
205
|
+
txHash: unknown;
|
|
311
206
|
};
|
|
312
|
-
/** A result of the "
|
|
313
|
-
export type
|
|
207
|
+
/** A result of the "aztec_getTxReceipt" operation (TxReceipt) */
|
|
208
|
+
export type AztecGetTxReceiptResult = unknown;
|
|
314
209
|
/** Aztec.js Wallet request */
|
|
315
210
|
export type AztecRegisterSenderOperation = {
|
|
316
211
|
/** Operation kind */
|
|
317
212
|
kind: "aztec_registerSender";
|
|
318
|
-
/** Chain to execute
|
|
213
|
+
/** Chain to execute request for */
|
|
319
214
|
chain: CaipChain;
|
|
320
215
|
/** Address of the user to add to the address book (AztecAddress) */
|
|
321
216
|
address: unknown;
|
|
217
|
+
/** Optional alias for the sender's address */
|
|
218
|
+
alias?: string;
|
|
322
219
|
};
|
|
323
220
|
/** A result of the "aztec_registerSender" operation (AztecAddress) */
|
|
324
221
|
export type AztecRegisterSenderResult = unknown;
|
|
325
222
|
/** Aztec.js Wallet request */
|
|
326
|
-
export type
|
|
327
|
-
/** Operation kind */
|
|
328
|
-
kind: "aztec_getSenders";
|
|
329
|
-
/** Chain to execute PXE request for */
|
|
330
|
-
chain: CaipChain;
|
|
331
|
-
};
|
|
332
|
-
/** A result of the "aztec_getSenders" operation (AztecAddress[]) */
|
|
333
|
-
export type AztecGetSendersResult = unknown;
|
|
334
|
-
/** Aztec.js Wallet request */
|
|
335
|
-
export type AztecRemoveSenderOperation = {
|
|
336
|
-
/** Operation kind */
|
|
337
|
-
kind: "aztec_removeSender";
|
|
338
|
-
/** Chain to execute PXE request for */
|
|
339
|
-
chain: CaipChain;
|
|
340
|
-
/** Address of the user to remove from the address book (AztecAddress) */
|
|
341
|
-
address: unknown;
|
|
342
|
-
};
|
|
343
|
-
/** A result of the "aztec_removeSender" operation */
|
|
344
|
-
export type AztecRemoveSenderResult = void;
|
|
345
|
-
/** Aztec.js Wallet request */
|
|
346
|
-
export type AztecGetTxReceiptOperation = {
|
|
347
|
-
/** Operation kind */
|
|
348
|
-
kind: "aztec_getTxReceipt";
|
|
349
|
-
/** Chain to execute PXE request for */
|
|
350
|
-
chain: CaipChain;
|
|
351
|
-
/** The transaction hash (TxHash) */
|
|
352
|
-
txHash: unknown;
|
|
353
|
-
};
|
|
354
|
-
/** A result of the "aztec_getTxReceipt" operation (TxReceipt) */
|
|
355
|
-
export type AztecGetTxReceiptResult = unknown;
|
|
356
|
-
/** Aztec.js Wallet request */
|
|
357
|
-
export type AztecGetPrivateEventsOperation = {
|
|
223
|
+
export type AztecGetAddressBookOperation = {
|
|
358
224
|
/** Operation kind */
|
|
359
|
-
kind: "
|
|
360
|
-
/** Chain to execute
|
|
225
|
+
kind: "aztec_getAddressBook";
|
|
226
|
+
/** Chain to execute request for */
|
|
361
227
|
chain: CaipChain;
|
|
362
|
-
/** The address of the contract to get events from (AztecAddress) */
|
|
363
|
-
contractAddress: unknown;
|
|
364
|
-
/** Metadata of the event. This should be the class generated from the contract. e.g. Contract.events.Event (EventMetadataDefinition) */
|
|
365
|
-
eventMetadata: unknown;
|
|
366
|
-
/** The block number to search from */
|
|
367
|
-
from: number;
|
|
368
|
-
/** The amount of blocks to search */
|
|
369
|
-
numBlocks: number;
|
|
370
|
-
/** The addresses that decrypted the logs (AztecAddress[]) */
|
|
371
|
-
recipients: unknown[];
|
|
372
228
|
};
|
|
373
|
-
/** A result of the "
|
|
374
|
-
export type
|
|
229
|
+
/** A result of the "aztec_getAddressBook" operation (Aliased<AztecAddress>[]) */
|
|
230
|
+
export type AztecGetAddressBookResult = unknown;
|
|
375
231
|
/** Aztec.js Wallet request */
|
|
376
|
-
export type
|
|
232
|
+
export type AztecRegisterContractOperation = {
|
|
377
233
|
/** Operation kind */
|
|
378
|
-
kind: "
|
|
379
|
-
/** Chain to execute
|
|
234
|
+
kind: "aztec_registerContract";
|
|
235
|
+
/** Chain to execute request for */
|
|
380
236
|
chain: CaipChain;
|
|
381
|
-
/**
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
|
|
237
|
+
/** Contract instance (ContractInstanceWithAddress) */
|
|
238
|
+
instance: unknown;
|
|
239
|
+
/** Contract artifact (ContractArtifact) */
|
|
240
|
+
artifact?: unknown;
|
|
241
|
+
/** Secret key (Fr) */
|
|
242
|
+
secretKey?: unknown;
|
|
387
243
|
};
|
|
388
|
-
/** A result of the "
|
|
389
|
-
export type
|
|
244
|
+
/** A result of the "aztec_registerContract" operation (ContractInstanceWithAddress) */
|
|
245
|
+
export type AztecRegisterContractResult = unknown;
|
|
390
246
|
/** Aztec.js Wallet request */
|
|
391
|
-
export type
|
|
247
|
+
export type AztecSimulateTxOperation = {
|
|
392
248
|
/** Operation kind */
|
|
393
|
-
kind: "
|
|
394
|
-
/** Address of the account */
|
|
249
|
+
kind: "aztec_simulateTx";
|
|
250
|
+
/** Address of the account to simulate transaction from */
|
|
395
251
|
account: CaipAccount;
|
|
252
|
+
/** Payload (ExecutionPayload) */
|
|
253
|
+
exec: unknown;
|
|
254
|
+
/** Options (SimulateOptions) */
|
|
255
|
+
opts: unknown;
|
|
396
256
|
};
|
|
397
|
-
/** A result of the "
|
|
398
|
-
export type
|
|
257
|
+
/** A result of the "aztec_simulateTx" operation (TxSimulationResult) */
|
|
258
|
+
export type AztecSimulateTxResult = unknown;
|
|
399
259
|
/** Aztec.js Wallet request */
|
|
400
|
-
export type
|
|
260
|
+
export type AztecSimulateUtilityOperation = {
|
|
401
261
|
/** Operation kind */
|
|
402
|
-
kind: "
|
|
403
|
-
/** Address of the account
|
|
262
|
+
kind: "aztec_simulateUtility";
|
|
263
|
+
/** Address of the account to simulate utility function from */
|
|
404
264
|
account: CaipAccount;
|
|
265
|
+
/** Function call (FunctionCall) */
|
|
266
|
+
call: unknown;
|
|
267
|
+
/** (Optional) The authentication witnesses required for the function call (AuthWitness[]) */
|
|
268
|
+
authwits?: unknown[];
|
|
405
269
|
};
|
|
406
|
-
/** A result of the "
|
|
407
|
-
export type
|
|
408
|
-
/** Aztec.js Wallet request */
|
|
409
|
-
export type AztecGetChainIdOperation = {
|
|
410
|
-
/** Operation kind */
|
|
411
|
-
kind: "aztec_getChainId";
|
|
412
|
-
/** Chain to execute PXE request for */
|
|
413
|
-
chain: CaipChain;
|
|
414
|
-
};
|
|
415
|
-
/** A result of the "aztec_getChainId" operation (Fr) */
|
|
416
|
-
export type AztecGetChainIdResult = unknown;
|
|
270
|
+
/** A result of the "aztec_simulateUtility" operation (UtilitySimulationResult) */
|
|
271
|
+
export type AztecSimulateUtilityResult = unknown;
|
|
417
272
|
/** Aztec.js Wallet request */
|
|
418
|
-
export type
|
|
273
|
+
export type AztecProfileTxOperation = {
|
|
419
274
|
/** Operation kind */
|
|
420
|
-
kind: "
|
|
421
|
-
/**
|
|
422
|
-
|
|
275
|
+
kind: "aztec_profileTx";
|
|
276
|
+
/** Address of the account to profile tx from */
|
|
277
|
+
account: CaipAccount;
|
|
278
|
+
/** Payload (ExecutionPayload) */
|
|
279
|
+
exec: unknown;
|
|
280
|
+
/** Options (ProfileOptions) */
|
|
281
|
+
opts: unknown;
|
|
423
282
|
};
|
|
424
|
-
/** A result of the "
|
|
425
|
-
export type
|
|
283
|
+
/** A result of the "aztec_profileTx" operation (TxProfileResult) */
|
|
284
|
+
export type AztecProfileTxResult = unknown;
|
|
426
285
|
/** Aztec.js Wallet request */
|
|
427
|
-
export type
|
|
286
|
+
export type AztecSendTxOperation = {
|
|
428
287
|
/** Operation kind */
|
|
429
|
-
kind: "
|
|
430
|
-
/** Address of the account to
|
|
288
|
+
kind: "aztec_sendTx";
|
|
289
|
+
/** Address of the account to send tx from */
|
|
431
290
|
account: CaipAccount;
|
|
432
|
-
/**
|
|
291
|
+
/** Payload (ExecutionPayload) */
|
|
433
292
|
exec: unknown;
|
|
434
|
-
/**
|
|
435
|
-
|
|
436
|
-
/** Execution options (TxExecutionOptions) */
|
|
437
|
-
options: unknown;
|
|
438
|
-
};
|
|
439
|
-
/** Transferrable version of FeeOptions */
|
|
440
|
-
export type FeeOptionsDto = {
|
|
441
|
-
/** Fee payment method */
|
|
442
|
-
paymentMethod: FeePaymentMethodDto;
|
|
443
|
-
/** Gas settings (GasSettings) */
|
|
444
|
-
gasSettings: unknown;
|
|
293
|
+
/** Options (SendOptions) */
|
|
294
|
+
opts: unknown;
|
|
445
295
|
};
|
|
446
|
-
/**
|
|
447
|
-
export type
|
|
448
|
-
/** Address of the assset contract (AztecAddress) */
|
|
449
|
-
asset?: unknown;
|
|
450
|
-
/** Execution payload (ExecutionPayload) */
|
|
451
|
-
executionPayload: unknown;
|
|
452
|
-
/** Address of the fee payer (AztecAddress) */
|
|
453
|
-
feePayer: unknown;
|
|
454
|
-
};
|
|
455
|
-
/** A result of the "aztec_createTxExecutionRequest" operation (TxExecutionRequest) */
|
|
456
|
-
export type AztecCreateTxExecutionRequestResult = unknown;
|
|
296
|
+
/** A result of the "aztec_sendTx" operation (TxHash) */
|
|
297
|
+
export type AztecSendTxResult = unknown;
|
|
457
298
|
/** Aztec.js Wallet request */
|
|
458
299
|
export type AztecCreateAuthWitOperation = {
|
|
459
300
|
/** Operation kind */
|
|
460
301
|
kind: "aztec_createAuthWit";
|
|
461
302
|
/** Address of the account to create authwit for */
|
|
462
303
|
account: CaipAccount;
|
|
463
|
-
/** Intent or message hash (Fr) */
|
|
464
|
-
messageHashOrIntent: unknown
|
|
465
|
-
};
|
|
466
|
-
/** Transferrable version of IntentInnerHash */
|
|
467
|
-
export type IntentInnerHashDto = {
|
|
468
|
-
/** Address of the authwit consumer (AztecAddress) */
|
|
469
|
-
consumer: unknown;
|
|
470
|
-
/** Intent hash (Fr) */
|
|
471
|
-
innerHash: unknown;
|
|
472
|
-
};
|
|
473
|
-
/** Transferrable version of IntentAction */
|
|
474
|
-
export type IntentActionDto = {
|
|
475
|
-
/** Address of the caller (AztecAddress) */
|
|
476
|
-
caller: unknown;
|
|
477
|
-
/** Function call (FunctionCall) */
|
|
478
|
-
action: unknown;
|
|
304
|
+
/** Intent or message hash (Fr | IntentInnerHash | CallIntent) */
|
|
305
|
+
messageHashOrIntent: unknown;
|
|
479
306
|
};
|
|
480
307
|
/** A result of the "aztec_createAuthWit" operation (AuthWitness) */
|
|
481
308
|
export type AztecCreateAuthWitResult = unknown;
|
package/package.json
CHANGED