@azguardwallet/types 0.7.0 → 0.9.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.
Files changed (2) hide show
  1. package/dist/operation.d.ts +26 -30
  2. package/package.json +1 -1
@@ -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 | AztecGetContractClassMetadataOperation | AztecGetContractMetadataOperation | AztecGetPrivateEventsOperation | AztecGetChainInfoOperation | AztecGetTxReceiptOperation | AztecRegisterSenderOperation | AztecGetAddressBookOperation | AztecRegisterContractOperation | AztecSimulateTxOperation | AztecSimulateUtilityOperation | AztecProfileTxOperation | AztecSendTxOperation | AztecCreateAuthWitOperation;
7
+ export type Operation = GetCompleteAddressOperation | RegisterContractOperation | RegisterSenderOperation | RegisterTokenOperation | SendTransactionOperation | SimulateTransactionOperation | ExecuteUtilityOperation | SimulateViewsOperation | AztecGetContractClassMetadataOperation | AztecGetContractMetadataOperation | AztecGetPrivateEventsOperation | AztecGetChainInfoOperation | AztecRegisterSenderOperation | AztecGetAddressBookOperation | AztecRegisterContractOperation | AztecSimulateTxOperation | AztecExecuteUtilityOperation | AztecProfileTxOperation | AztecGetAccountsOperation | 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<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>;
9
+ export type OperationResult = Result<GetCompleteAddressResult> | Result<RegisterContractResult> | Result<RegisterSenderResult> | Result<RegisterTokenResult> | Result<SendTransactionResult> | Result<SimulateTransactionResult> | Result<ExecuteUtilityResult> | Result<SimulateViewsResult> | Result<AztecGetContractClassMetadataResult> | Result<AztecGetContractMetadataResult> | Result<AztecGetPrivateEventsResult> | Result<AztecGetChainInfoResult> | Result<AztecRegisterSenderResult> | Result<AztecGetAddressBookResult> | Result<AztecRegisterContractResult> | Result<AztecSimulateTxResult> | Result<AztecExecuteUtilityResult> | Result<AztecProfileTxResult> | Result<AztecGetAccountsResult> | 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 */
@@ -118,11 +118,11 @@ export type SimulateTransactionResult = {
118
118
  /** Public return values (NestedProcessReturnValues[]) */
119
119
  publicReturn: unknown[];
120
120
  };
121
- /** A request to simulate the utility function */
122
- export type SimulateUtilityOperation = {
121
+ /** A request to execute the utility function */
122
+ export type ExecuteUtilityOperation = {
123
123
  /** Operation kind */
124
- kind: "simulate_utility";
125
- /** Address of the account to simulate for */
124
+ kind: "execute_utility";
125
+ /** Address of the account to execute for */
126
126
  account: CaipAccount;
127
127
  /** Address of the contract (AztecAddress) */
128
128
  contract: string;
@@ -131,8 +131,8 @@ export type SimulateUtilityOperation = {
131
131
  /** Arguments (unencoded) */
132
132
  args: any[];
133
133
  };
134
- /** A result of the "simulate_utility" operation (AbiDecoded) */
135
- export type SimulateUtilityResult = unknown;
134
+ /** A result of the "execute_utility" operation (AbiDecoded) */
135
+ export type ExecuteUtilityResult = unknown;
136
136
  /** A request to simulate the batch of view calls */
137
137
  export type SimulateViewsOperation = {
138
138
  /** Operation kind */
@@ -157,8 +157,6 @@ export type AztecGetContractClassMetadataOperation = {
157
157
  chain: CaipChain;
158
158
  /** Identifier of the class (Fr) */
159
159
  id: unknown;
160
- /** Whether or not to also return contract artifact */
161
- includeArtifact?: boolean;
162
160
  };
163
161
  /** A result of the "aztec_getContractClassMetadata" operation (ContractClassMetadata) */
164
162
  export type AztecGetContractClassMetadataResult = unknown;
@@ -196,17 +194,6 @@ export type AztecGetChainInfoOperation = {
196
194
  /** A result of the "aztec_getChainInfo" operation (ChainInfo) */
197
195
  export type AztecGetChainInfoResult = unknown;
198
196
  /** Aztec.js Wallet request */
199
- export type AztecGetTxReceiptOperation = {
200
- /** Operation kind */
201
- kind: "aztec_getTxReceipt";
202
- /** Chain to execute request for */
203
- chain: CaipChain;
204
- /** The transaction hash (TxHash) */
205
- txHash: unknown;
206
- };
207
- /** A result of the "aztec_getTxReceipt" operation (TxReceipt) */
208
- export type AztecGetTxReceiptResult = unknown;
209
- /** Aztec.js Wallet request */
210
197
  export type AztecRegisterSenderOperation = {
211
198
  /** Operation kind */
212
199
  kind: "aztec_registerSender";
@@ -257,18 +244,18 @@ export type AztecSimulateTxOperation = {
257
244
  /** A result of the "aztec_simulateTx" operation (TxSimulationResult) */
258
245
  export type AztecSimulateTxResult = unknown;
259
246
  /** Aztec.js Wallet request */
260
- export type AztecSimulateUtilityOperation = {
247
+ export type AztecExecuteUtilityOperation = {
261
248
  /** Operation kind */
262
- kind: "aztec_simulateUtility";
263
- /** Address of the account to simulate utility function from */
249
+ kind: "aztec_executeUtility";
250
+ /** Address of the account to execute utility function from */
264
251
  account: CaipAccount;
265
252
  /** Function call (FunctionCall) */
266
253
  call: unknown;
267
- /** (Optional) The authentication witnesses required for the function call (AuthWitness[]) */
268
- authwits?: unknown[];
254
+ /** Options (ExecuteUtilityOptions: { scope?, authWitnesses? }) */
255
+ opts: unknown;
269
256
  };
270
- /** A result of the "aztec_simulateUtility" operation (UtilitySimulationResult) */
271
- export type AztecSimulateUtilityResult = unknown;
257
+ /** A result of the "aztec_executeUtility" operation (UtilityExecutionResult) */
258
+ export type AztecExecuteUtilityResult = unknown;
272
259
  /** Aztec.js Wallet request */
273
260
  export type AztecProfileTxOperation = {
274
261
  /** Operation kind */
@@ -283,6 +270,15 @@ export type AztecProfileTxOperation = {
283
270
  /** A result of the "aztec_profileTx" operation (TxProfileResult) */
284
271
  export type AztecProfileTxResult = unknown;
285
272
  /** Aztec.js Wallet request */
273
+ export type AztecGetAccountsOperation = {
274
+ /** Operation kind */
275
+ kind: "aztec_getAccounts";
276
+ /** Chain to execute request for */
277
+ chain: CaipChain;
278
+ };
279
+ /** A result of the "aztec_getAccounts" operation (Aliased<AztecAddress>[]) */
280
+ export type AztecGetAccountsResult = unknown;
281
+ /** Aztec.js Wallet request */
286
282
  export type AztecSendTxOperation = {
287
283
  /** Operation kind */
288
284
  kind: "aztec_sendTx";
@@ -293,7 +289,7 @@ export type AztecSendTxOperation = {
293
289
  /** Options (SendOptions) */
294
290
  opts: unknown;
295
291
  };
296
- /** A result of the "aztec_sendTx" operation (TxHash) */
292
+ /** A result of the "aztec_sendTx" operation (TxHash | TxReceipt) */
297
293
  export type AztecSendTxResult = unknown;
298
294
  /** Aztec.js Wallet request */
299
295
  export type AztecCreateAuthWitOperation = {
@@ -301,7 +297,7 @@ export type AztecCreateAuthWitOperation = {
301
297
  kind: "aztec_createAuthWit";
302
298
  /** Address of the account to create authwit for */
303
299
  account: CaipAccount;
304
- /** Intent or message hash (Fr | IntentInnerHash | CallIntent) */
300
+ /** Intent or message hash (IntentInnerHash | CallIntent) */
305
301
  messageHashOrIntent: unknown;
306
302
  };
307
303
  /** A result of the "aztec_createAuthWit" operation (AuthWitness) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azguardwallet/types",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Typings for Azguard Wallet inpage RPC client",
5
5
  "author": "Azguard Wallet",
6
6
  "homepage": "https://github.com/AzguardWallet/azguard-wallet-types",