Skip to content

Commit

Permalink
fix: move BatchClient to utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ugur-eren committed Jul 6, 2024
1 parent 04ad50d commit f494902
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 36 deletions.
2 changes: 0 additions & 2 deletions src/batch/index.ts

This file was deleted.

27 changes: 0 additions & 27 deletions src/batch/interface.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/channel/rpc_0_6.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { BatchClient } from '../batch';
import { NetworkName, StarknetChainId } from '../constants';
import { LibraryError } from '../provider/errors';
import {
Expand All @@ -19,6 +18,7 @@ import {
waitForTransactionOptions,
} from '../types';
import { JRPC, RPCSPEC06 as RPC } from '../types/api';
import { BatchClient } from '../utils/batch';
import { CallData } from '../utils/calldata';
import { isSierra } from '../utils/contract';
import { validateAndParseEthAddress } from '../utils/eth';
Expand Down
2 changes: 1 addition & 1 deletion src/channel/rpc_0_7.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { BatchClient } from '../batch';
import { NetworkName, StarknetChainId } from '../constants';
import { LibraryError } from '../provider/errors';
import {
Expand All @@ -19,6 +18,7 @@ import {
waitForTransactionOptions,
} from '../types';
import { JRPC, RPCSPEC07 as RPC } from '../types/api';
import { BatchClient } from '../utils/batch';
import { CallData } from '../utils/calldata';
import { isSierra } from '../utils/contract';
import { validateAndParseEthAddress } from '../utils/eth';
Expand Down
15 changes: 10 additions & 5 deletions src/batch/default.ts → src/utils/batch/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { BatchClientInterface, BatchClientOptions } from './interface';
import { stringify } from '../utils/json';
import { RPC } from '../types';
import { JRPC } from '../types/api';
import { stringify } from '../json';
import { RPC } from '../../types';
import { JRPC } from '../../types/api';

export class BatchClient implements BatchClientInterface {
export type BatchClientOptions = {
nodeUrl: string;
headers: object;
interval: number;
};

export class BatchClient {
public nodeUrl: string;

public headers: object;
Expand Down

0 comments on commit f494902

Please sign in to comment.