@azguardwallet/types 0.6.0 → 0.8.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 +21 -35
  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 | SimulateUtilityOperation | SimulateViewsOperation | AztecGetContractClassMetadataOperation | AztecGetContractMetadataOperation | AztecGetPrivateEventsOperation | AztecGetChainInfoOperation | AztecRegisterSenderOperation | AztecGetAddressBookOperation | AztecRegisterContractOperation | AztecSimulateTxOperation | AztecSimulateUtilityOperation | 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<SimulateUtilityResult> | Result<SimulateViewsResult> | Result<AztecGetContractClassMetadataResult> | Result<AztecGetContractMetadataResult> | Result<AztecGetPrivateEventsResult> | Result<AztecGetChainInfoResult> | Result<AztecRegisterSenderResult> | Result<AztecGetAddressBookResult> | Result<AztecRegisterContractResult> | Result<AztecSimulateTxResult> | Result<AztecSimulateUtilityResult> | 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 */
@@ -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;
@@ -179,16 +177,10 @@ export type AztecGetPrivateEventsOperation = {
179
177
  kind: "aztec_getPrivateEvents";
180
178
  /** Chain to execute request for */
181
179
  chain: CaipChain;
182
- /** The address of the contract to get events from (AztecAddress) */
183
- contractAddress: unknown;
184
180
  /** Metadata of the event. This should be the class generated from the contract. e.g. Contract.events.Event (EventMetadataDefinition) */
185
181
  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[];
182
+ /** Private event filter (PrivateEventFilter) */
183
+ eventFilter: unknown;
192
184
  };
193
185
  /** A result of the "aztec_getPrivateEvents" operation (T[]) */
194
186
  export type AztecGetPrivateEventsResult = unknown;
@@ -202,17 +194,6 @@ export type AztecGetChainInfoOperation = {
202
194
  /** A result of the "aztec_getChainInfo" operation (ChainInfo) */
203
195
  export type AztecGetChainInfoResult = unknown;
204
196
  /** Aztec.js Wallet request */
205
- export type AztecGetTxReceiptOperation = {
206
- /** Operation kind */
207
- kind: "aztec_getTxReceipt";
208
- /** Chain to execute request for */
209
- chain: CaipChain;
210
- /** The transaction hash (TxHash) */
211
- txHash: unknown;
212
- };
213
- /** A result of the "aztec_getTxReceipt" operation (TxReceipt) */
214
- export type AztecGetTxReceiptResult = unknown;
215
- /** Aztec.js Wallet request */
216
197
  export type AztecRegisterSenderOperation = {
217
198
  /** Operation kind */
218
199
  kind: "aztec_registerSender";
@@ -240,8 +221,8 @@ export type AztecRegisterContractOperation = {
240
221
  kind: "aztec_registerContract";
241
222
  /** Chain to execute request for */
242
223
  chain: CaipChain;
243
- /** Contract instance (AztecAddress | ContractInstanceWithAddress | ContractInstantiationData | ContractInstanceAndArtifact) */
244
- instanceData: unknown;
224
+ /** Contract instance (ContractInstanceWithAddress) */
225
+ instance: unknown;
245
226
  /** Contract artifact (ContractArtifact) */
246
227
  artifact?: unknown;
247
228
  /** Secret key (Fr) */
@@ -268,14 +249,10 @@ export type AztecSimulateUtilityOperation = {
268
249
  kind: "aztec_simulateUtility";
269
250
  /** Address of the account to simulate utility function from */
270
251
  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[];
252
+ /** Function call (FunctionCall) */
253
+ call: unknown;
254
+ /** Options (SimulateUtilityOptions: { scope?, authWitnesses? }) */
255
+ opts: unknown;
279
256
  };
280
257
  /** A result of the "aztec_simulateUtility" operation (UtilitySimulationResult) */
281
258
  export type AztecSimulateUtilityResult = unknown;
@@ -293,6 +270,15 @@ export type AztecProfileTxOperation = {
293
270
  /** A result of the "aztec_profileTx" operation (TxProfileResult) */
294
271
  export type AztecProfileTxResult = unknown;
295
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 */
296
282
  export type AztecSendTxOperation = {
297
283
  /** Operation kind */
298
284
  kind: "aztec_sendTx";
@@ -303,7 +289,7 @@ export type AztecSendTxOperation = {
303
289
  /** Options (SendOptions) */
304
290
  opts: unknown;
305
291
  };
306
- /** A result of the "aztec_sendTx" operation (TxHash) */
292
+ /** A result of the "aztec_sendTx" operation (TxHash | TxReceipt) */
307
293
  export type AztecSendTxResult = unknown;
308
294
  /** Aztec.js Wallet request */
309
295
  export type AztecCreateAuthWitOperation = {
@@ -311,7 +297,7 @@ export type AztecCreateAuthWitOperation = {
311
297
  kind: "aztec_createAuthWit";
312
298
  /** Address of the account to create authwit for */
313
299
  account: CaipAccount;
314
- /** Intent or message hash (Fr | Buffer<ArrayBuffer> | IntentInnerHash | CallIntent) */
300
+ /** Intent or message hash (IntentInnerHash | CallIntent) */
315
301
  messageHashOrIntent: unknown;
316
302
  };
317
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.6.0",
3
+ "version": "0.8.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",