Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 31, 2023
1 parent fbe924d commit 98efed7
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { FunctionSelector, HistoricBlockData } from '@aztec/circuits.js';
import { AztecAddress } from '@aztec/foundation/aztec-address';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr } from '@aztec/foundation/fields';
import { AztecAddress, EthAddress, Fr, FunctionSelector, HistoricBlockData } from '@aztec/circuits.js';
import { createJsonRpcClient, defaultFetch } from '@aztec/foundation/json-rpc/client';
import {
AztecNode,
Expand Down
1 change: 1 addition & 0 deletions yarn-project/aztec.js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export * from './contract/index.js';
export * from './contract_deployer/index.js';
export * from './utils/index.js';
export * from './pxe_client.js';
export * from './aztec_node_client.js';
export * from './account/index.js';
export * from './contract_deployer/deploy_method.js';
export * from './sandbox/index.js';
Expand Down
6 changes: 6 additions & 0 deletions yarn-project/aztec.js/src/pxe_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ import {

export { makeFetch } from '@aztec/foundation/json-rpc/client';

/**
* Creates a JSON-RPC client to remotely talk to PXE.
* @param url - The URL of the PXE.
* @param fetch - The fetch implementation to use.
* @returns A JSON-RPC client of PXE.
*/
export const createPXEClient = (url: string, fetch = makeFetch([1, 2, 3], true)): PXE =>
createJsonRpcClient<PXE>(
url,
Expand Down
4 changes: 4 additions & 0 deletions yarn-project/aztec.js/src/wallet/base_wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
ExtendedNote,
FunctionCall,
GetUnencryptedLogsResponse,
L2Block,
L2Tx,
LogFilter,
NodeInfo,
Expand Down Expand Up @@ -82,6 +83,9 @@ export abstract class BaseWallet implements Wallet {
getNoteNonces(note: ExtendedNote): Promise<Fr[]> {
return this.pxe.getNoteNonces(note);
}
getBlock(number: number): Promise<L2Block | undefined> {
return this.pxe.getBlock(number);
}
viewTx(functionName: string, args: any[], to: AztecAddress, from?: AztecAddress | undefined): Promise<any> {
return this.pxe.viewTx(functionName, args, to, from);
}
Expand Down
1 change: 0 additions & 1 deletion yarn-project/pxe/src/bin/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env -S node --no-warnings
import { createDebugLogger } from '@aztec/foundation/log';
import { createAztecNodeClient } from '@aztec/types';

import { getPXEServiceConfig } from '../config/index.js';
import { startPXEHttpServer } from '../pxe_http/index.js';
Expand Down
1 change: 0 additions & 1 deletion yarn-project/types/src/aztec_node/rpc/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion yarn-project/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ export * from './packed_arguments.js';
export * from './interfaces/index.js';
export * from './sibling_path.js';
export * from './auth_witness.js';
export * from './aztec_node/rpc/index.js';
export * from '@aztec/circuits.js/types';
export { CompleteAddress } from '@aztec/circuits.js';

0 comments on commit 98efed7

Please sign in to comment.