@apibara/evm 2.0.1-beta.26 → 2.0.1-beta.27
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/dist/index.cjs +42 -42
- package/dist/index.d.cts +265 -265
- package/dist/index.d.mts +265 -265
- package/dist/index.d.ts +265 -265
- package/dist/index.mjs +42 -42
- package/package.json +2 -2
- package/src/block.ts +42 -42
package/dist/index.mjs
CHANGED
|
@@ -3024,18 +3024,18 @@ const TransactionStatus = Schema.transform(
|
|
|
3024
3024
|
);
|
|
3025
3025
|
const BlockHeader = Schema.Struct({
|
|
3026
3026
|
blockNumber: Schema.BigIntFromSelf,
|
|
3027
|
-
blockHash:
|
|
3028
|
-
parentBlockHash:
|
|
3029
|
-
unclesHash:
|
|
3030
|
-
miner:
|
|
3031
|
-
stateRoot:
|
|
3032
|
-
transactionsRoot:
|
|
3033
|
-
receiptsRoot:
|
|
3034
|
-
logsBloom:
|
|
3035
|
-
difficulty:
|
|
3036
|
-
gasLimit:
|
|
3037
|
-
gasUsed:
|
|
3038
|
-
timestamp: Schema.
|
|
3027
|
+
blockHash: B256$1,
|
|
3028
|
+
parentBlockHash: B256$1,
|
|
3029
|
+
unclesHash: B256$1,
|
|
3030
|
+
miner: Address$1,
|
|
3031
|
+
stateRoot: B256$1,
|
|
3032
|
+
transactionsRoot: B256$1,
|
|
3033
|
+
receiptsRoot: B256$1,
|
|
3034
|
+
logsBloom: Bloom,
|
|
3035
|
+
difficulty: U256$1,
|
|
3036
|
+
gasLimit: U128$1,
|
|
3037
|
+
gasUsed: U128$1,
|
|
3038
|
+
timestamp: Schema.DateFromSelf,
|
|
3039
3039
|
extraData: BytesFromUint8Array,
|
|
3040
3040
|
mixHash: Schema.optional(B256$1),
|
|
3041
3041
|
nonce: Schema.optional(Schema.BigIntFromSelf),
|
|
@@ -3047,73 +3047,73 @@ const BlockHeader = Schema.Struct({
|
|
|
3047
3047
|
parentBeaconBlockRoot: Schema.optional(B256$1)
|
|
3048
3048
|
});
|
|
3049
3049
|
const Withdrawal = Schema.Struct({
|
|
3050
|
-
filterIds: Schema.
|
|
3050
|
+
filterIds: Schema.Array(Schema.Number),
|
|
3051
3051
|
withdrawalIndex: Schema.Number,
|
|
3052
3052
|
index: Schema.BigIntFromSelf,
|
|
3053
3053
|
validatorIndex: Schema.Number,
|
|
3054
|
-
address:
|
|
3055
|
-
amount: Schema.
|
|
3054
|
+
address: Address$1,
|
|
3055
|
+
amount: Schema.BigIntFromSelf
|
|
3056
3056
|
});
|
|
3057
3057
|
const AccessListItem = Schema.Struct({
|
|
3058
|
-
address:
|
|
3058
|
+
address: Address$1,
|
|
3059
3059
|
storageKeys: Schema.Array(B256$1)
|
|
3060
3060
|
});
|
|
3061
3061
|
const Signature = Schema.Struct({
|
|
3062
|
-
r:
|
|
3063
|
-
s:
|
|
3064
|
-
v:
|
|
3062
|
+
r: U256$1,
|
|
3063
|
+
s: U256$1,
|
|
3064
|
+
v: U256$1,
|
|
3065
3065
|
YParity: Schema.optional(Schema.Boolean)
|
|
3066
3066
|
});
|
|
3067
3067
|
const Transaction = Schema.Struct({
|
|
3068
|
-
filterIds: Schema.
|
|
3068
|
+
filterIds: Schema.Array(Schema.Number),
|
|
3069
3069
|
transactionIndex: Schema.Number,
|
|
3070
|
-
transactionHash:
|
|
3071
|
-
nonce: Schema.
|
|
3072
|
-
from:
|
|
3070
|
+
transactionHash: B256$1,
|
|
3071
|
+
nonce: Schema.BigIntFromSelf,
|
|
3072
|
+
from: Address$1,
|
|
3073
3073
|
to: Schema.optional(Address$1),
|
|
3074
|
-
value:
|
|
3074
|
+
value: U256$1,
|
|
3075
3075
|
gasPrice: Schema.optional(U128$1),
|
|
3076
|
-
gas:
|
|
3076
|
+
gas: U128$1,
|
|
3077
3077
|
maxFeePerGas: Schema.optional(U128$1),
|
|
3078
3078
|
maxPriorityFeePerGas: Schema.optional(U128$1),
|
|
3079
3079
|
input: BytesFromUint8Array,
|
|
3080
3080
|
signature: Schema.optional(Signature),
|
|
3081
3081
|
chainId: Schema.optional(Schema.BigIntFromSelf),
|
|
3082
3082
|
accessList: Schema.Array(AccessListItem),
|
|
3083
|
-
transactionType: Schema.
|
|
3083
|
+
transactionType: Schema.BigIntFromSelf,
|
|
3084
3084
|
maxFeePerBlobGas: Schema.optional(U128$1),
|
|
3085
3085
|
blobVersionedHashes: Schema.Array(B256$1),
|
|
3086
|
-
transactionStatus:
|
|
3086
|
+
transactionStatus: TransactionStatus
|
|
3087
3087
|
});
|
|
3088
3088
|
const TransactionReceipt = Schema.Struct({
|
|
3089
|
-
filterIds: Schema.
|
|
3090
|
-
transactionIndex: Schema.
|
|
3091
|
-
transactionHash:
|
|
3092
|
-
cumulativeGasUsed:
|
|
3093
|
-
gasUsed:
|
|
3094
|
-
effectiveGasPrice:
|
|
3095
|
-
from:
|
|
3089
|
+
filterIds: Schema.Array(Schema.Number),
|
|
3090
|
+
transactionIndex: Schema.Number,
|
|
3091
|
+
transactionHash: B256$1,
|
|
3092
|
+
cumulativeGasUsed: U128$1,
|
|
3093
|
+
gasUsed: U128$1,
|
|
3094
|
+
effectiveGasPrice: U128$1,
|
|
3095
|
+
from: Address$1,
|
|
3096
3096
|
to: Schema.optional(Address$1),
|
|
3097
3097
|
contractAddress: Schema.optional(Address$1),
|
|
3098
|
-
logsBloom:
|
|
3099
|
-
transactionType: Schema.
|
|
3098
|
+
logsBloom: Bloom,
|
|
3099
|
+
transactionType: Schema.BigIntFromSelf,
|
|
3100
3100
|
blobGasUsed: Schema.optional(U128$1),
|
|
3101
3101
|
blobGasPrice: Schema.optional(U128$1),
|
|
3102
|
-
transactionStatus:
|
|
3102
|
+
transactionStatus: TransactionStatus
|
|
3103
3103
|
});
|
|
3104
3104
|
const Log = Schema.Struct({
|
|
3105
|
-
filterIds: Schema.
|
|
3106
|
-
address:
|
|
3105
|
+
filterIds: Schema.Array(Schema.Number),
|
|
3106
|
+
address: Address$1,
|
|
3107
3107
|
topics: Schema.Array(B256$1),
|
|
3108
3108
|
data: BytesFromUint8Array,
|
|
3109
3109
|
logIndex: Schema.Number,
|
|
3110
3110
|
logIndexInTransaction: Schema.Number,
|
|
3111
3111
|
transactionIndex: Schema.Number,
|
|
3112
|
-
transactionHash:
|
|
3113
|
-
transactionStatus:
|
|
3112
|
+
transactionHash: B256$1,
|
|
3113
|
+
transactionStatus: TransactionStatus
|
|
3114
3114
|
});
|
|
3115
3115
|
const Block = Schema.Struct({
|
|
3116
|
-
header:
|
|
3116
|
+
header: BlockHeader,
|
|
3117
3117
|
withdrawals: Schema.Array(Withdrawal),
|
|
3118
3118
|
transactions: Schema.Array(Transaction),
|
|
3119
3119
|
receipts: Schema.Array(TransactionReceipt),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apibara/evm",
|
|
3
|
-
"version": "2.0.1-beta.
|
|
3
|
+
"version": "2.0.1-beta.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"vitest": "^1.6.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@apibara/protocol": "2.0.0-beta.
|
|
38
|
+
"@apibara/protocol": "2.0.0-beta.35",
|
|
39
39
|
"@effect/schema": "^0.67.15",
|
|
40
40
|
"effect": "^3.2.6",
|
|
41
41
|
"long": "^5.2.1",
|
package/src/block.ts
CHANGED
|
@@ -44,18 +44,18 @@ export type TransactionStatus = typeof TransactionStatus.Type;
|
|
|
44
44
|
|
|
45
45
|
export const BlockHeader = Schema.Struct({
|
|
46
46
|
blockNumber: Schema.BigIntFromSelf,
|
|
47
|
-
blockHash:
|
|
48
|
-
parentBlockHash:
|
|
49
|
-
unclesHash:
|
|
50
|
-
miner:
|
|
51
|
-
stateRoot:
|
|
52
|
-
transactionsRoot:
|
|
53
|
-
receiptsRoot:
|
|
54
|
-
logsBloom:
|
|
55
|
-
difficulty:
|
|
56
|
-
gasLimit:
|
|
57
|
-
gasUsed:
|
|
58
|
-
timestamp: Schema.
|
|
47
|
+
blockHash: B256,
|
|
48
|
+
parentBlockHash: B256,
|
|
49
|
+
unclesHash: B256,
|
|
50
|
+
miner: Address,
|
|
51
|
+
stateRoot: B256,
|
|
52
|
+
transactionsRoot: B256,
|
|
53
|
+
receiptsRoot: B256,
|
|
54
|
+
logsBloom: Bloom,
|
|
55
|
+
difficulty: U256,
|
|
56
|
+
gasLimit: U128,
|
|
57
|
+
gasUsed: U128,
|
|
58
|
+
timestamp: Schema.DateFromSelf,
|
|
59
59
|
extraData: BytesFromUint8Array,
|
|
60
60
|
mixHash: Schema.optional(B256),
|
|
61
61
|
nonce: Schema.optional(Schema.BigIntFromSelf),
|
|
@@ -70,81 +70,81 @@ export const BlockHeader = Schema.Struct({
|
|
|
70
70
|
export type BlockHeader = typeof BlockHeader.Type;
|
|
71
71
|
|
|
72
72
|
export const Withdrawal = Schema.Struct({
|
|
73
|
-
filterIds: Schema.
|
|
73
|
+
filterIds: Schema.Array(Schema.Number),
|
|
74
74
|
withdrawalIndex: Schema.Number,
|
|
75
75
|
index: Schema.BigIntFromSelf,
|
|
76
76
|
validatorIndex: Schema.Number,
|
|
77
|
-
address:
|
|
78
|
-
amount: Schema.
|
|
77
|
+
address: Address,
|
|
78
|
+
amount: Schema.BigIntFromSelf,
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
export const AccessListItem = Schema.Struct({
|
|
82
|
-
address:
|
|
82
|
+
address: Address,
|
|
83
83
|
storageKeys: Schema.Array(B256),
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
export const Signature = Schema.Struct({
|
|
87
|
-
r:
|
|
88
|
-
s:
|
|
89
|
-
v:
|
|
87
|
+
r: U256,
|
|
88
|
+
s: U256,
|
|
89
|
+
v: U256,
|
|
90
90
|
YParity: Schema.optional(Schema.Boolean),
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
export const Transaction = Schema.Struct({
|
|
94
|
-
filterIds: Schema.
|
|
94
|
+
filterIds: Schema.Array(Schema.Number),
|
|
95
95
|
transactionIndex: Schema.Number,
|
|
96
|
-
transactionHash:
|
|
97
|
-
nonce: Schema.
|
|
98
|
-
from:
|
|
96
|
+
transactionHash: B256,
|
|
97
|
+
nonce: Schema.BigIntFromSelf,
|
|
98
|
+
from: Address,
|
|
99
99
|
to: Schema.optional(Address),
|
|
100
|
-
value:
|
|
100
|
+
value: U256,
|
|
101
101
|
gasPrice: Schema.optional(U128),
|
|
102
|
-
gas:
|
|
102
|
+
gas: U128,
|
|
103
103
|
maxFeePerGas: Schema.optional(U128),
|
|
104
104
|
maxPriorityFeePerGas: Schema.optional(U128),
|
|
105
105
|
input: BytesFromUint8Array,
|
|
106
106
|
signature: Schema.optional(Signature),
|
|
107
107
|
chainId: Schema.optional(Schema.BigIntFromSelf),
|
|
108
108
|
accessList: Schema.Array(AccessListItem),
|
|
109
|
-
transactionType: Schema.
|
|
109
|
+
transactionType: Schema.BigIntFromSelf,
|
|
110
110
|
maxFeePerBlobGas: Schema.optional(U128),
|
|
111
111
|
blobVersionedHashes: Schema.Array(B256),
|
|
112
|
-
transactionStatus:
|
|
112
|
+
transactionStatus: TransactionStatus,
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
export const TransactionReceipt = Schema.Struct({
|
|
116
|
-
filterIds: Schema.
|
|
117
|
-
transactionIndex: Schema.
|
|
118
|
-
transactionHash:
|
|
119
|
-
cumulativeGasUsed:
|
|
120
|
-
gasUsed:
|
|
121
|
-
effectiveGasPrice:
|
|
122
|
-
from:
|
|
116
|
+
filterIds: Schema.Array(Schema.Number),
|
|
117
|
+
transactionIndex: Schema.Number,
|
|
118
|
+
transactionHash: B256,
|
|
119
|
+
cumulativeGasUsed: U128,
|
|
120
|
+
gasUsed: U128,
|
|
121
|
+
effectiveGasPrice: U128,
|
|
122
|
+
from: Address,
|
|
123
123
|
to: Schema.optional(Address),
|
|
124
124
|
contractAddress: Schema.optional(Address),
|
|
125
|
-
logsBloom:
|
|
126
|
-
transactionType: Schema.
|
|
125
|
+
logsBloom: Bloom,
|
|
126
|
+
transactionType: Schema.BigIntFromSelf,
|
|
127
127
|
blobGasUsed: Schema.optional(U128),
|
|
128
128
|
blobGasPrice: Schema.optional(U128),
|
|
129
|
-
transactionStatus:
|
|
129
|
+
transactionStatus: TransactionStatus,
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
export const Log = Schema.Struct({
|
|
133
|
-
filterIds: Schema.
|
|
134
|
-
address:
|
|
133
|
+
filterIds: Schema.Array(Schema.Number),
|
|
134
|
+
address: Address,
|
|
135
135
|
topics: Schema.Array(B256),
|
|
136
136
|
data: BytesFromUint8Array,
|
|
137
137
|
logIndex: Schema.Number,
|
|
138
138
|
logIndexInTransaction: Schema.Number,
|
|
139
139
|
transactionIndex: Schema.Number,
|
|
140
|
-
transactionHash:
|
|
141
|
-
transactionStatus:
|
|
140
|
+
transactionHash: B256,
|
|
141
|
+
transactionStatus: TransactionStatus,
|
|
142
142
|
});
|
|
143
143
|
|
|
144
144
|
export type Log = typeof Log.Type;
|
|
145
145
|
|
|
146
146
|
export const Block = Schema.Struct({
|
|
147
|
-
header:
|
|
147
|
+
header: BlockHeader,
|
|
148
148
|
withdrawals: Schema.Array(Withdrawal),
|
|
149
149
|
transactions: Schema.Array(Transaction),
|
|
150
150
|
receipts: Schema.Array(TransactionReceipt),
|