@azguardwallet/types 0.5.0 → 0.6.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 +116 -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,145 @@ 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
|
+
/** The address of the contract to get events from (AztecAddress) */
|
|
183
|
+
contractAddress: unknown;
|
|
184
|
+
/** Metadata of the event. This should be the class generated from the contract. e.g. Contract.events.Event (EventMetadataDefinition) */
|
|
185
|
+
eventMetadata: unknown;
|
|
186
|
+
/** The block number to search from */
|
|
187
|
+
from: number;
|
|
188
|
+
/** The amount of blocks to search */
|
|
189
|
+
numBlocks: number;
|
|
190
|
+
/** The addresses that decrypted the logs (AztecAddress[]) */
|
|
191
|
+
recipients: unknown[];
|
|
289
192
|
};
|
|
290
|
-
/** A result of the "
|
|
291
|
-
export type
|
|
193
|
+
/** A result of the "aztec_getPrivateEvents" operation (T[]) */
|
|
194
|
+
export type AztecGetPrivateEventsResult = unknown;
|
|
292
195
|
/** Aztec.js Wallet request */
|
|
293
|
-
export type
|
|
196
|
+
export type AztecGetChainInfoOperation = {
|
|
294
197
|
/** Operation kind */
|
|
295
|
-
kind: "
|
|
296
|
-
/** Chain to execute
|
|
198
|
+
kind: "aztec_getChainInfo";
|
|
199
|
+
/** Chain to execute request for */
|
|
297
200
|
chain: CaipChain;
|
|
298
201
|
};
|
|
299
|
-
/** A result of the "
|
|
300
|
-
export type
|
|
202
|
+
/** A result of the "aztec_getChainInfo" operation (ChainInfo) */
|
|
203
|
+
export type AztecGetChainInfoResult = unknown;
|
|
301
204
|
/** Aztec.js Wallet request */
|
|
302
|
-
export type
|
|
205
|
+
export type AztecGetTxReceiptOperation = {
|
|
303
206
|
/** Operation kind */
|
|
304
|
-
kind: "
|
|
305
|
-
/** Chain to execute
|
|
207
|
+
kind: "aztec_getTxReceipt";
|
|
208
|
+
/** Chain to execute request for */
|
|
306
209
|
chain: CaipChain;
|
|
307
|
-
/** The
|
|
308
|
-
|
|
309
|
-
/** The updated artifact for the contract (ContractArtifact) */
|
|
310
|
-
artifact: unknown;
|
|
210
|
+
/** The transaction hash (TxHash) */
|
|
211
|
+
txHash: unknown;
|
|
311
212
|
};
|
|
312
|
-
/** A result of the "
|
|
313
|
-
export type
|
|
213
|
+
/** A result of the "aztec_getTxReceipt" operation (TxReceipt) */
|
|
214
|
+
export type AztecGetTxReceiptResult = unknown;
|
|
314
215
|
/** Aztec.js Wallet request */
|
|
315
216
|
export type AztecRegisterSenderOperation = {
|
|
316
217
|
/** Operation kind */
|
|
317
218
|
kind: "aztec_registerSender";
|
|
318
|
-
/** Chain to execute
|
|
219
|
+
/** Chain to execute request for */
|
|
319
220
|
chain: CaipChain;
|
|
320
221
|
/** Address of the user to add to the address book (AztecAddress) */
|
|
321
222
|
address: unknown;
|
|
223
|
+
/** Optional alias for the sender's address */
|
|
224
|
+
alias?: string;
|
|
322
225
|
};
|
|
323
226
|
/** A result of the "aztec_registerSender" operation (AztecAddress) */
|
|
324
227
|
export type AztecRegisterSenderResult = unknown;
|
|
325
228
|
/** Aztec.js Wallet request */
|
|
326
|
-
export type
|
|
229
|
+
export type AztecGetAddressBookOperation = {
|
|
327
230
|
/** Operation kind */
|
|
328
|
-
kind: "
|
|
329
|
-
/** Chain to execute
|
|
231
|
+
kind: "aztec_getAddressBook";
|
|
232
|
+
/** Chain to execute request for */
|
|
330
233
|
chain: CaipChain;
|
|
331
234
|
};
|
|
332
|
-
/** A result of the "
|
|
333
|
-
export type
|
|
235
|
+
/** A result of the "aztec_getAddressBook" operation (Aliased<AztecAddress>[]) */
|
|
236
|
+
export type AztecGetAddressBookResult = unknown;
|
|
334
237
|
/** Aztec.js Wallet request */
|
|
335
|
-
export type
|
|
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 = {
|
|
358
|
-
/** Operation kind */
|
|
359
|
-
kind: "aztec_getPrivateEvents";
|
|
360
|
-
/** Chain to execute PXE request for */
|
|
361
|
-
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
|
-
};
|
|
373
|
-
/** A result of the "aztec_getPrivateEvents" operation (T[]) */
|
|
374
|
-
export type AztecGetPrivateEventsResult = unknown;
|
|
375
|
-
/** Aztec.js Wallet request */
|
|
376
|
-
export type AztecGetPublicEventsOperation = {
|
|
238
|
+
export type AztecRegisterContractOperation = {
|
|
377
239
|
/** Operation kind */
|
|
378
|
-
kind: "
|
|
379
|
-
/** Chain to execute
|
|
240
|
+
kind: "aztec_registerContract";
|
|
241
|
+
/** Chain to execute request for */
|
|
380
242
|
chain: CaipChain;
|
|
381
|
-
/**
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
|
|
243
|
+
/** Contract instance (AztecAddress | ContractInstanceWithAddress | ContractInstantiationData | ContractInstanceAndArtifact) */
|
|
244
|
+
instanceData: unknown;
|
|
245
|
+
/** Contract artifact (ContractArtifact) */
|
|
246
|
+
artifact?: unknown;
|
|
247
|
+
/** Secret key (Fr) */
|
|
248
|
+
secretKey?: unknown;
|
|
387
249
|
};
|
|
388
|
-
/** A result of the "
|
|
389
|
-
export type
|
|
250
|
+
/** A result of the "aztec_registerContract" operation (ContractInstanceWithAddress) */
|
|
251
|
+
export type AztecRegisterContractResult = unknown;
|
|
390
252
|
/** Aztec.js Wallet request */
|
|
391
|
-
export type
|
|
253
|
+
export type AztecSimulateTxOperation = {
|
|
392
254
|
/** Operation kind */
|
|
393
|
-
kind: "
|
|
394
|
-
/** Address of the account */
|
|
255
|
+
kind: "aztec_simulateTx";
|
|
256
|
+
/** Address of the account to simulate transaction from */
|
|
395
257
|
account: CaipAccount;
|
|
258
|
+
/** Payload (ExecutionPayload) */
|
|
259
|
+
exec: unknown;
|
|
260
|
+
/** Options (SimulateOptions) */
|
|
261
|
+
opts: unknown;
|
|
396
262
|
};
|
|
397
|
-
/** A result of the "
|
|
398
|
-
export type
|
|
263
|
+
/** A result of the "aztec_simulateTx" operation (TxSimulationResult) */
|
|
264
|
+
export type AztecSimulateTxResult = unknown;
|
|
399
265
|
/** Aztec.js Wallet request */
|
|
400
|
-
export type
|
|
266
|
+
export type AztecSimulateUtilityOperation = {
|
|
401
267
|
/** Operation kind */
|
|
402
|
-
kind: "
|
|
403
|
-
/** Address of the account
|
|
268
|
+
kind: "aztec_simulateUtility";
|
|
269
|
+
/** Address of the account to simulate utility function from */
|
|
404
270
|
account: CaipAccount;
|
|
271
|
+
/** The name of the utility contract function to be called */
|
|
272
|
+
functionName: string;
|
|
273
|
+
/** The arguments to be provided to the function */
|
|
274
|
+
args: any[];
|
|
275
|
+
/** The address of the contract to be called (AztecAddress) */
|
|
276
|
+
to: unknown;
|
|
277
|
+
/** (Optional) The authentication witnesses required for the function call (AuthWitness[]) */
|
|
278
|
+
authwits?: unknown[];
|
|
405
279
|
};
|
|
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;
|
|
280
|
+
/** A result of the "aztec_simulateUtility" operation (UtilitySimulationResult) */
|
|
281
|
+
export type AztecSimulateUtilityResult = unknown;
|
|
417
282
|
/** Aztec.js Wallet request */
|
|
418
|
-
export type
|
|
283
|
+
export type AztecProfileTxOperation = {
|
|
419
284
|
/** Operation kind */
|
|
420
|
-
kind: "
|
|
421
|
-
/**
|
|
422
|
-
|
|
285
|
+
kind: "aztec_profileTx";
|
|
286
|
+
/** Address of the account to profile tx from */
|
|
287
|
+
account: CaipAccount;
|
|
288
|
+
/** Payload (ExecutionPayload) */
|
|
289
|
+
exec: unknown;
|
|
290
|
+
/** Options (ProfileOptions) */
|
|
291
|
+
opts: unknown;
|
|
423
292
|
};
|
|
424
|
-
/** A result of the "
|
|
425
|
-
export type
|
|
293
|
+
/** A result of the "aztec_profileTx" operation (TxProfileResult) */
|
|
294
|
+
export type AztecProfileTxResult = unknown;
|
|
426
295
|
/** Aztec.js Wallet request */
|
|
427
|
-
export type
|
|
296
|
+
export type AztecSendTxOperation = {
|
|
428
297
|
/** Operation kind */
|
|
429
|
-
kind: "
|
|
430
|
-
/** Address of the account to
|
|
298
|
+
kind: "aztec_sendTx";
|
|
299
|
+
/** Address of the account to send tx from */
|
|
431
300
|
account: CaipAccount;
|
|
432
|
-
/**
|
|
301
|
+
/** Payload (ExecutionPayload) */
|
|
433
302
|
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;
|
|
303
|
+
/** Options (SendOptions) */
|
|
304
|
+
opts: unknown;
|
|
445
305
|
};
|
|
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;
|
|
306
|
+
/** A result of the "aztec_sendTx" operation (TxHash) */
|
|
307
|
+
export type AztecSendTxResult = unknown;
|
|
457
308
|
/** Aztec.js Wallet request */
|
|
458
309
|
export type AztecCreateAuthWitOperation = {
|
|
459
310
|
/** Operation kind */
|
|
460
311
|
kind: "aztec_createAuthWit";
|
|
461
312
|
/** Address of the account to create authwit for */
|
|
462
313
|
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;
|
|
314
|
+
/** Intent or message hash (Fr | Buffer<ArrayBuffer> | IntentInnerHash | CallIntent) */
|
|
315
|
+
messageHashOrIntent: unknown;
|
|
479
316
|
};
|
|
480
317
|
/** A result of the "aztec_createAuthWit" operation (AuthWitness) */
|
|
481
318
|
export type AztecCreateAuthWitResult = unknown;
|
package/package.json
CHANGED