@asyncswap/eth-rpc 0.4.3 → 0.4.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @asyncswap/eth-rpc
2
2
 
3
+ ## 0.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - b2b631f: deprecated `EthExecutionClien` use `ExecutionClient`
8
+ - Updated dependencies [f7d28d9]
9
+ - @asyncswap/jsonrpc@0.4.4
10
+
3
11
  ## 0.4.3
4
12
 
5
13
  ### Patch Changes
package/README.md CHANGED
@@ -13,10 +13,10 @@ bun add @asyncswap/eth-rpc
13
13
  ### Execution API Client
14
14
 
15
15
  ```typescript
16
- import { EthExecutionClient } from '@asyncswap/eth-rpc';
16
+ import { ExecutionClient } from '@asyncswap/eth-rpc';
17
17
 
18
18
  const url = 'http://localhost:8545'
19
- const eth = new EthExecutionClient(url);
19
+ const eth = new ExecutionClient(url);
20
20
 
21
21
  const balance = await eth.eth_getBalance(
22
22
  "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
package/example.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { EthExecutionClient } from "./src";
1
+ import { ExecutionClient } from "./src";
2
2
 
3
3
  const url = "http://localhost:8545";
4
- const eth = new EthExecutionClient(url);
5
-
4
+ const eth = new ExecutionClient(url);
6
5
  const balance = await eth.eth_getBalance(
7
6
  "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
8
7
  "latest",
@@ -14,7 +13,7 @@ import { EngineExecutionClient } from "./src";
14
13
 
15
14
  const engineUrl = "https://localhost:8551";
16
15
  const engine = new EngineExecutionClient(engineUrl, process.env.JWT_TOKEN!);
17
- const payload = engine.engine_getPayloadV1("0x1");
16
+ const payload = await engine.engine_getPayloadV1("0x1");
18
17
 
19
18
  console.log(payload);
20
19
 
@@ -22,5 +21,3 @@ import { FlashbotsClient } from "./src";
22
21
 
23
22
  const rpc = "https://relay.flashbots.net";
24
23
  const client = new FlashbotsClient(rpc);
25
- const body = client.rpc.buildRequest("eth_sendBundle", []);
26
- client.eth_accounts();
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@asyncswap/eth-rpc",
3
3
  "description": "A library for ethereum execution clients apis.",
4
4
  "author": "Meek Msaki",
5
- "version": "0.4.3",
5
+ "version": "0.4.4",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
@@ -41,6 +41,6 @@
41
41
  "typescript": "^5"
42
42
  },
43
43
  "dependencies": {
44
- "@asyncswap/jsonrpc": "^0.4.3"
44
+ "@asyncswap/jsonrpc": "^0.4.4"
45
45
  }
46
46
  }
package/src/eth-api.ts CHANGED
@@ -6,7 +6,7 @@ export type EthRpcMethods<
6
6
  [K in keyof T]: (...params: T[K]["params"]) => Promise<T[K]["result"]>;
7
7
  };
8
8
 
9
- export class EthExecutionClient {
9
+ export class ExecutionClient {
10
10
  rpc: JsonRpcClient;
11
11
  headers: Record<string, string> = {};
12
12
 
@@ -30,4 +30,10 @@ export class EthExecutionClient {
30
30
  }
31
31
  }
32
32
 
33
- export interface EthExecutionClient extends EthRpcMethods<EthMethodsSpec> { }
33
+ export interface ExecutionClient extends EthRpcMethods<EthMethodsSpec> { }
34
+
35
+ /**
36
+ * @deprecated Use `ExecutionClient` instead.
37
+ * This method will be removed in v0.5.0.
38
+ */
39
+ export class EthExecutionClient extends ExecutionClient { }