@asyncswap/eth-rpc 0.4.13 → 0.4.14

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/README.md CHANGED
@@ -13,14 +13,14 @@ bun add @asyncswap/eth-rpc
13
13
  ### Execution API Client
14
14
 
15
15
  ```typescript
16
- import { ExecutionClient } from '@asyncswap/eth-rpc';
17
-
18
- const url = 'http://localhost:8545'
19
- const eth = new ExecutionClient(url);
16
+ import { ExecutionClient } from "@asyncswap/eth-rpc";
17
+ import type { ExecutionClientRpc } from "@asyncswap/eth-rpc";
20
18
 
19
+ const url = "http://localhost:8545";
20
+ const eth = new ExecutionClient(url) as ExecutionClientRpc;
21
21
  const balance = await eth.eth_getBalance(
22
- "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
23
- "latest"
22
+ "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
23
+ "latest",
24
24
  );
25
25
  console.log("Balance:", balance);
26
26
  eth.eth_getTransactionCount("0x34", "safe");
package/dist/eth-api.d.ts CHANGED
@@ -1,13 +1,7 @@
1
- import { BaseClient } from "@asyncswap/jsonrpc";
1
+ import type { EthMethodsSpec } from "@asyncswap/eth-types";
2
+ import { BaseClient, type RpcSpec } from "@asyncswap/jsonrpc";
2
3
  export declare class ExecutionClient extends BaseClient<EthMethodsSpec> {
3
4
  constructor(url: string);
4
5
  }
5
- export type EthRpcMethods<MethodsSpec extends Record<string, {
6
- params: readonly unknown[];
7
- result: unknown;
8
- }>> = {
9
- [Method in keyof MethodsSpec]: (...params: MethodsSpec[Method]["params"]) => Promise<MethodsSpec[Method]["result"]>;
10
- };
11
- export interface ExecutionClient extends EthRpcMethods<EthMethodsSpec> {
12
- }
6
+ export type ExecutionClientRpc = ExecutionClient & RpcSpec<EthMethodsSpec>;
13
7
  //# sourceMappingURL=eth-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eth-api.d.ts","sourceRoot":"","sources":["../src/eth-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,qBAAa,eAAgB,SAAQ,UAAU,CAAC,cAAc,CAAC;gBAClD,GAAG,EAAE,MAAM;CAGvB;AAED,MAAM,MAAM,aAAa,CACxB,WAAW,SAAS,MAAM,CACzB,MAAM,EACN;IAAE,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAC/C,IACE;KACD,MAAM,IAAI,MAAM,WAAW,GAAG,CAC9B,GAAG,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,KACpC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;CAC3C,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,aAAa,CAAC,cAAc,CAAC;CAAI"}
1
+ {"version":3,"file":"eth-api.d.ts","sourceRoot":"","sources":["../src/eth-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE9D,qBAAa,eAAgB,SAAQ,UAAU,CAAC,cAAc,CAAC;gBAClD,GAAG,EAAE,MAAM;CAGvB;AAED,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"eth-api.js","sourceRoot":"","sources":["../src/eth-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,OAAO,eAAgB,SAAQ,UAA0B;IAC9D,YAAY,GAAW;QACtB,KAAK,CAAC,GAAG,CAAC,CAAC;IACZ,CAAC;CACD"}
1
+ {"version":3,"file":"eth-api.js","sourceRoot":"","sources":["../src/eth-api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAgB,MAAM,oBAAoB,CAAC;AAE9D,MAAM,OAAO,eAAgB,SAAQ,UAA0B;IAC9D,YAAY,GAAW;QACtB,KAAK,CAAC,GAAG,CAAC,CAAC;IACZ,CAAC;CACD"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ export * from "@asyncswap/eth-types";
1
2
  export * from "./eth-api";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
+ export * from "@asyncswap/eth-types";
1
2
  export * from "./eth-api";
2
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC"}
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.13",
5
+ "version": "0.4.14",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
@@ -38,12 +38,13 @@
38
38
  "format": "bun biome format --write"
39
39
  },
40
40
  "devDependencies": {
41
- "@types/bun": "latest"
41
+ "@types/bun": "latest",
42
+ "@asyncswap/eth-types": "^0.0.1"
42
43
  },
43
44
  "peerDependencies": {
44
45
  "typescript": "^5"
45
46
  },
46
47
  "dependencies": {
47
- "@asyncswap/jsonrpc": "^0.4.12"
48
+ "@asyncswap/jsonrpc": "^0.4.13"
48
49
  }
49
50
  }
package/src/eth-api.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { BaseClient } from "@asyncswap/jsonrpc";
1
+ import type { EthMethodsSpec } from "@asyncswap/eth-types";
2
+ import { BaseClient, type RpcSpec } from "@asyncswap/jsonrpc";
2
3
 
3
4
  export class ExecutionClient extends BaseClient<EthMethodsSpec> {
4
5
  constructor(url: string) {
@@ -6,15 +7,4 @@ export class ExecutionClient extends BaseClient<EthMethodsSpec> {
6
7
  }
7
8
  }
8
9
 
9
- export type EthRpcMethods<
10
- MethodsSpec extends Record<
11
- string,
12
- { params: readonly unknown[]; result: unknown }
13
- >,
14
- > = {
15
- [Method in keyof MethodsSpec]: (
16
- ...params: MethodsSpec[Method]["params"]
17
- ) => Promise<MethodsSpec[Method]["result"]>;
18
- };
19
-
20
- export interface ExecutionClient extends EthRpcMethods<EthMethodsSpec> { }
10
+ export type ExecutionClientRpc = ExecutionClient & RpcSpec<EthMethodsSpec>;
package/src/index.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from "@asyncswap/eth-types";
1
2
  export * from "./eth-api";
@@ -1,23 +0,0 @@
1
- declare global {
2
- // base.yaml
3
- export type Hex = `0x${string}`;
4
- export type Address = `0x${string}`;
5
- export type Addresses = Address[];
6
- export type Byte = Hex;
7
- export type Bytes = Hex;
8
- export type Bytes32 = Hex;
9
- export type Bytes8 = Hex;
10
- export type Bytes48 = Hex;
11
- export type Bytes96 = Hex;
12
- export type Bytes256 = Hex;
13
- export type Bytes65 = Hex;
14
- export type Ratio = number;
15
- export type Uint = Hex;
16
- export type Uint64 = Hex;
17
- export type Uint256 = Hex;
18
- export type UintDecimal = string; // e.g '1'
19
- export type Hash32 = Hex;
20
- export type NotFound = null;
21
- }
22
-
23
- export { };
@@ -1,46 +0,0 @@
1
- declare global {
2
- // block.yaml
3
- export type BlockTag =
4
- | "earliest"
5
- | "finalized"
6
- | "safe"
7
- | "latest"
8
- | "pending";
9
- export type BlockNumberOrTag = Hex | BlockTag;
10
- export type BlockNumberOrTagOrHash = BlockNumberOrTag | Hex;
11
- export interface Block {
12
- hash: Hash32;
13
- parentHash: Hash32;
14
- sha3Uncles: Hash32;
15
- miner: Address;
16
- stateRoot: Hash32;
17
- transactionsRoot: Hash32;
18
- receiptsRoot: Hash32;
19
- logsBloom: Bytes256;
20
- number: Uint;
21
- gasLimit: Uint;
22
- gasUsed: Uint;
23
- timestamp: Uint;
24
- extraData: Bytes;
25
- mixHash: Hash32;
26
- nonce: Bytes8;
27
- size: Uint;
28
- transactions: Hash32[] | TransactionInfo[];
29
- uncles: Hash32[];
30
- requestedHash?: Hash32;
31
- baseFeePerGas?: Uint;
32
- withdrawalsRoot?: Hash32;
33
- blobGasUsed?: Uint;
34
- excessBlobGas?: Uint;
35
- parentBeaconBlockRoot?: Hash32;
36
- withdrawals?: Withdrawal[];
37
- difficulty?: Uint;
38
- }
39
- export interface BadBlock {
40
- block: Block;
41
- hash: Hash32;
42
- rlp: Bytes;
43
- }
44
- }
45
-
46
- export { };
@@ -1,11 +0,0 @@
1
- declare global {
2
- // client.yaml
3
- export type SyncingStatus = Syncing | false;
4
- export interface Syncing {
5
- startingBlock?: Uint;
6
- currentBlock?: Uint;
7
- highestBlock?: Uint;
8
- }
9
- }
10
-
11
- export { };
@@ -1,11 +0,0 @@
1
- declare global {
2
- export type DebugMethods = {
3
- debug_getRawHeader: { params: [BlockNumberOrTag]; result: Bytes };
4
- debug_getRawBlock: { params: [BlockNumberOrTag]; result: Bytes };
5
- debug_getRawTransaction: { params: [Hash32]; result: Bytes };
6
- debug_getRawReceipts: { params: [BlockNumberOrTag]; result: Bytes[] };
7
- debug_getBadBlocks: { params: []; result: BadBlock[] };
8
- };
9
- }
10
-
11
- export { };
@@ -1,108 +0,0 @@
1
- declare global {
2
- export type EthMethodsSpec = {
3
- eth_getTransactionByHash: {
4
- params: [Hash32];
5
- result: NotFound | TransactionInfo;
6
- };
7
- eth_getTransactionByBlockHashAndIndex: {
8
- params: [Hash32, Uint];
9
- result: NotFound | TransactionInfo;
10
- };
11
- eth_getTransactionReceipt: {
12
- params: [Hash32];
13
- result: NotFound | ReceiptInfo;
14
- };
15
- // eth/submit
16
- eth_sendTransaction: { params: [GenericTransaction]; result: Hash32 };
17
- eth_sendRawTransaction: { params: [Bytes]; result: Hash32 };
18
- // eth/state
19
- eth_getBalance: {
20
- params: [Address, BlockNumberOrTagOrHash];
21
- result: Uint;
22
- };
23
- eth_getStorageAt: {
24
- params: [Address, Bytes32, BlockNumberOrTagOrHash];
25
- result: Bytes;
26
- };
27
- eth_getTransactionCount: {
28
- params: [Address, BlockNumberOrTagOrHash];
29
- result: Uint;
30
- };
31
- eth_getCode: {
32
- params: [Address, BlockNumberOrTagOrHash];
33
- result: Bytes;
34
- };
35
- eth_getProof: {
36
- params: [Address, Bytes32[], BlockNumberOrTagOrHash];
37
- result: AccountProof;
38
- };
39
- // eth/sign
40
- eth_sign: { params: [Address, Bytes]; result: Bytes65 };
41
- eth_signTransaction: { params: [GenericTransaction]; result: Bytes };
42
- // eth/filter
43
- eth_newFilter: { params: [Filter]; result: Uint };
44
- eth_newBlockFilter: { params: []; result: Uint };
45
- eth_newPendingTransactionFilter: { params: []; result: Uint };
46
- eth_uninstallFilter: { params: []; result: Uint };
47
- eth_getFilterChanges: { params: []; result: FilterResults };
48
- eth_getFilterLogs: { params: [Uint]; result: FilterResults };
49
- eth_getLogs: { params: [Filter]; result: FilterResults };
50
- // eth/feeMarket
51
- eth_gasPrice: { params: []; result: Uint };
52
- eth_blobBaseFee: { params: []; result: Uint };
53
- eth_maxPriorityFeePerGas: { params: []; result: Uint };
54
- eth_feeHistory: {
55
- params: [Uint, BlockNumberOrTag, number[]];
56
- result: FeeHistoryResults;
57
- };
58
- // eth/execute
59
- eth_call: {
60
- params: [GenericTransaction, BlockNumberOrTagOrHash];
61
- result: Bytes;
62
- };
63
- eth_estimateGas: {
64
- params: [GenericTransaction, BlockNumberOrTag];
65
- result: Uint;
66
- };
67
- eth_createAccessList: {
68
- params: [GenericTransaction, BlockNumberOrTag];
69
- result: AccessListResult;
70
- };
71
- eth_simulateV1: {
72
- params: [EthSimulatePayload, BlockNumberOrTagOrHash];
73
- result: EthSimulateResult;
74
- };
75
- // eth/client
76
- eth_chainId: { params: []; result: Uint };
77
- eth_syncing: { params: []; result: SyncingStatus };
78
- eth_coinbase: { params: []; result: Address };
79
- eth_accounts: { params: []; result: Addresses };
80
- eth_blockNumber: { params: []; result: Uint };
81
- net_version: { params: []; result: UintDecimal };
82
- // eth/block
83
- eth_getBlockByHash: { params: [Hash32, boolean]; result: NotFound | Block };
84
- eth_getBlockByNumber: {
85
- params: [BlockNumberOrTag, boolean];
86
- result: NotFound | Block;
87
- };
88
- eth_getBlockTransactionCountByHash: {
89
- params: [Hash32];
90
- result: NotFound | Uint;
91
- };
92
- eth_getBlockTransactionCountByNumber: {
93
- params: [BlockNumberOrTag];
94
- result: NotFound | Uint;
95
- };
96
- eth_getUncleCountByBlockHash: { params: [Hash32]; result: NotFound | Uint };
97
- eth_getUncleCountByBlockNumber: {
98
- params: [BlockNumberOrTag];
99
- result: NotFound | Uint;
100
- };
101
- eth_getBlockReceipts: {
102
- params: [BlockNumberOrTagOrHash];
103
- result: NotFound | ReceiptInfo[];
104
- };
105
- } & DebugMethods;
106
- }
107
-
108
- export { };
@@ -1,85 +0,0 @@
1
- declare global {
2
- // execute.yaml
3
- export interface EthSimulatePayload {
4
- blockStateCalls: BlockStateCall[];
5
- traceTransfers?: boolean;
6
- validation?: boolean;
7
- returnFullTransactions?: boolean;
8
- }
9
- export interface BlockStateCall {
10
- blockOverrides?: BlockOverrides;
11
- stateOverrides?: StateOverrides;
12
- calls?: GenericCallTransaction[];
13
- }
14
- export interface BlockOverrides {
15
- number?: Uint64;
16
- prevRandao?: Uint256;
17
- time?: Uint64;
18
- gasLimit?: Uint64;
19
- feeRecipient?: Address;
20
- baseFeePerGas?: Uint256;
21
- withdrawals?: Withdrawal[];
22
- blobBaseFee?: Uint64;
23
- }
24
- export type StateOverrides = Record<Address, AccountOverride>;
25
- export interface GenericCallTransaction {
26
- type?: "0x0" | "0x1" | "0x2" | "0x3";
27
- to?: Address | null;
28
- from?: Address;
29
- value?: Uint;
30
- nonce?: Uint;
31
- gas?: Uint;
32
- input?: Bytes;
33
- gasPrice?: Uint;
34
- maxPriorityFeePerGas?: Uint;
35
- maxFeePerGas?: Uint;
36
- maxFeePerBlobGas?: Uint;
37
- accessList?: AccessListEntry[];
38
- blobVersionedHashes?: Hash32[];
39
- authorizationList?: AuthorizationList;
40
- }
41
- export type AccountOverride = AccountOverrideState | AccountOverrideStateDiff;
42
- export interface AccountOverrideState {
43
- state: AccountStorage;
44
- nonce?: Uint64;
45
- balance?: Uint256;
46
- code?: Bytes;
47
- movePrecompileToAddress?: Address;
48
- }
49
- export interface AccountOverrideStateDiff {
50
- stateDiff: AccountStorage;
51
- nonce?: Uint64;
52
- balance?: Uint256;
53
- code?: Bytes;
54
- movePrecompileToAddress?: Address;
55
- }
56
- export type AccountStorage = Record<Bytes32, Hash32>;
57
- export type EthSimulateResult = EthSimulateBlockResultSingleSuccess[];
58
-
59
- export type EthSimulateBlockResultSingleSuccess = {
60
- calls: CallResults;
61
- } & Block;
62
- export type CallResults = CallResultFailure | CallResultSuccess;
63
- export interface CallResultFailure {
64
- status: "0x0";
65
- returnData: Bytes;
66
- gasUsed: Uint64;
67
- error: EXECUTION_REVERTED_ERROR | VM_EXECUTION_ERROR;
68
- }
69
- export type EXECUTION_REVERTED_ERROR = {
70
- code: -32000;
71
- message: "execution reverted.";
72
- };
73
- export type VM_EXECUTION_ERROR = {
74
- code: -32015;
75
- message: "vm execution error.";
76
- };
77
- export interface CallResultSuccess {
78
- status: "0x1";
79
- returnData: Bytes;
80
- gasUsed: Uint64;
81
- logs: Log[];
82
- }
83
- }
84
-
85
- export { };
@@ -1,18 +0,0 @@
1
- declare global {
2
- // misc
3
- export interface FeeHistoryResults {
4
- oldestBlock: Uint;
5
- baseFeePerGas: Uint[];
6
- baseFeePerBlobGas?: Uint[];
7
- gasUsedRatio: Ratio[];
8
- blobGasUsedRatio?: Ratio[];
9
- reward?: Uint[][];
10
- }
11
- export interface AccessListResult {
12
- accessList?: AccessListEntry[];
13
- error?: string;
14
- gasUsed?: Uint;
15
- }
16
- }
17
-
18
- export { };
@@ -1,20 +0,0 @@
1
- declare global {
2
- // filter.yaml
3
- export type FilterResults = Hash32[] | Log[];
4
- export type FilterTopic = Bytes32 | Bytes32[];
5
- export type FilterTopics = FilterTopic | null;
6
- export type Filter = FilterByBlockRange | FilterByBlockHash;
7
- export interface FilterByBlockRange {
8
- fromBlock?: Uint;
9
- toBlock?: Uint;
10
- address?: null | Address | Addresses;
11
- topics?: FilterTopics;
12
- }
13
- export interface FilterByBlockHash {
14
- blockHash: Hash32;
15
- address?: Address | Addresses | null;
16
- topics?: FilterTopics;
17
- }
18
- }
19
-
20
- export { };
@@ -1,36 +0,0 @@
1
- declare global {
2
- // receipt.yaml
3
- export interface Log {
4
- transactionHash: Hash32;
5
- removed?: boolean;
6
- logIndex?: Uint;
7
- transactionIndex?: Uint;
8
- blockHash?: Hash32;
9
- blockNumber?: Uint;
10
- blockTimestamp?: Uint;
11
- address?: Address;
12
- data?: Bytes;
13
- topics?: Bytes32[];
14
- }
15
- export interface ReceiptInfo {
16
- type?: Byte;
17
- transactionHash: Hash32;
18
- transactionIndex: Uint;
19
- blockHash: Byte;
20
- blockNumber: Uint;
21
- from: Address;
22
- to?: Address | null;
23
- cumulativeGasUsed: Uint;
24
- gasUsed: Uint;
25
- blobGasUsed?: Uint;
26
- contractAddress?: Address | null;
27
- logs: Log[];
28
- logsBloom: Bytes256;
29
- root?: Hash32;
30
- status?: Uint;
31
- effectiveGasPrice: Uint;
32
- blobGasPrice?: Uint;
33
- }
34
- }
35
-
36
- export { };
@@ -1,19 +0,0 @@
1
- declare global {
2
- // state.yaml
3
- export interface AccountProof {
4
- address: Address;
5
- accountProof: Bytes;
6
- balance: Uint256;
7
- codeHash: Hash32;
8
- nonce: Uint64;
9
- storageHash: Hash32;
10
- storageProof: StorageProof;
11
- }
12
- export interface StorageProof {
13
- key: Bytes32;
14
- value: Uint256;
15
- proof: Bytes;
16
- }
17
- }
18
-
19
- export { };
@@ -1,149 +0,0 @@
1
- declare global {
2
- // transaction.yaml
3
- export interface AccessListEntry {
4
- address: Address;
5
- storageKeys: Hash32[];
6
- }
7
- export type TransactionUnsigned =
8
- | TransactionLegacyUnsigned
9
- | Transaction2930Unsigned
10
- | Transaction1559Unsigned
11
- | Transaction4844Unsigned
12
- | Transaction7702Unsigned;
13
-
14
- export interface TransactionLegacyUnsigned {
15
- type: "0x0";
16
- nonce: Uint;
17
- to?: Address | null;
18
- gas: Uint;
19
- value: Uint;
20
- input: Bytes;
21
- gasPrice: Uint;
22
- chainId?: Uint;
23
- }
24
- export interface Transaction2930Unsigned {
25
- type: "0x1";
26
- nonce: Uint;
27
- to?: Address | null;
28
- gas: Uint;
29
- value: Uint;
30
- input: Bytes;
31
- gasPrice: Uint;
32
- chainId: Uint;
33
- accessList: AccessListEntry[];
34
- }
35
- export interface Transaction1559Unsigned {
36
- type: "0x2";
37
- nonce: Uint;
38
- to?: Address | null;
39
- gas: Uint;
40
- value: Uint;
41
- input: Bytes;
42
- gasPrice: Uint;
43
- maxFeePerGas: Uint;
44
- maxPriorityFeePerGas: Uint;
45
- accessList: AccessListEntry[];
46
- chainId: Uint;
47
- }
48
- export interface Transaction4844Unsigned {
49
- type: "0x3";
50
- nonce: Uint;
51
- to: Address;
52
- gas: Uint;
53
- value: Uint;
54
- input: Bytes;
55
- gasPrice?: Uint;
56
- maxFeePerGas: Uint;
57
- maxPriorityFeePerGas: Uint;
58
- maxFeePerBlobGas: Uint;
59
- accessList: AccessListEntry[];
60
- blobVersionedHashes: Hash32[];
61
- chainId: Uint;
62
- }
63
- export interface Transaction7702Unsigned {
64
- type: "0x4";
65
- nonce: Uint;
66
- to: Address;
67
- gas: Uint;
68
- value: Uint;
69
- input: Bytes;
70
- maxPriorityFeePerGas: Uint;
71
- maxFeePerGas: Uint;
72
- gasPrice?: Uint;
73
- accessList: AccessListEntry[];
74
- chainId: Uint;
75
- authorizationList: AuthorizationList;
76
- }
77
- export interface AuthorizationListEntry {
78
- chainId: Uint;
79
- nonce: Uint;
80
- address: Address;
81
- yParity: Byte;
82
- r: Uint256;
83
- s: Uint256;
84
- }
85
- export type AuthorizationList = AuthorizationListEntry[];
86
-
87
- export type TransactionLegacySigned = {
88
- v: Byte;
89
- r: Uint;
90
- s: Uint;
91
- } & TransactionLegacyUnsigned;
92
- export type Transaction2930Signed = {
93
- yParity: Bytes;
94
- r: Uint;
95
- s: Uint;
96
- v?: Byte;
97
- } & Transaction2930Unsigned;
98
- export type Transaction1559Signed = {
99
- yParity: Bytes;
100
- r: Uint;
101
- s: Uint;
102
- v?: Byte;
103
- } & Transaction1559Unsigned;
104
- export type Transaction4844Signed = {
105
- yParity: Byte;
106
- r: Uint;
107
- s: Uint;
108
- v?: Byte;
109
- } & Transaction4844Unsigned;
110
- export type Transaction7702Signed = {
111
- yParity: Byte;
112
- r: Uint;
113
- s: Uint;
114
- v?: Byte;
115
- } & Transaction7702Unsigned;
116
- export type TransactionSigned =
117
- | TransactionLegacySigned
118
- | Transaction2930Signed
119
- | Transaction1559Signed
120
- | Transaction4844Signed
121
- | Transaction7702Signed;
122
- export type TransactionInfo = {
123
- blockHash: Hash32;
124
- blockNumber: Uint;
125
- from: Address;
126
- hash: Hash32;
127
- transactionIndex: Uint;
128
- } & TransactionSigned;
129
- export interface GenericTransaction {
130
- type?: "0x0" | "0x1" | "0x2" | "0x3";
131
- to?: Address | null;
132
- from?: Address;
133
- value?: Uint;
134
- nonce?: Uint;
135
- gas?: Uint;
136
- input?: Bytes;
137
- gasPrice?: Uint;
138
- maxPriorityFeePerGas?: Uint;
139
- maxFeePerGas?: Uint;
140
- maxFeePerBlobGas?: Uint;
141
- accessList?: AccessListEntry[];
142
- blobVersionedHashes?: Hash32[];
143
- blobs?: Bytes[];
144
- chainId?: Uint;
145
- authorizationList?: AuthorizationList;
146
- }
147
- }
148
-
149
- export { };
@@ -1,11 +0,0 @@
1
- declare global {
2
- // withdrawal.yaml
3
- export interface Withdrawal {
4
- index: Uint64;
5
- validatorIndex: Uint64;
6
- address: Address;
7
- amount: Uint256;
8
- }
9
- }
10
-
11
- export { };