Repository navigation
Releases
ox@0.14.67
ox@1.8.16
Patch Changes
-
#611
27bac43Thanks @jxom! - FixedAbiParameters.decodeto limit the total number of bytes read to 32 times the size of the data plus the repeated-read allowance, and to throw when dynamic values with overlapping data exceed it. -
#613
af4199bThanks @jxom! - FixedAbiFunction.decodeDataandAbiError.decodeto throwSelectorMismatchErrorwhen the selector indatadoes not match the item or one of its overloads. -
#615
a45444aThanks @jxom! - FixedAbiParameters.decodeto throw when the 32-byte slot of a fixed-sizebytesNvalue is cut short, as it does for other static types. -
#617
8f4da51Thanks @jxom! - FixedAbiParameters.encodeto rejectbytesandbytesNvalues with an odd number of hex digits, andTypedData.assertto reject suchbytesNvalues, instead of encoding them with a trailing zero nibble. -
#619
2f8ee9cThanks @jxom! - FixedAbiEvent.decodeto resolve overloaded events by the selector intopics[0]instead of always decoding with the overload picked by name. -
#621
32f10f7Thanks @jxom! - FixedAbiEvent.extractLogsto return keyedargsfor events with both named and unnamed inputs, matchingAbiEvent.decode, and fixedAbiEvent.assertArgsand theargsfilter to reject positional arguments compared against keyed arguments. -
#623
9b5aefeThanks @jxom! - FixedAbiEvent.decode,AbiEvent.decodeLogandAbiEvent.extractLogsto reject indexedaddress,bool,intNanduintNtopics that are not canonical 32-byte ABI words, asAbiParameters.decodedoes. -
#624
9e7197bThanks @jxom! - FixedAddress.fromPublicKeyto throwPublicKey.InvalidErrorfor a compressed public key instead of deriving an address from thexcoordinate alone. -
#626
8fd15edThanks @jxom! - FixedAuthorization.fromTupleandAuthorization.fromRpcto throwHex.IntegerOutOfRangeErrorfor a chain ID that is not a safe integer instead of returning a rounded orNaNchain ID. -
#628
ac62b90Thanks @jxom! - FixedAuthorization.fromTupleto throwAuthorization.InvalidErrorunless the tuple has three or six elements, andTxEnvelopeEip7702.deserializeto require six-element authorization tuples. -
#630
d472e23Thanks @jxom! - FixedUserOperation.hashfor EntryPoint 0.7 inox/erc4337to hash the sameinitCodeasUserOperation.toPacked, so afactorywithoutfactoryDatais included in the hash. -
#632
3627f73Thanks @jxom! - FixedExecute.decodeDataandExecute.decodeBatchOfBatchesDatainox/erc7821to decode only calldata in their own execution modes and throwExecute.UnsupportedModeErrorfor any other mode. -
#634
24fb8d1Thanks @jxom! - FixedKeystore.encryptandKeystore.decryptto throwKeystore.InvalidKeySizeErrorwhen the key is shorter than 32 bytes. -
#636
89c70dfThanks @jxom! - FixedSecp256k1.verifyto hash the payload with sha256 whenhash: trueis used withaddress, matching thepublicKeyform. -
#638
19c3335Thanks @jxom! - FixedSignature.assertto reject ayParitythat is not exactly0or1, andSignature.toTupleto throw on an invalid or missingyParityinstead of encoding it by truthiness. -
#640
7a1a915Thanks @jxom! - FixedSiwe.parseMessageto return an empty object when a message has text that is not part of the EIP-4361 prefix or suffix, such asExpiration TimeandNot Beforelines that are out of order, and to parse in linear time. -
#642
f620088Thanks @jxom! - FixedSiwe.createMessageto throwInvalidMessageFieldErrorwhenrequestIdcontains a line feed or carriage return. -
#644
f3a6299Thanks @jxom! - FixedTxEnvelopeTempo.assert,TxEnvelopeTempo.serialize, and TempoTransactionRequest.fromRpcto throw for a fee payer signature whoseyParityis not0or1, instead of encoding it as1. -
#646
1081276Thanks @jxom! - FixedKeyAuthorization.from,toTuple, andtoRpc(and theox/zod/tempoScopeschema) to reject a scope withrecipientsand noselector. -
#648
3417895Thanks @jxom! - FixedSignatureEnvelope.assert,deserialize,fromRpc, andtoRpcto reject a keychain signature whose inner signature is itself a keychain signature. -
#650
2b48062Thanks @jxom! - FixedSignatureEnvelope.assertandSignatureEnvelope.validateto reject an envelope with an unsupportedtype. -
#652
a15cab8Thanks @jxom! - FixedTxEnvelopeTempo.assertto throwInvalidValidityBoundErrorwhenvalidBeforeorvalidAfteris not a non-negative safe integer number, instead of serializing a bigint or hex bound as unset. -
#654
40f9facThanks @jxom! - FixedSignatureEnvelope.deserializeandSignatureEnvelope.fromRpcto reject WebAuthn signatures larger than the 2048-byte protocol maximum. -
#656
f14c9beThanks @jxom! - FixedTxEnvelopeLegacy.assert,TxEnvelopeEip2930.assert,TxEnvelopeEip1559.assertandTxEnvelopeTempo.assertto throwInvalidChainIdErrorfor achainIdthat is not a positive safe integer. -
#658
b06a125Thanks @jxom! - FixedTxEnvelopeLegacy.deserializeto validate unsigned transactions and to reject nested lists, avabove the safe integer range, andgasPrice,rorsvalues longer than 32 bytes. -
#660
f6d2f2bThanks @jxom! - FixedTxEnvelopeLegacy.hash(withpresign) andTxEnvelopeLegacy.getSignPayloadto derive the chain ID from an EIP-155vwhen the envelope has nochainId. -
#662
bf4a8daThanks @jxom! - FixedTxEnvelopeLegacy.serializeto throw when an envelope'svdoes not match itschainId, and to throwSignature.InvalidVErrorwhenvis not a valid parity for the givenchainId. -
#664
b1cb7baThanks @jxom! - FixedTypedData.extractEip712DomainTypesto include every domain field that is present, so a stringchainIdis hashed instead of left out of the derived domain. -
#666 [
07e1148](https://github.com/wevm/ox/commi...
ox@1.8.15
ox@0.14.66
Patch Changes
-
#612
8c8177bThanks @jxom! - FixedAbiParameters.decodeto limit the total number of bytes read to 32 times the size of the data plus the repeated-read allowance, and to throw when dynamic values with overlapping data exceed it. -
#614
c585a11Thanks @jxom! - FixedAbiFunction.decodeDataandAbiError.decodeto throwSelectorMismatchErrorwhen the selector indatadoes not match the item or one of its overloads. -
#616
3f948a4Thanks @jxom! - FixedAbiParameters.decodeto throw when the 32-byte slot of a fixed-sizebytesNvalue is cut short, as it does for other static types. -
#618
431e963Thanks @jxom! - FixedAbiParameters.encodeto rejectbytesandbytesNvalues with an odd number of hex digits, andTypedData.assertto reject suchbytesNvalues, instead of encoding them with a trailing zero nibble. -
#620
aac6419Thanks @jxom! - FixedAbiEvent.decodeto resolve overloaded events by the selector intopics[0]instead of always decoding with the overload picked by name. -
#622
9876205Thanks @jxom! - FixedAbiEvent.assertArgsto reject positional arguments compared against keyed arguments, and to match an unnamed input of a partly named event by its index. -
#625
774e807Thanks @jxom! - FixedAddress.fromPublicKeyto throwPublicKey.InvalidPrefixErrorfor a compressed public key instead of deriving an address from thexcoordinate alone. -
#627
73f4ae2Thanks @jxom! - FixedAuthorization.fromTupleandAuthorization.fromRpcto throwHex.IntegerOutOfRangeErrorfor a chain ID that is not a safe integer instead of returning a rounded orNaNchain ID. -
#629
64fb6d8Thanks @jxom! - FixedAuthorization.fromTupleto throwAuthorization.InvalidErrorunless the tuple has three or six elements, andTxEnvelopeEip7702.deserializeto require six-element authorization tuples. -
#631
9fd338cThanks @jxom! - FixedUserOperation.hashfor EntryPoint 0.7 inox/erc4337to hash the sameinitCodeasUserOperation.toPacked, so afactorywithoutfactoryDatais included in the hash. -
#633
be32b5bThanks @jxom! - FixedExecute.decodeDataandExecute.decodeBatchOfBatchesDatainox/erc7821to decode only calldata in their own execution modes and throwExecute.UnsupportedModeErrorfor any other mode. -
#635
c113aa5Thanks @jxom! - FixedKeystore.encryptandKeystore.decryptto throwKeystore.InvalidKeySizeErrorwhen the key is shorter than 32 bytes. -
#637
06d1715Thanks @jxom! - FixedSecp256k1.verifyto hash the payload with sha256 whenhash: trueis used withaddress, matching thepublicKeyform. -
#639
9814924Thanks @jxom! - FixedSignature.assertto reject ayParitythat is not exactly0or1, andSignature.toTupleto throw on an invalid or missingyParityinstead of encoding it by truthiness. -
#641
69a1206Thanks @jxom! - FixedSiwe.parseMessageto return an empty object when a message has text that is not part of the EIP-4361 prefix or suffix, such asExpiration TimeandNot Beforelines that are out of order, and to parse in linear time. -
#643
f32eabeThanks @jxom! - FixedSiwe.createMessageto throwInvalidMessageFieldErrorwhenrequestIdcontains a line feed or carriage return. -
#645
a4b1476Thanks @jxom! - FixedTxEnvelopeTempo.assertandTxEnvelopeTempo.serializeto throw for a fee payer signature whoseyParityis not0or1, instead of encoding it as1. -
#647
c574477Thanks @jxom! - FixedKeyAuthorization.from,toTuple, andtoRpcto reject a scope withrecipientsand noselector. -
#649
66db000Thanks @jxom! - FixedSignatureEnvelope.assert,deserialize,fromRpc, andtoRpcto reject a keychain signature whose inner signature is itself a keychain signature. -
#651
bc730adThanks @jxom! - FixedSignatureEnvelope.assertandSignatureEnvelope.validateto reject an envelope with an unsupportedtype. -
#653
73e68f6Thanks @jxom! - FixedTxEnvelopeTempo.assertto throwInvalidValidityBoundErrorwhenvalidBeforeorvalidAfteris not a non-negative safe integer number, instead of serializing a bigint or hex bound as unset. -
#655
b6195cbThanks @jxom! - FixedSignatureEnvelope.deserializeandSignatureEnvelope.fromRpcto reject WebAuthn signatures larger than the 2048-byte protocol maximum. -
#657
506d628Thanks @jxom! - FixedTxEnvelopeLegacy.assert,TxEnvelopeEip2930.assert,TxEnvelopeEip1559.assertandTxEnvelopeTempo.assertto throwInvalidChainIdErrorfor achainIdthat is not a positive safe integer. -
#659
7377c88Thanks @jxom! - FixedTxEnvelopeLegacy.deserializeto validate unsigned transactions and to reject nested lists, avabove the safe integer range, andgasPrice,rorsvalues longer than 32 bytes. -
#661
1f55fd7Thanks @jxom! - FixedTxEnvelopeLegacy.hash(withpresign) andTxEnvelopeLegacy.getSignPayloadto derive the chain ID from an EIP-155vwhen the envelope has nochainId. -
#663
61e3329Thanks @jxom! - FixedTxEnvelopeLegacy.serializeto throw when an envelope'svdoes not match itschainId, and to throwSignature.InvalidVErrorwhenvis not a valid parity for the givenchainId. -
#665
606e2aaThanks @jxom! - FixedTypedData.extractEip712DomainTypesto include every domain field that is present, so a stringchainIdis hashed instead of left out of the derived domain. -
#667
fa83e7aThanks @jxom! - FixedValue.fromandValue.formatto trim trailing zeros in time linear in the length of the fraction. -
#669
050b220Thanks @jxom! - FixedRegistration.verifyinox/webauthnto derivedeviceTypefrom the backup eligibility (BE) flag and to a...
ox@0.14.65
ox@1.8.14
Patch Changes
-
#602
15ef7a4Thanks @jxom! - FixedAbiError.decodeto resolve overloaded errors by the selector indatainstead of always decoding with the first matching overload. -
#600
8228e04Thanks @jxom! - FixedAbiEvent.assertArgsandAbiEvent.extractLogsnot matching integer arguments given as anumberagainst values decoded asbigint, or as abigintagainst small integers decoded asnumber. -
#588
816729dThanks @jxom! - FixedAbiEvent.encodeaccepting out-of-range values for indexedintN/uintN(N < 256) and wrong-sizedbytesN(N < 32) arguments instead of throwing. -
#576
a6af44fThanks @jxom! - AddeduserAddresstoAccountOperationtransaction operations, so a configurable account acting as an access key (TIP-1111) can collect owner approvals and serialize a keychain V2 envelope for its parent. -
#564
b03705aThanks @jxom! - FixedAbiEvent.decodeLogandAbiEvent.extractLogsto decode anonymous event logs when every event in the ABI is anonymous or, forextractLogs, wheneventNamenames the event, throwingAbiEvent.AnonymousEventAmbiguityErrorfromdecodeLogwhen several anonymous events fit. -
#580
b0994e1Thanks @jxom! - FixedBase32.toBytesandBase32.toHexaccepting non-canonical input (non-zero trailing bits or an impossible length) by throwingBase32.InvalidPaddingError. -
#573
5ba70c0Thanks @RaphaelFakhri! - FixedCbor.decodeto decode a__proto__map key as an own property instead of replacing the prototype of the decoded object. -
#503
97a4cceThanks @ara-stock! - FixedCompactSize.toBytesandCompactSize.toHexsilently truncating values larger than2^64 - 1instead of throwing. -
#591
401173cThanks @jxom! - FixedAttribution.fromDatato returnundefinedwhen a codes or CBOR length field claims more bytes than precede it. -
#584
7f37495Thanks @jxom! - FixedHex.toBigIntandHex.toNumberthrowing on odd-length hex withsigned: true, andHex.fromNumberreturning0x0for a negative number withsigned: trueand nosize. -
#596
80d74c1Thanks @jxom! - FixedRlp.toBytesandRlp.toHexto reject non-canonical encodings (a single byte below0x80with a length prefix, or a long-form or zero-padded length) withRlp.NonCanonicalError. -
#569
7a564afThanks @gakonst! - Improved validation performance inHex.assert,Value,TypedData,Siwe.isUri, ABI overload resolution, and theox/zodhex, address, quantity, and Solidity type schemas by reusing module-level regular expressions instead of recreating them on every call. -
#600
8228e04Thanks @jxom! - FixedBytes.fromHexandHex.toBytesshifting the bytes of odd-length hex values whensizewas specified. -
#600
8228e04Thanks @jxom! - FixedRpcTransport.fromHttpsending both the default and the caller'sContent-TypewhenfetchOptions.headersset it, instead of the caller's value alone. -
#570
8a9f850Thanks @gakonst! - ImprovedAbiItem.getSignatureHashandAbiItem.getSelectorperformance, along with the selector lookups inAbiItem.fromAbi,AbiFunction.decodeData,AbiEvent.decodeLogandAbiEvent.extractLogs, by caching signature hashes by normalized signature in a bounded cache thatCaches.clearand engine changes reset. -
#600
8228e04Thanks @jxom! - FixedSiwe.validateMessageaccepting a message with a nonce shorter than 8 alphanumeric characters or a version other than1, which EIP-4361 does not allow. -
#600
8228e04Thanks @jxom! - FixedAbiItem.fromAbithrowingAbiItem.AmbiguityErrorforstringandbytesoverloads when the argument is a plain string; only hex strings andUint8Arrayvalues now matchbytes. -
#582
8d042deThanks @jxom! - FixedTick.fromPriceaccepting negative prices between -1 and 0 as their positive counterparts instead of throwingTick.PriceOutOfBoundsError. -
#600
8228e04Thanks @jxom! - FixedTypedData.assertandTypedData.validate(and soTypedData.getSignPayloadandTypedData.serialize) rejecting struct names that contain:, such asHyperliquidTransaction:SendAsset. -
#593
c370946Thanks @jxom! - FixedUserOperation.toPackedandUserOperation.toInitCodeto keep the padded EIP-77020x7702initCode marker expected by EntryPoint 0.8 and 0.9, using the delegate address only with the newforHashoption. -
#598
b2771c8Thanks @jxom! - FixedAbiFunction.decodeDatareturningundefinedwhen a function name has a zero-input overload and the calldata targets another overload, by keeping the other overloads on itemsfromAbiresolves withoutargs.
ox@0.14.64
Patch Changes
-
#603
0f76422Thanks @jxom! - FixedAbiError.decodeto resolve overloaded errors by the selector indatainstead of always decoding with the first matching overload. -
#601
354db45Thanks @jxom! - FixedAbiEvent.assertArgsnot matching integer arguments given as anumberagainst values decoded asbigint, or as abigintagainst small integers decoded asnumber. -
#590
ed0af24Thanks @jxom! - FixedBase32.toBytesandBase32.toHexaccepting non-canonical input (non-zero trailing bits or an impossible length) by throwingBase32.InvalidPaddingError. -
#581
0dcd096Thanks @jxom! - FixedCbor.decodeto decode a__proto__map key as an own property instead of replacing the prototype of the decoded object. -
#592
867e641Thanks @jxom! - FixedAttribution.fromDatato returnundefinedwhen a codes or CBOR length field claims more bytes than precede it. -
#585
9bc4970Thanks @jxom! - FixedHex.toBigIntandHex.toNumberthrowing on odd-length hex withsigned: true, andHex.fromNumberreturning0x0for a negative number withsigned: trueand nosize. -
#597
0253792Thanks @jxom! - FixedRlp.toBytesandRlp.toHexto reject non-canonical encodings (a single byte below0x80with a length prefix, or a long-form or zero-padded length) withRlp.NonCanonicalError. -
#601
354db45Thanks @jxom! - FixedBytes.fromHexandHex.toBytesshifting the bytes of odd-length hex values whensizewas specified. -
#601
354db45Thanks @jxom! - FixedRpcTransport.fromHttpdroppingfetchOptions.headerssupplied as aHeadersinstance or tuple array, and sending both the default and the caller'sContent-Typewhen only their casing differed. -
#601
354db45Thanks @jxom! - FixedSiwe.validateMessageaccepting a message with a nonce shorter than 8 alphanumeric characters or a version other than1, which EIP-4361 does not allow. -
#601
354db45Thanks @jxom! - FixedAbiItem.fromAbithrowingAbiItem.AmbiguityErrorforstringandbytesoverloads when the argument is a plain string; only hex strings andUint8Arrayvalues now matchbytes. -
#583
e415932Thanks @jxom! - FixedTick.fromPriceaccepting negative prices between -1 and 0 as their positive counterparts instead of throwingTick.PriceOutOfBoundsError. -
#601
354db45Thanks @jxom! - FixedTypedData.assertandTypedData.validate(and soTypedData.getSignPayloadandTypedData.serialize) rejecting struct names that contain:, such asHyperliquidTransaction:SendAsset. -
#579
90b00c7Thanks @jxom! - Added a{"type":"module"}marker to_types/so declaration files resolve as ESM under TypeScriptnode16(andnodenextbefore TypeScript 5.8); CommonJS consumers onnode16should switch tonodenextorbundlerresolution. -
#594
4208467Thanks @jxom! - FixedUserOperation.toPackedandUserOperation.toInitCodeto keep the padded EIP-77020x7702initCode marker expected by EntryPoint 0.8, using the delegate address only with the newforHashoption. -
#599
942c3a3Thanks @jxom! - FixedAbiFunction.decodeDatareturningundefinedwhen a function name has a zero-input overload and the calldata targets another overload, by keeping the other overloads on itemsfromAbiresolves withoutargs.
ox@0.14.63
ox@0.14.62
Patch Changes
-
#565
20457a6Thanks @jxom! - FixedAbiEvent.decodeandAbiEvent.encodefor anonymous events:decodeno longer expects a selector topic and reads every topic as an indexed input, andencodeno longer prepends the selector. -
#571
4a029cfThanks @gakonst! - Improved validation performance inHex.assert,Value,TypedData,Siwe.isUri, and ABI overload resolution by reusing module-level regular expressions instead of recreating them on every call. -
#571
4a029cfThanks @gakonst! - ImprovedAbiItem.getSignatureHashandAbiItem.getSelectorperformance, along with the selector lookups inAbiItem.fromAbi,AbiFunction.decodeData,AbiEvent.decodeLogandAbiEvent.extractLogs, by caching signature hashes by normalized signature in a bounded cache thatCaches.clearresets.
ox@0.14.61
Patch Changes
-
#561
f9e8a6eThanks @jxom! - FixedAbiItem.fromAbiresolving indistinguishable overloads, such asbytes32andbytes,uint256andint256, oruint256[]anduint256[2], to the last match. It now throwsAbiItem.AmbiguityError, and a selector selects the overload. An overload matches only an integer in its range or fixed bytes of its size. -
#559
4f5a87aThanks @jxom! - FixedAbiParameters.decodeacceptingintN/uintNwords outside the declared type's range andaddresswords with non-zero padding; it now throwsHex.IntegerOutOfRangeErrororAddress.InvalidAddressError, matching Solidity'sabi.decode. -
#555
c18169bThanks @jxom! - DeprecatedKeyAuthorizationisAdminand updatedaccountdocs for TIP-1137, which removes admin access keys at T14 while keeping their wire encoding decodable. -
#561
f9e8a6eThanks @jxom! - FixedTxEnvelopeEip1559.assert,TxEnvelopeEip4844.assert,TxEnvelopeEip7702.assert, andTxEnvelopeTempo.assertaccepting amaxPriorityFeePerGasabove a zeromaxFeePerGas. Theirdeserializefunctions now read an emptymaxFeePerGasas zero when a tip is set, so such a transaction throwsTransactionEnvelope.TipAboveFeeCapError. Zero fees now show in the error messages. -
#561
f9e8a6eThanks @jxom! - FixedTypedData.assertandTypedData.validateaccepting invalid struct names, such asuint7,bytes32orFoo.Bar, and invalid field types, such asuint,uint7,bytes0or an undefined struct, including in structs referenced only as array elements. They now throwTypedData.InvalidStructTypeErrorand the newTypedData.InvalidTypeError.TypedData.encodeTypenow includes struct names that contain `# ox.