voltaire-effect 0.2.27 → 0.3.0

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
@@ -4,13 +4,26 @@ Effect-TS integration for the [Voltaire](https://github.com/evmts/voltaire) Ethe
4
4
 
5
5
  ## Quick Start
6
6
 
7
+ **viem** - implicit 3 retries hidden in transport config:
8
+ ```typescript
9
+ import { createPublicClient, http } from 'viem'
10
+
11
+ const client = createPublicClient({
12
+ transport: http('https://eth.llamarpc.com', { retryCount: 3 }) // hidden default
13
+ })
14
+
15
+ const balance = await client.readContract({
16
+ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
17
+ abi: erc20Abi,
18
+ functionName: 'balanceOf',
19
+ args: [userAddress]
20
+ })
21
+ ```
22
+
23
+ **voltaire-effect** - explicit control over retry, timeout, and composition:
7
24
  ```typescript
8
25
  import { Effect } from 'effect'
9
- import {
10
- ContractRegistryService,
11
- makeContractRegistry,
12
- HttpProvider
13
- } from 'voltaire-effect'
26
+ import { ContractRegistryService, makeContractRegistry, HttpProvider } from 'voltaire-effect'
14
27
 
15
28
  const Contracts = makeContractRegistry({
16
29
  USDC: { abi: erc20Abi, address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' },
@@ -23,13 +36,87 @@ const program = Effect.gen(function* () {
23
36
  const wethBalance = yield* WETH.read.balanceOf(userAddress)
24
37
  return { usdcBalance, wethBalance }
25
38
  }).pipe(
26
- Effect.retry({ times: 3 }),
27
- Effect.timeout('10 seconds'),
39
+ Effect.retry({ times: 3 }), // explicit retry policy
40
+ Effect.timeout('10 seconds'), // explicit timeout
28
41
  Effect.provide(Contracts),
29
42
  Effect.provide(HttpProvider('https://eth.llamarpc.com'))
30
43
  )
44
+
45
+ const { usdcBalance, wethBalance } = await Effect.runPromise(program)
46
+ ```
47
+
48
+ **viem** - Address and Bytecode are both `0x${string}`, easily confused:
49
+ ```typescript
50
+ import { type Address, type Hex } from 'viem'
51
+
52
+ const address: Address = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
53
+ const bytecode: Hex = '0x608060405234801561001057600080fd5b50'
54
+
55
+ // TypeScript allows this - runtime bug waiting to happen
56
+ await client.readContract({
57
+ address: bytecode, // oops, passed bytecode as address - compiles fine!
58
+ abi: erc20Abi,
59
+ functionName: 'balanceOf',
60
+ args: [address]
61
+ })
62
+ ```
63
+
64
+ **voltaire-effect** - branded types prevent mixing:
65
+ ```typescript
66
+ import * as Address from '@tevm/voltaire/Address'
67
+ import * as Bytecode from '@tevm/voltaire/Bytecode'
68
+
69
+ const address = Address.from('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48')
70
+ const bytecode = Bytecode.from('0x608060405234801561001057600080fd5b50')
71
+
72
+ await client.readContract({
73
+ address: bytecode, // Type error: Bytecode is not assignable to Address
74
+ ...
75
+ })
31
76
  ```
32
77
 
78
+ ### Performance: encodeFunctionData
79
+
80
+ Both encode the same calldata, but Voltaire's WASM-optimized keccak256 (used for function selectors) is ~9x faster:
81
+
82
+ **viem**:
83
+ ```typescript
84
+ import { encodeFunctionData } from 'viem'
85
+
86
+ const calldata = encodeFunctionData({
87
+ abi: erc20Abi,
88
+ functionName: 'transfer',
89
+ args: [recipient, amount]
90
+ })
91
+ // Throws on error - must wrap in try/catch
92
+ ```
93
+
94
+ **voltaire**:
95
+ ```typescript
96
+ import * as Abi from '@tevm/voltaire/Abi'
97
+
98
+ const calldata = Abi.encodeFunction(erc20Abi, 'transfer', [recipient, amount])
99
+ ```
100
+
101
+ **voltaire-effect** (typed errors):
102
+ ```typescript
103
+ import { Effect } from 'effect'
104
+ import { encodeFunctionData } from 'voltaire-effect/primitives/Abi'
105
+
106
+ const calldata = await Effect.runPromise(
107
+ encodeFunctionData(erc20Abi, 'transfer', [recipient, amount])
108
+ )
109
+ // Effect<Hex, AbiItemNotFoundError | AbiEncodingError>
110
+ ```
111
+
112
+ | Operation | viem | voltaire | Speedup |
113
+ |-----------|------|----------|---------|
114
+ | keccak256 (32B) | 3.22 µs | 349 ns | **9.2x** |
115
+ | keccak256 (256B) | 6.23 µs | 571 ns | **10.9x** |
116
+ | keccak256 (1KB) | 24.4 µs | 1.87 µs | **13x** |
117
+
118
+ *Benchmarks on Apple M3 Max, bun 1.3.4. Voltaire uses WASM-compiled Zig keccak256.*
119
+
33
120
  ## Installation
34
121
 
35
122
  ```bash
@@ -1,7 +1,7 @@
1
1
  import { BrandedSiwe, Siwe, BeaconBlockRoot, BinaryTree, BrandedBlob as BrandedBlob$a, Block, BlockBody, BlockFilter, BlockHash, BlockHeader, BlockNumber, BrandedBloomFilter, CallTrace, ChainHead, CompilerVersion, ContractCode, ContractResult, BrandedAddress as BrandedAddress$1, BrandedHash, DecodedData, Domain, DomainSeparator, EncodedData, Ens, Epoch, ErrorSignature, EventSignature, FilterId, ForkId, FunctionSignature, GasEstimate, Gas, GasRefund, GasUsed, Hardfork as Hardfork$2, BrandedInt8, BrandedInt16, BrandedInt32, BrandedInt64, BrandedInt128, BrandedInt256, License, LogIndex, MemoryDump, MerkleTree, Metadata, MultiTokenId, NodeInfo, Opcode, OpStep, PeerId, PeerInfo, PendingTransactionFilter, Permit, Proof as Proof$4, ProtocolVersion, Proxy, ReturnData, RevertReason, RuntimeCode, SignedData, Slot, SourceMap, State, StateDiff, StateProof, StorageProof, TokenBalance, TokenId, TransactionIndex, TransactionStatus, TransactionUrl, BrandedUint8, BrandedUint16, BrandedUint32, Uint64, BrandedUint128, Uncle, ValidatorIndex, Withdrawal, WithdrawalIndex } from '@tevm/voltaire';
2
2
  import * as S from 'effect/Schema';
3
3
  import { Signature as Signature$1, GetMessageHash, InvalidFieldError, InvalidNonceLengthError, InvalidSiweMessageError, MissingFieldError, SiweParseError, Verify, VerifyMessage } from '@tevm/voltaire/Siwe';
4
- import { Effect as Effect$1 } from 'effect';
4
+ import { Effect as Effect$1, Redacted } from 'effect';
5
5
  import { AddressType as AddressType$1, InvalidAddressError, InvalidHexFormatError, InvalidAddressLengthError, InvalidValueError as InvalidValueError$1, InvalidAbiEncodedPaddingError, Address, InvalidChecksumError, BrandedAddress, HEX_SIZE, InvalidHexStringError, NATIVE_ASSET_ADDRESS, NotImplementedError, SIZE, ZERO_ADDRESS } from '@tevm/voltaire/Address';
6
6
  import { BrandedAccessList, Item, ADDRESS_COST, COLD_ACCOUNT_ACCESS_COST, COLD_STORAGE_ACCESS_COST, STORAGE_KEY_COST, WARM_STORAGE_ACCESS_COST } from '@tevm/voltaire/AccessList';
7
7
  import { InvalidFormatError, InvalidLengthError, DecodingError, ValidationError } from '@tevm/voltaire/errors';
@@ -15917,6 +15917,31 @@ declare namespace index$P {
15917
15917
  */
15918
15918
 
15919
15919
  declare const Bytes$d: S.Schema<PrivateKeyType, Uint8Array>;
15920
+ /**
15921
+ * Schema for PrivateKey encoded as raw bytes, wrapped in Redacted.
15922
+ *
15923
+ * @description
15924
+ * Transforms Uint8Array to Redacted<PrivateKeyType> for secure handling.
15925
+ * The redacted wrapper prevents accidental logging of private keys.
15926
+ * Use `Redacted.value()` to explicitly unwrap for cryptographic operations.
15927
+ *
15928
+ * @example Decoding
15929
+ * ```typescript
15930
+ * import * as PrivateKey from 'voltaire-effect/primitives/PrivateKey'
15931
+ * import { Redacted } from 'effect'
15932
+ * import * as S from 'effect/Schema'
15933
+ *
15934
+ * const bytes = new Uint8Array(32).fill(1)
15935
+ * const pk = S.decodeSync(PrivateKey.RedactedBytes)(bytes)
15936
+ * console.log(pk) // Redacted(<redacted>)
15937
+ *
15938
+ * const unwrapped = Redacted.value(pk)
15939
+ * // Use unwrapped for signing
15940
+ * ```
15941
+ *
15942
+ * @since 0.1.0
15943
+ */
15944
+ declare const RedactedBytes: S.Schema<Redacted.Redacted<PrivateKeyType>, Uint8Array>;
15920
15945
 
15921
15946
  /**
15922
15947
  * Schema for PrivateKey encoded as a hex string.
@@ -15945,6 +15970,30 @@ declare const Bytes$d: S.Schema<PrivateKeyType, Uint8Array>;
15945
15970
  */
15946
15971
 
15947
15972
  declare const Hex$d: S.Schema<PrivateKeyType, string>;
15973
+ /**
15974
+ * Schema for PrivateKey encoded as hex string, wrapped in Redacted.
15975
+ *
15976
+ * @description
15977
+ * Transforms hex strings to Redacted<PrivateKeyType> for secure handling.
15978
+ * The redacted wrapper prevents accidental logging of private keys.
15979
+ * Use `Redacted.value()` to explicitly unwrap for cryptographic operations.
15980
+ *
15981
+ * @example Decoding
15982
+ * ```typescript
15983
+ * import * as PrivateKey from 'voltaire-effect/primitives/PrivateKey'
15984
+ * import { Redacted } from 'effect'
15985
+ * import * as S from 'effect/Schema'
15986
+ *
15987
+ * const pk = S.decodeSync(PrivateKey.RedactedHex)('0x0123...')
15988
+ * console.log(pk) // Redacted(<redacted>)
15989
+ *
15990
+ * const unwrapped = Redacted.value(pk)
15991
+ * // Use unwrapped for signing
15992
+ * ```
15993
+ *
15994
+ * @since 0.1.0
15995
+ */
15996
+ declare const RedactedHex: S.Schema<Redacted.Redacted<PrivateKeyType>, string>;
15948
15997
 
15949
15998
  /**
15950
15999
  * @fileoverview Effect-based private key validation.
@@ -15991,63 +16040,57 @@ declare const random: () => Effect.Effect<PrivateKeyType>;
15991
16040
  * @module PrivateKey
15992
16041
  * @description Effect Schemas for secp256k1 private keys with cryptographic operations.
15993
16042
  *
15994
- * ## Type Declarations
15995
- *
15996
- * ```typescript
15997
- * import * as PrivateKey from 'voltaire-effect/primitives/PrivateKey'
15998
- *
15999
- * function signMessage(key: PrivateKey.PrivateKeyType) {
16000
- * // ...
16001
- * }
16002
- * ```
16003
- *
16004
16043
  * ## Schemas
16005
16044
  *
16006
- * | Schema | Input | Output |
16007
- * |--------|-------|--------|
16008
- * | `PrivateKey.Hex` | hex string | PrivateKeyType |
16009
- * | `PrivateKey.Bytes` | Uint8Array | PrivateKeyType |
16045
+ * | Schema | Input | Output | Use Case |
16046
+ * |--------|-------|--------|----------|
16047
+ * | `PrivateKey.Hex` | hex string | PrivateKeyType | Development |
16048
+ * | `PrivateKey.Bytes` | Uint8Array | PrivateKeyType | Development |
16049
+ * | `PrivateKey.RedactedHex` | hex string | Redacted<PrivateKeyType> | **Production** |
16050
+ * | `PrivateKey.RedactedBytes` | Uint8Array | Redacted<PrivateKeyType> | **Production** |
16010
16051
  *
16011
- * ## Usage
16052
+ * ## Redacted Schemas (Recommended)
16053
+ *
16054
+ * Use `RedactedHex` or `RedactedBytes` in production to prevent accidental logging:
16012
16055
  *
16013
16056
  * ```typescript
16014
16057
  * import * as PrivateKey from 'voltaire-effect/primitives/PrivateKey'
16058
+ * import { Redacted } from 'effect'
16015
16059
  * import * as S from 'effect/Schema'
16016
16060
  *
16017
- * // Decode (parse input)
16018
- * const pk = S.decodeSync(PrivateKey.Hex)('0x0123456789abcdef...')
16061
+ * const pk = S.decodeSync(PrivateKey.RedactedHex)('0x0123...')
16062
+ * console.log(pk) // Redacted(<redacted>)
16019
16063
  *
16020
- * // Encode (format output)
16021
- * const hex = S.encodeSync(PrivateKey.Hex)(pk)
16022
- * const bytes = S.encodeSync(PrivateKey.Bytes)(pk)
16064
+ * // Explicit unwrap for crypto operations
16065
+ * const unwrapped = Redacted.value(pk)
16066
+ * const sig = Secp256k1.sign(hash, unwrapped)
16023
16067
  * ```
16024
16068
  *
16025
- * ## Cryptographic Operations
16069
+ * ## Standard Usage
16026
16070
  *
16027
16071
  * ```typescript
16028
- * import * as Effect from 'effect/Effect'
16072
+ * import * as PrivateKey from 'voltaire-effect/primitives/PrivateKey'
16073
+ * import * as S from 'effect/Schema'
16029
16074
  *
16030
- * const program = Effect.gen(function* () {
16031
- * const pk = yield* PrivateKey.random()
16032
- * const publicKey = yield* PrivateKey.toPublicKey(pk)
16033
- * const address = yield* PrivateKey.toAddress(pk)
16034
- * const signature = yield* PrivateKey.sign(pk, messageHash)
16035
- * return { publicKey, address, signature }
16036
- * })
16075
+ * const pk = S.decodeSync(PrivateKey.Hex)('0x0123456789abcdef...')
16076
+ * const hex = S.encodeSync(PrivateKey.Hex)(pk)
16037
16077
  * ```
16038
16078
  *
16039
16079
  * ## Pure Functions
16040
16080
  *
16041
16081
  * ```typescript
16042
16082
  * PrivateKey.isValid(value) // Effect<boolean>
16083
+ * PrivateKey.random() // Effect<PrivateKeyType>
16043
16084
  * ```
16044
16085
  *
16045
16086
  * @since 0.1.0
16046
16087
  */
16047
16088
 
16089
+ declare const index$O_RedactedBytes: typeof RedactedBytes;
16090
+ declare const index$O_RedactedHex: typeof RedactedHex;
16048
16091
  declare const index$O_random: typeof random;
16049
16092
  declare namespace index$O {
16050
- export { Bytes$d as Bytes, Hex$d as Hex, isValid$2 as isValid, index$O_random as random };
16093
+ export { Bytes$d as Bytes, Hex$d as Hex, index$O_RedactedBytes as RedactedBytes, index$O_RedactedHex as RedactedHex, isValid$2 as isValid, index$O_random as random };
16051
16094
  }
16052
16095
 
16053
16096
  type ProofType$1 = Proof$4.ProofType;
package/dist/index.d.ts CHANGED
@@ -15,12 +15,12 @@ export { a as ProviderShape, T as TransportError } from './ProviderService-BZ5pq
15
15
  import { I as InvalidPrivateKeyError, a as InvalidPublicKeyError, b as InvalidRecoveryIdError, c as InvalidSignatureError, d as Secp256k1Error, e as Secp256k1Errors, S as Secp256k1Service, f as Secp256k1ServiceShape, g as SignOptions, m as mapToSecp256k1Error } from './Secp256k1Service-OxQ6hJFp.js';
16
16
  import { aN as hash, bn as Secp256k1Live, bo as Secp256k1Test, bm as recover, bp as sign, bq as verify, ae as EIP712Live, E as EIP712Service, af as EIP712ServiceShape, ag as EIP712Test, ah as hashDomain, ai as hashStruct, aj as hashTypedData, ak as recoverAddress, al as signTypedData, am as verifyTypedData, h as SignatureInput, s as Bip39Live, B as Bip39Service, t as Bip39ServiceShape, u as Bip39Test, br as MnemonicStrength, bs as WORD_COUNTS, v as generateMnemonic, w as getWordCount, x as mnemonicToSeed, y as mnemonicToSeedSync, z as validateMnemonic, D as Blake2Live, a as Blake2Service, F as Blake2Test, G as hash$1, J as Bls12381Live, b as Bls12381Service, L as Bls12381ServiceShape, I as aggregate, M as sign$1, N as verify$1, O as Bn254Error, Q as Bn254Live, c as Bn254Service, T as Bn254ServiceShape, U as Bn254Test, W as g1Add, X as g1Generator, Y as g1Mul, Z as g2Add, _ as g2Generator, $ as g2Mul, a0 as pairingCheck, bt as ChaCha20Poly1305Error, a1 as ChaCha20Poly1305Live, C as ChaCha20Poly1305Service, a2 as ChaCha20Poly1305ServiceShape, a3 as ChaCha20Poly1305Test, bu as InvalidKeyError, bv as InvalidNonceError, a4 as decrypt, a5 as encrypt, a6 as generateKey, a7 as generateNonce, a8 as Ed25519Live, d as Ed25519Service, a9 as Ed25519ServiceShape, aa as Ed25519Test, ab as getPublicKey, ac as sign$2, ad as verify$2, an as unwrapSignature, ao as verifySignature, ap as wrapSignature, ax as HDNode, ay as HDPath, az as HDWalletError, e as HDWalletService, aA as HDWalletServiceShape, aB as HDWalletTest, aw as HardenedDerivationError, aC as InvalidKeyError$1, aD as InvalidPathError, aE as InvalidSeedError, aq as derive, ar as fromMnemonic, as as fromSeed, at as generateMnemonic$1, au as getPrivateKey, av as getPublicKey$1, bw as mapToHDWalletError, aF as mnemonicToSeed$1, aG as withPrivateKey, aH as withSeed, aI as HMACLive, H as HMACService, aJ as HMACServiceShape, aK as HMACTest, aL as hmacSha256, aM as hmacSha512, aO as DecryptError, aR as KeystoreLive, K as KeystoreService, aS as KeystoreServiceShape, aT as KeystoreTest, aP as decrypt$1, aQ as encrypt$1, aU as withDecryptedKey, aV as blobToKzgCommitment, aW as computeBlobKzgProof, aX as verifyBlobKzgProof, aZ as ModExpLive, a_ as ModExpService, a$ as ModExpServiceShape, b0 as ModExpTest, aY as calculateGas, b1 as modexp, b2 as modexpBytes, b3 as P256Live, P as P256Service, b4 as P256ServiceShape, b5 as sign$3, b6 as verify$3, b8 as Ripemd160Live, R as Ripemd160Service, b9 as Ripemd160Test, b7 as hash$2, bb as SHA256Live, S as SHA256Service, bc as SHA256Test, ba as hash$3, bi as X25519Live, bj as X25519Service, bk as X25519ServiceShape, bl as X25519Test, bf as computeSecret, bg as generateKeyPair, bh as getPublicKey$2 } from './X25519Test-D5Q-5fL9.js';
17
17
  export { i as AesGcm, f as CryptoLive, g as CryptoTest } from './X25519Test-D5Q-5fL9.js';
18
- import { bm as SiweMessageType } from './index-BCOuszKZ.js';
19
- export { i as AccessList, a as AccountState, b as Address, c as Authorization, d as Balance, e as Base64, f as BaseFeePerGas, g as BeaconBlockRoot, h as BinaryTree, j as Blob, k as Block, l as BlockBody, m as BlockFilter, n as BlockHash, o as BlockHeader, p as BlockNumber, q as BloomFilter, r as BuilderBid, s as Bundle, t as BundleHash, u as Bundler, v as Bytecode, w as Bytes, x as Bytes32, y as CallData, z as CallTrace, A as Chain, B as ChainHead, C as ChainId, D as CompilerVersion, E as ContractCode, F as ContractResult, G as ContractSignature, H as DecodedData, I as Denomination, J as Domain, K as DomainSeparator, L as EffectiveGasPrice, M as EncodedData, N as Ens, O as EntryPoint, P as Epoch, Q as ErrorSignature, R as EventLog, S as EventSignature, T as FeeMarket, U as FeeOracle, V as FilterId, W as ForkId, X as ForwardRequest, Y as FunctionSignature, Z as Gas, _ as GasConstants, $ as GasCosts, a0 as GasEstimate, a1 as GasPrice, a2 as GasRefund, a3 as GasUsed, a4 as Hardfork, a5 as Hash, a6 as Hex, a7 as InitCode, ac as Int128, a9 as Int16, ad as Int256, aa as Int32, ab as Int64, a8 as Int8, ae as License, af as LogFilter, ag as LogIndex, ah as MaxFeePerGas, ai as MaxPriorityFeePerGas, aj as MemoryDump, ak as MerkleTree, al as Metadata, am as MultiTokenId, an as NetworkId, ao as NodeInfo, ap as Nonce, ar as OpStep, aq as Opcode, as as PackedUserOperation, at as Paymaster, au as PeerId, av as PeerInfo, aw as PendingTransactionFilter, ax as Permit, ay as PrivateKey, az as Proof, aA as ProtocolVersion, aB as Proxy, aC as PublicKey, aD as Receipt, aE as RelayData, aF as ReturnData, aG as RevertReason, aH as Rlp, aI as RuntimeCode, aJ as Selector, aK as Signature, aL as SignedData, aM as Siwe, aN as Slot, aO as SourceMap, aP as Ssz, aQ as State, aR as StateDiff, aS as StateProof, aT as StateRoot, aU as StealthAddress, aV as Storage, aW as StorageDiff, aX as StorageProof, aY as StorageValue, aZ as StructLog, a_ as SyncStatus, a$ as TokenBalance, b0 as TokenId, b1 as TopicFilter, b2 as TraceConfig, b3 as TraceResult, b4 as Transaction, b5 as TransactionHash, b6 as TransactionIndex, b7 as TransactionStatus, b8 as TransactionUrl, b9 as TypedData, ba as U256, bb as Uint, bg as Uint128, bd as Uint16, be as Uint32, bf as Uint64, bc as Uint8, bh as Uncle, bi as UserOperation, bj as ValidatorIndex, bk as Withdrawal, bl as WithdrawalIndex } from './index-BCOuszKZ.js';
18
+ import { bm as SiweMessageType } from './index-3UKSP3cd.js';
19
+ export { i as AccessList, a as AccountState, b as Address, c as Authorization, d as Balance, e as Base64, f as BaseFeePerGas, g as BeaconBlockRoot, h as BinaryTree, j as Blob, k as Block, l as BlockBody, m as BlockFilter, n as BlockHash, o as BlockHeader, p as BlockNumber, q as BloomFilter, r as BuilderBid, s as Bundle, t as BundleHash, u as Bundler, v as Bytecode, w as Bytes, x as Bytes32, y as CallData, z as CallTrace, A as Chain, B as ChainHead, C as ChainId, D as CompilerVersion, E as ContractCode, F as ContractResult, G as ContractSignature, H as DecodedData, I as Denomination, J as Domain, K as DomainSeparator, L as EffectiveGasPrice, M as EncodedData, N as Ens, O as EntryPoint, P as Epoch, Q as ErrorSignature, R as EventLog, S as EventSignature, T as FeeMarket, U as FeeOracle, V as FilterId, W as ForkId, X as ForwardRequest, Y as FunctionSignature, Z as Gas, _ as GasConstants, $ as GasCosts, a0 as GasEstimate, a1 as GasPrice, a2 as GasRefund, a3 as GasUsed, a4 as Hardfork, a5 as Hash, a6 as Hex, a7 as InitCode, ac as Int128, a9 as Int16, ad as Int256, aa as Int32, ab as Int64, a8 as Int8, ae as License, af as LogFilter, ag as LogIndex, ah as MaxFeePerGas, ai as MaxPriorityFeePerGas, aj as MemoryDump, ak as MerkleTree, al as Metadata, am as MultiTokenId, an as NetworkId, ao as NodeInfo, ap as Nonce, ar as OpStep, aq as Opcode, as as PackedUserOperation, at as Paymaster, au as PeerId, av as PeerInfo, aw as PendingTransactionFilter, ax as Permit, ay as PrivateKey, az as Proof, aA as ProtocolVersion, aB as Proxy, aC as PublicKey, aD as Receipt, aE as RelayData, aF as ReturnData, aG as RevertReason, aH as Rlp, aI as RuntimeCode, aJ as Selector, aK as Signature, aL as SignedData, aM as Siwe, aN as Slot, aO as SourceMap, aP as Ssz, aQ as State, aR as StateDiff, aS as StateProof, aT as StateRoot, aU as StealthAddress, aV as Storage, aW as StorageDiff, aX as StorageProof, aY as StorageValue, aZ as StructLog, a_ as SyncStatus, a$ as TokenBalance, b0 as TokenId, b1 as TopicFilter, b2 as TraceConfig, b3 as TraceResult, b4 as Transaction, b5 as TransactionHash, b6 as TransactionIndex, b7 as TransactionStatus, b8 as TransactionUrl, b9 as TypedData, ba as U256, bb as Uint, bg as Uint128, bd as Uint16, be as Uint32, bf as Uint64, bc as Uint8, bh as Uncle, bi as UserOperation, bj as ValidatorIndex, bk as Withdrawal, bl as WithdrawalIndex } from './index-3UKSP3cd.js';
20
20
  import { BlockInclude, RetryOptions, StreamBlock, LightBlock, BackfillOptions, BlockStream, BlockStreamConstructorOptions, BlockStreamEvent, BlockStreamMetadata, BlockStreamOptions, BlocksEvent, ReorgEvent, WatchOptions } from '@tevm/voltaire/block';
21
21
  export { BackfillOptions, BlockInclude, BlockStreamEvent, BlocksEvent, WatchOptions } from '@tevm/voltaire/block';
22
22
  import { TransportService } from './services/index.js';
23
- export { AbiDecodeError, AbiEncodeError, AbiEncoderService, AbiEncoderShape, AccessListInput, AccessListType, AccountError, AccountService, AccountShape, AccountStateOverride, AddressInput, ArbitrumFormatter, ArbitrumProvider, AssetChange, BackfillBlocksError, BalanceResolver, BaseProvider, BlockExplorerConfig, BlockExplorerService, BlockOverrides, BlockStream, BlockStreamError, BlockStreamService, BlockStreamShape, BlockTag, BlockType, BlockchainError, BlockchainHexInput, BlockchainService, BlockchainShape, BrowserProvider, BrowserTransport, CacheService, CacheShape, CallError, CallRequest, CcipError, CcipRequest, CcipService, CcipShape, ChainConfig, ChainContract, ChainService, ComposedServices, Contract, ContractAbi, ContractAbiItem, ContractBlockTag, ContractCall, ContractCallError, ContractDef, ContractError, ContractEventError, ContractFactory, ContractInstance, ContractRegistryBase, ContractRegistryConfig, ContractRegistryService, ContractRegistryShape, ContractWriteError, ContractsConfig, ContractsService, CreateAccessListError, CreateAccessListResult, CreateBlockFilterError, CreateEventFilterError, CreatePendingTransactionFilterError, CustomTransport, CustomTransportConfig, CustomTransportFromFn, Debug, DebugService, DebugShape, DebugTraceConfig, DecodedEvent, DefaultAbiEncoder, DefaultCcip, DefaultEns, DefaultFeeEstimator, DefaultFormatter, DefaultKzg, DefaultNonceManager, DefaultRateLimiter, DefaultTransactionSerializer, DeserializeError, EIP1193Provider, ENS_REGISTRY_ADDRESS, ENS_UNIVERSAL_RESOLVER_ADDRESS, EngineApi, EngineApiService, EngineApiShape, EnsError, EnsService, EnsShape, EstimateGasError, EthBlockNumber, EthCall, EthChainId, EthEstimateGas, EthGasPrice, EthGetBalance, EthGetBlockByHash, EthGetBlockByNumber, EthGetCode, EthGetLogs, EthGetStorageAt, EthGetTransactionByHash, EthGetTransactionCount, EthGetTransactionReceipt, EventFilter, FeeEstimationError, FeeEstimatorService, FeeEstimatorShape, FeeHistoryType, FeeValues, FeeValuesEIP1559, FeeValuesLegacy, FilterChanges, ForkBlockchain, ForkBlockchainOptions, FormatError, FormatterService, FormatterShape, GenericRpcRequest, GetAccountsError, GetBalance, GetBalanceError, GetBlobBaseFeeError, GetBlockArgs, GetBlockError, GetBlockNumberError, GetBlockReceiptsArgs, GetBlockReceiptsError, GetBlockTransactionCountArgs, GetBlockTransactionCountError, GetChainIdError, GetCodeError, GetCoinbaseError, GetEnsAddressParams, GetEnsAvatarParams, GetEnsNameParams, GetEnsResolverParams, GetEnsTextParams, GetFeeHistoryError, GetFilterChangesError, GetFilterLogsError, GetGasPriceError, GetHashrateError, GetLogsError, GetMaxPriorityFeePerGasError, GetMiningError, GetProofError, GetProtocolVersionError, GetStorageAtError, GetSyncingError, GetTransactionByBlockHashAndIndexError, GetTransactionByBlockNumberAndIndexError, GetTransactionConfirmationsError, GetTransactionCountError, GetTransactionError, GetTransactionReceiptError, GetUncleArgs, GetUncleCountArgs, GetUncleCountError, GetUncleError, GetWorkError, HashInput, HttpProvider, HttpProviderFetch, HttpTransport, IdGenerator, IdGeneratorLive, IdGeneratorShape, InMemoryBlockchain, InferContractRegistry, IpcProvider, JsonRpcAccount, KzgError, KzgService, KzgShape, LocalAccount, LogType, MULTICALL3_ADDRESS, MainnetFullProvider, MainnetProvider, MemoryCache, MemoryCacheOptions, MulticallCall, MulticallError, MulticallParams, MulticallResult, MulticallResults, NetVersionError, NonceError, NonceManagerService, NonceManagerShape, NoopCache, NoopCcip, NoopKzg, NoopRateLimiter, OptimismFormatter, OptimismProvider, PolygonProvider, ProofType, Provider, ProviderConfirmationsPendingError, ProviderError, ProviderNotFoundError, ProviderReceiptPendingError, ProviderResponseError, ProviderStreamError, ProviderTimeoutError, ProviderValidationError, RateLimitBehavior, RateLimitError, RateLimitedTransport, RateLimiterConfig, RateLimiterService, RateLimiterShape, RawProviderService, RawProviderShape, RawProviderTransport, RawRequestArguments, ReadContractError, ReadContractParams, ReceiptType, RpcBatch, RpcBatchService, RpcBatchShape, RpcRequest, RpcTransactionRequest, RpcUrlsConfig, SendRawTransactionError, SendTransactionError, SepoliaProvider, SerializeError, SignError, SignTransactionError, Signer, SignerError, SignerService, SignerShape, SimulateCallsError, SimulateCallsParams, SimulateContractError, SimulateContractParams, SimulateContractResult, SimulateV1BlockCall, SimulateV1BlockResult, SimulateV1CallResult, SimulateV1Error, SimulateV1Payload, SimulateV1Result, SimulateV2Error, SimulateV2Payload, SimulateV2Result, SimulationResult, StateOverride, StorageProofType, SubmitHashrateError, SubmitWorkError, SubscribeError, SyncingStatus, TestProvider, TestTransport, TransactionIndexInput, TransactionRequest, TransactionSerializerService, TransactionStream, TransactionStreamError, TransactionStreamService, TransactionStreamShape, TransactionType, TransportShape, UncleBlockType, UninstallFilterError, UnsignedTransaction, UnsubscribeError, WaitForTransactionReceiptArgs, WaitForTransactionReceiptError, WaitForTransactionReceiptOptions, WatchBlocksError, WebSocketProvider, WebSocketProviderConfig, WebSocketProviderGlobal, WebSocketTransport, WithdrawalType, ZkSyncFormatter, aggregate3, arbitrum, arbitrumBlockExplorers, arbitrumConfig, arbitrumContracts, backfillBlocks, base, baseBlockExplorers, baseConfig, baseContracts, bytesToHex, cacheEnabledRef, call, createAccessList, createBlockFilter, createEventFilter, createPendingTransactionFilter, createProvider, estimateGas, formatAccessList, formatCallRequest, formatLogFilterParams, formatTransactionRequest, getAccounts, getBalance, getBlobBaseFee, getBlock, getBlockNumber, getBlockReceipts, getBlockTransactionCount, getChainId, getCode, getCoinbase, getEnsAddress, getEnsAvatar, getEnsName, getEnsResolver, getEnsText, getFeeHistory, getFilterChanges, getFilterLogs, getGasPrice, getHashrate, getLogs, getMaxPriorityFeePerGas, getMining, getProof, getProtocolVersion, getStorageAt, getSyncing, getTransaction, getTransactionByBlockHashAndIndex, getTransactionByBlockNumberAndIndex, getTransactionConfirmations, getTransactionCount, getTransactionReceipt, getUncle, getUncleCount, mainnet, mainnetBlockExplorers, mainnetConfig, mainnetContracts, makeBlockStream, makeContractRegistry, makeFeeEstimator, makeIdGenerator, makeRateLimiter, makeRpcResolver, makeTransactionStream, multicall, netVersion, nextId, optimism, optimismBlockExplorers, optimismConfig, optimismContracts, parseHexToBigInt, polygon, polygonBlockExplorers, polygonConfig, polygonContracts, readContract, retryScheduleRef, rpcUrlsByChainId, sendRawTransaction, sendTransaction, sepolia, sepoliaBlockExplorers, sepoliaConfig, sepoliaContracts, sign, signTransaction, simulateCalls, simulateContract, simulateV1, simulateV2, subscribe, timeoutRef, toAddressHex, toHashHex, tracingRef, uninstallFilter, unsubscribe, waitForTransactionReceipt, watchBlocks, withRetrySchedule, withTimeout, withTracing, withoutCache } from './services/index.js';
23
+ export { AbiDecodeError, AbiEncodeError, AbiEncoderService, AbiEncoderShape, AccessListInput, AccessListType, AccountError, AccountService, AccountShape, AccountStateOverride, AddressInput, ArbitrumFormatter, ArbitrumProvider, AssetChange, BackfillBlocksError, BalanceResolver, BaseProvider, BlockExplorerConfig, BlockExplorerService, BlockOverrides, BlockStream, BlockStreamError, BlockStreamService, BlockStreamShape, BlockTag, BlockType, BlockchainError, BlockchainHexInput, BlockchainService, BlockchainShape, BrowserProvider, BrowserTransport, CacheService, CacheShape, CallError, CallRequest, CcipError, CcipRequest, CcipService, CcipShape, ChainConfig, ChainContract, ChainService, ComposedServices, Contract, ContractAbi, ContractAbiItem, ContractBlockTag, ContractCall, ContractCallError, ContractDef, ContractError, ContractEventError, ContractFactory, ContractInstance, ContractRegistryBase, ContractRegistryConfig, ContractRegistryService, ContractRegistryShape, ContractWriteError, ContractsConfig, ContractsService, CreateAccessListError, CreateAccessListResult, CreateBlockFilterError, CreateEventFilterError, CreatePendingTransactionFilterError, CustomTransport, CustomTransportConfig, CustomTransportFromFn, Debug, DebugService, DebugShape, DebugTraceConfig, DecodedEvent, DefaultAbiEncoder, DefaultCcip, DefaultEns, DefaultFeeEstimator, DefaultFormatter, DefaultKzg, DefaultNonceManager, DefaultRateLimiter, DefaultTransactionSerializer, DeserializeError, EIP1193Provider, ENS_REGISTRY_ADDRESS, ENS_UNIVERSAL_RESOLVER_ADDRESS, EngineApi, EngineApiService, EngineApiShape, EnsError, EnsService, EnsShape, EstimateGasError, EthBlockNumber, EthCall, EthChainId, EthEstimateGas, EthGasPrice, EthGetBalance, EthGetBlockByHash, EthGetBlockByNumber, EthGetCode, EthGetLogs, EthGetStorageAt, EthGetTransactionByHash, EthGetTransactionCount, EthGetTransactionReceipt, EventFilter, FeeEstimationError, FeeEstimatorService, FeeEstimatorShape, FeeHistoryType, FeeValues, FeeValuesEIP1559, FeeValuesLegacy, FilterChanges, ForkBlockchain, ForkBlockchainOptions, FormatError, FormatterService, FormatterShape, GenericRpcRequest, GetAccountsError, GetBalance, GetBalanceError, GetBlobBaseFeeError, GetBlockArgs, GetBlockError, GetBlockNumberError, GetBlockReceiptsArgs, GetBlockReceiptsError, GetBlockTransactionCountArgs, GetBlockTransactionCountError, GetChainIdError, GetCodeError, GetCoinbaseError, GetEnsAddressParams, GetEnsAvatarParams, GetEnsNameParams, GetEnsResolverParams, GetEnsTextParams, GetFeeHistoryError, GetFilterChangesError, GetFilterLogsError, GetGasPriceError, GetHashrateError, GetLogsError, GetMaxPriorityFeePerGasError, GetMiningError, GetProofError, GetProtocolVersionError, GetStorageAtError, GetSyncingError, GetTransactionByBlockHashAndIndexError, GetTransactionByBlockNumberAndIndexError, GetTransactionConfirmationsError, GetTransactionCountError, GetTransactionError, GetTransactionReceiptError, GetUncleArgs, GetUncleCountArgs, GetUncleCountError, GetUncleError, GetWorkError, HashInput, HttpProvider, HttpProviderFetch, HttpTransport, IdGenerator, IdGeneratorLive, IdGeneratorShape, InMemoryBlockchain, InferContractRegistry, IpcProvider, JsonRpcAccount, KzgError, KzgService, KzgShape, LocalAccount, LogType, MULTICALL3_ADDRESS, MainnetFullProvider, MainnetProvider, MemoryCache, MemoryCacheOptions, MulticallCall, MulticallError, MulticallParams, MulticallResult, MulticallResults, NetVersionError, NonceError, NonceManagerService, NonceManagerShape, NoopCache, NoopCcip, NoopKzg, NoopRateLimiter, OptimismFormatter, OptimismProvider, PolygonProvider, ProofType, Provider, ProviderConfirmationsPendingError, ProviderError, ProviderNotFoundError, ProviderReceiptPendingError, ProviderResponseError, ProviderStepConfig, ProviderStreamError, ProviderTimeoutError, ProviderValidationError, RateLimitBehavior, RateLimitError, RateLimitedTransport, RateLimiterConfig, RateLimiterService, RateLimiterShape, RawProviderService, RawProviderShape, RawProviderTransport, RawRequestArguments, ReadContractError, ReadContractParams, ReceiptType, RpcBatch, RpcBatchService, RpcBatchShape, RpcRequest, RpcTransactionRequest, RpcUrlsConfig, SendRawTransactionError, SendTransactionError, SepoliaProvider, SerializeError, SignError, SignTransactionError, Signer, SignerError, SignerService, SignerShape, SimulateCallsError, SimulateCallsParams, SimulateContractError, SimulateContractParams, SimulateContractResult, SimulateV1BlockCall, SimulateV1BlockResult, SimulateV1CallResult, SimulateV1Error, SimulateV1Payload, SimulateV1Result, SimulateV2Error, SimulateV2Payload, SimulateV2Result, SimulationResult, StateOverride, StorageProofType, SubmitHashrateError, SubmitWorkError, SubscribeError, SyncingStatus, TestProvider, TestTransport, TransactionIndexInput, TransactionRequest, TransactionSerializerService, TransactionStream, TransactionStreamError, TransactionStreamService, TransactionStreamShape, TransactionType, TransportShape, UncleBlockType, UninstallFilterError, UnsignedTransaction, UnsubscribeError, WaitForTransactionReceiptArgs, WaitForTransactionReceiptError, WaitForTransactionReceiptOptions, WatchBlocksError, WebSocketProvider, WebSocketProviderConfig, WebSocketProviderGlobal, WebSocketTransport, WithdrawalType, ZkSyncFormatter, aggregate3, arbitrum, arbitrumBlockExplorers, arbitrumConfig, arbitrumContracts, backfillBlocks, base, baseBlockExplorers, baseConfig, baseContracts, bytesToHex, cacheEnabledRef, call, createAccessList, createBlockFilter, createEventFilter, createPendingTransactionFilter, createProvider, estimateGas, formatAccessList, formatCallRequest, formatLogFilterParams, formatTransactionRequest, getAccounts, getBalance, getBlobBaseFee, getBlock, getBlockNumber, getBlockReceipts, getBlockTransactionCount, getChainId, getCode, getCoinbase, getEnsAddress, getEnsAvatar, getEnsName, getEnsResolver, getEnsText, getFeeHistory, getFilterChanges, getFilterLogs, getGasPrice, getHashrate, getLogs, getMaxPriorityFeePerGas, getMining, getProof, getProtocolVersion, getStorageAt, getSyncing, getTransaction, getTransactionByBlockHashAndIndex, getTransactionByBlockNumberAndIndex, getTransactionConfirmations, getTransactionCount, getTransactionReceipt, getUncle, getUncleCount, mainnet, mainnetBlockExplorers, mainnetConfig, mainnetContracts, makeBlockStream, makeContractRegistry, makeFeeEstimator, makeIdGenerator, makeProviderPlan, makeRateLimiter, makeResilientProviderPlan, makeRpcResolver, makeTransactionStream, multicall, netVersion, nextId, optimism, optimismBlockExplorers, optimismConfig, optimismContracts, parseHexToBigInt, polygon, polygonBlockExplorers, polygonConfig, polygonContracts, readContract, retryScheduleRef, rpcUrlsByChainId, sendRawTransaction, sendTransaction, sepolia, sepoliaBlockExplorers, sepoliaConfig, sepoliaContracts, sign, signTransaction, simulateCalls, simulateContract, simulateV1, simulateV2, subscribe, timeoutRef, toAddressHex, toHashHex, tracingRef, uninstallFilter, unsubscribe, waitForTransactionReceipt, watchBlocks, withRetrySchedule, withTimeout, withTracing, withoutCache } from './services/index.js';
24
24
  import * as Layer from 'effect/Layer';
25
25
  import { Keccak256Hash, BrandedAbi, BrandedAddress } from '@tevm/voltaire';
26
26
  import { EventStreamConstructorOptions, BackfillOptions as BackfillOptions$1, EventStreamResult, WatchOptions as WatchOptions$1 } from '@tevm/voltaire/contract';