Skip to content

Releases

ox@0.14.67

Choose a tag to compare

@github-actions github-actions released this 12 Nov 05:27
b4107be

Patch Changes

  • #677 6f3ff8c Thanks @jxom! - Fixed SignatureEnvelope.deserialize and SignatureEnvelope.fromRpc in ox/tempo to split WebAuthn data into authenticatorData and clientDataJSON in time linear in its size instead of quadratic.

ox@1.8.16

Choose a tag to compare

@github-actions github-actions released this 11 Nov 05:57
21cf618

Patch Changes

  • #611 27bac43 Thanks @jxom! - Fixed AbiParameters.decode to 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 af4199b Thanks @jxom! - Fixed AbiFunction.decodeData and AbiError.decode to throw SelectorMismatchError when the selector in data does not match the item or one of its overloads.

  • #615 a45444a Thanks @jxom! - Fixed AbiParameters.decode to throw when the 32-byte slot of a fixed-size bytesN value is cut short, as it does for other static types.

  • #617 8f4da51 Thanks @jxom! - Fixed AbiParameters.encode to reject bytes and bytesN values with an odd number of hex digits, and TypedData.assert to reject such bytesN values, instead of encoding them with a trailing zero nibble.

  • #619 2f8ee9c Thanks @jxom! - Fixed AbiEvent.decode to resolve overloaded events by the selector in topics[0] instead of always decoding with the overload picked by name.

  • #621 32f10f7 Thanks @jxom! - Fixed AbiEvent.extractLogs to return keyed args for events with both named and unnamed inputs, matching AbiEvent.decode, and fixed AbiEvent.assertArgs and the args filter to reject positional arguments compared against keyed arguments.

  • #623 9b5aefe Thanks @jxom! - Fixed AbiEvent.decode, AbiEvent.decodeLog and AbiEvent.extractLogs to reject indexed address, bool, intN and uintN topics that are not canonical 32-byte ABI words, as AbiParameters.decode does.

  • #624 9e7197b Thanks @jxom! - Fixed Address.fromPublicKey to throw PublicKey.InvalidError for a compressed public key instead of deriving an address from the x coordinate alone.

  • #626 8fd15ed Thanks @jxom! - Fixed Authorization.fromTuple and Authorization.fromRpc to throw Hex.IntegerOutOfRangeError for a chain ID that is not a safe integer instead of returning a rounded or NaN chain ID.

  • #628 ac62b90 Thanks @jxom! - Fixed Authorization.fromTuple to throw Authorization.InvalidError unless the tuple has three or six elements, and TxEnvelopeEip7702.deserialize to require six-element authorization tuples.

  • #630 d472e23 Thanks @jxom! - Fixed UserOperation.hash for EntryPoint 0.7 in ox/erc4337 to hash the same initCode as UserOperation.toPacked, so a factory without factoryData is included in the hash.

  • #632 3627f73 Thanks @jxom! - Fixed Execute.decodeData and Execute.decodeBatchOfBatchesData in ox/erc7821 to decode only calldata in their own execution modes and throw Execute.UnsupportedModeError for any other mode.

  • #634 24fb8d1 Thanks @jxom! - Fixed Keystore.encrypt and Keystore.decrypt to throw Keystore.InvalidKeySizeError when the key is shorter than 32 bytes.

  • #636 89c70df Thanks @jxom! - Fixed Secp256k1.verify to hash the payload with sha256 when hash: true is used with address, matching the publicKey form.

  • #638 19c3335 Thanks @jxom! - Fixed Signature.assert to reject a yParity that is not exactly 0 or 1, and Signature.toTuple to throw on an invalid or missing yParity instead of encoding it by truthiness.

  • #640 7a1a915 Thanks @jxom! - Fixed Siwe.parseMessage to return an empty object when a message has text that is not part of the EIP-4361 prefix or suffix, such as Expiration Time and Not Before lines that are out of order, and to parse in linear time.

  • #642 f620088 Thanks @jxom! - Fixed Siwe.createMessage to throw InvalidMessageFieldError when requestId contains a line feed or carriage return.

  • #644 f3a6299 Thanks @jxom! - Fixed TxEnvelopeTempo.assert, TxEnvelopeTempo.serialize, and Tempo TransactionRequest.fromRpc to throw for a fee payer signature whose yParity is not 0 or 1, instead of encoding it as 1.

  • #646 1081276 Thanks @jxom! - Fixed KeyAuthorization.from, toTuple, and toRpc (and the ox/zod/tempo Scope schema) to reject a scope with recipients and no selector.

  • #648 3417895 Thanks @jxom! - Fixed SignatureEnvelope.assert, deserialize, fromRpc, and toRpc to reject a keychain signature whose inner signature is itself a keychain signature.

  • #650 2b48062 Thanks @jxom! - Fixed SignatureEnvelope.assert and SignatureEnvelope.validate to reject an envelope with an unsupported type.

  • #652 a15cab8 Thanks @jxom! - Fixed TxEnvelopeTempo.assert to throw InvalidValidityBoundError when validBefore or validAfter is not a non-negative safe integer number, instead of serializing a bigint or hex bound as unset.

  • #654 40f9fac Thanks @jxom! - Fixed SignatureEnvelope.deserialize and SignatureEnvelope.fromRpc to reject WebAuthn signatures larger than the 2048-byte protocol maximum.

  • #656 f14c9be Thanks @jxom! - Fixed TxEnvelopeLegacy.assert, TxEnvelopeEip2930.assert, TxEnvelopeEip1559.assert and TxEnvelopeTempo.assert to throw InvalidChainIdError for a chainId that is not a positive safe integer.

  • #658 b06a125 Thanks @jxom! - Fixed TxEnvelopeLegacy.deserialize to validate unsigned transactions and to reject nested lists, a v above the safe integer range, and gasPrice, r or s values longer than 32 bytes.

  • #660 f6d2f2b Thanks @jxom! - Fixed TxEnvelopeLegacy.hash (with presign) and TxEnvelopeLegacy.getSignPayload to derive the chain ID from an EIP-155 v when the envelope has no chainId.

  • #662 bf4a8da Thanks @jxom! - Fixed TxEnvelopeLegacy.serialize to throw when an envelope's v does not match its chainId, and to throw Signature.InvalidVError when v is not a valid parity for the given chainId.

  • #664 b1cb7ba Thanks @jxom! - Fixed TypedData.extractEip712DomainTypes to include every domain field that is present, so a string chainId is hashed instead of left out of the derived domain.

  • #666 [07e1148](https://github.com/wevm/ox/commi...

Read more

ox@1.8.15

Choose a tag to compare

@github-actions github-actions released this 11 Nov 00:50
cabe9f0

Patch Changes

  • #606 4804c39 Thanks @jxom! - Added SignaturePreAuthorized to ox/tempo for TIP-1165 pre-authorized access key signatures: wrap, unwrap, from, assert and validate.

ox@0.14.66

Choose a tag to compare

@github-actions github-actions released this 11 Nov 05:52
6a39c5c

Patch Changes

  • #612 8c8177b Thanks @jxom! - Fixed AbiParameters.decode to 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 c585a11 Thanks @jxom! - Fixed AbiFunction.decodeData and AbiError.decode to throw SelectorMismatchError when the selector in data does not match the item or one of its overloads.

  • #616 3f948a4 Thanks @jxom! - Fixed AbiParameters.decode to throw when the 32-byte slot of a fixed-size bytesN value is cut short, as it does for other static types.

  • #618 431e963 Thanks @jxom! - Fixed AbiParameters.encode to reject bytes and bytesN values with an odd number of hex digits, and TypedData.assert to reject such bytesN values, instead of encoding them with a trailing zero nibble.

  • #620 aac6419 Thanks @jxom! - Fixed AbiEvent.decode to resolve overloaded events by the selector in topics[0] instead of always decoding with the overload picked by name.

  • #622 9876205 Thanks @jxom! - Fixed AbiEvent.assertArgs to reject positional arguments compared against keyed arguments, and to match an unnamed input of a partly named event by its index.

  • #625 774e807 Thanks @jxom! - Fixed Address.fromPublicKey to throw PublicKey.InvalidPrefixError for a compressed public key instead of deriving an address from the x coordinate alone.

  • #627 73f4ae2 Thanks @jxom! - Fixed Authorization.fromTuple and Authorization.fromRpc to throw Hex.IntegerOutOfRangeError for a chain ID that is not a safe integer instead of returning a rounded or NaN chain ID.

  • #629 64fb6d8 Thanks @jxom! - Fixed Authorization.fromTuple to throw Authorization.InvalidError unless the tuple has three or six elements, and TxEnvelopeEip7702.deserialize to require six-element authorization tuples.

  • #631 9fd338c Thanks @jxom! - Fixed UserOperation.hash for EntryPoint 0.7 in ox/erc4337 to hash the same initCode as UserOperation.toPacked, so a factory without factoryData is included in the hash.

  • #633 be32b5b Thanks @jxom! - Fixed Execute.decodeData and Execute.decodeBatchOfBatchesData in ox/erc7821 to decode only calldata in their own execution modes and throw Execute.UnsupportedModeError for any other mode.

  • #635 c113aa5 Thanks @jxom! - Fixed Keystore.encrypt and Keystore.decrypt to throw Keystore.InvalidKeySizeError when the key is shorter than 32 bytes.

  • #637 06d1715 Thanks @jxom! - Fixed Secp256k1.verify to hash the payload with sha256 when hash: true is used with address, matching the publicKey form.

  • #639 9814924 Thanks @jxom! - Fixed Signature.assert to reject a yParity that is not exactly 0 or 1, and Signature.toTuple to throw on an invalid or missing yParity instead of encoding it by truthiness.

  • #641 69a1206 Thanks @jxom! - Fixed Siwe.parseMessage to return an empty object when a message has text that is not part of the EIP-4361 prefix or suffix, such as Expiration Time and Not Before lines that are out of order, and to parse in linear time.

  • #643 f32eabe Thanks @jxom! - Fixed Siwe.createMessage to throw InvalidMessageFieldError when requestId contains a line feed or carriage return.

  • #645 a4b1476 Thanks @jxom! - Fixed TxEnvelopeTempo.assert and TxEnvelopeTempo.serialize to throw for a fee payer signature whose yParity is not 0 or 1, instead of encoding it as 1.

  • #647 c574477 Thanks @jxom! - Fixed KeyAuthorization.from, toTuple, and toRpc to reject a scope with recipients and no selector.

  • #649 66db000 Thanks @jxom! - Fixed SignatureEnvelope.assert, deserialize, fromRpc, and toRpc to reject a keychain signature whose inner signature is itself a keychain signature.

  • #651 bc730ad Thanks @jxom! - Fixed SignatureEnvelope.assert and SignatureEnvelope.validate to reject an envelope with an unsupported type.

  • #653 73e68f6 Thanks @jxom! - Fixed TxEnvelopeTempo.assert to throw InvalidValidityBoundError when validBefore or validAfter is not a non-negative safe integer number, instead of serializing a bigint or hex bound as unset.

  • #655 b6195cb Thanks @jxom! - Fixed SignatureEnvelope.deserialize and SignatureEnvelope.fromRpc to reject WebAuthn signatures larger than the 2048-byte protocol maximum.

  • #657 506d628 Thanks @jxom! - Fixed TxEnvelopeLegacy.assert, TxEnvelopeEip2930.assert, TxEnvelopeEip1559.assert and TxEnvelopeTempo.assert to throw InvalidChainIdError for a chainId that is not a positive safe integer.

  • #659 7377c88 Thanks @jxom! - Fixed TxEnvelopeLegacy.deserialize to validate unsigned transactions and to reject nested lists, a v above the safe integer range, and gasPrice, r or s values longer than 32 bytes.

  • #661 1f55fd7 Thanks @jxom! - Fixed TxEnvelopeLegacy.hash (with presign) and TxEnvelopeLegacy.getSignPayload to derive the chain ID from an EIP-155 v when the envelope has no chainId.

  • #663 61e3329 Thanks @jxom! - Fixed TxEnvelopeLegacy.serialize to throw when an envelope's v does not match its chainId, and to throw Signature.InvalidVError when v is not a valid parity for the given chainId.

  • #665 606e2aa Thanks @jxom! - Fixed TypedData.extractEip712DomainTypes to include every domain field that is present, so a string chainId is hashed instead of left out of the derived domain.

  • #667 fa83e7a Thanks @jxom! - Fixed Value.from and Value.format to trim trailing zeros in time linear in the length of the fraction.

  • #669 050b220 Thanks @jxom! - Fixed Registration.verify in ox/webauthn to derive deviceType from the backup eligibility (BE) flag and to a...

Read more

ox@0.14.65

Choose a tag to compare

@github-actions github-actions released this 11 Nov 00:46
a2b1257

Patch Changes

  • #607 d4966d7 Thanks @jxom! - Added SignaturePreAuthorized to ox/tempo for TIP-1165 pre-authorized access key signatures: wrap, unwrap, from, assert and validate.

ox@1.8.14

Choose a tag to compare

@github-actions github-actions released this 09 Nov 02:19
f4be1ac

Patch Changes

  • #602 15ef7a4 Thanks @jxom! - Fixed AbiError.decode to resolve overloaded errors by the selector in data instead of always decoding with the first matching overload.

  • #600 8228e04 Thanks @jxom! - Fixed AbiEvent.assertArgs and AbiEvent.extractLogs not matching integer arguments given as a number against values decoded as bigint, or as a bigint against small integers decoded as number.

  • #588 816729d Thanks @jxom! - Fixed AbiEvent.encode accepting out-of-range values for indexed intN/uintN (N < 256) and wrong-sized bytesN (N < 32) arguments instead of throwing.

  • #576 a6af44f Thanks @jxom! - Added userAddress to AccountOperation transaction 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 b03705a Thanks @jxom! - Fixed AbiEvent.decodeLog and AbiEvent.extractLogs to decode anonymous event logs when every event in the ABI is anonymous or, for extractLogs, when eventName names the event, throwing AbiEvent.AnonymousEventAmbiguityError from decodeLog when several anonymous events fit.

  • #580 b0994e1 Thanks @jxom! - Fixed Base32.toBytes and Base32.toHex accepting non-canonical input (non-zero trailing bits or an impossible length) by throwing Base32.InvalidPaddingError.

  • #573 5ba70c0 Thanks @RaphaelFakhri! - Fixed Cbor.decode to decode a __proto__ map key as an own property instead of replacing the prototype of the decoded object.

  • #503 97a4cce Thanks @ara-stock! - Fixed CompactSize.toBytes and CompactSize.toHex silently truncating values larger than 2^64 - 1 instead of throwing.

  • #591 401173c Thanks @jxom! - Fixed Attribution.fromData to return undefined when a codes or CBOR length field claims more bytes than precede it.

  • #584 7f37495 Thanks @jxom! - Fixed Hex.toBigInt and Hex.toNumber throwing on odd-length hex with signed: true, and Hex.fromNumber returning 0x0 for a negative number with signed: true and no size.

  • #596 80d74c1 Thanks @jxom! - Fixed Rlp.toBytes and Rlp.toHex to reject non-canonical encodings (a single byte below 0x80 with a length prefix, or a long-form or zero-padded length) with Rlp.NonCanonicalError.

  • #569 7a564af Thanks @gakonst! - Improved validation performance in Hex.assert, Value, TypedData, Siwe.isUri, ABI overload resolution, and the ox/zod hex, address, quantity, and Solidity type schemas by reusing module-level regular expressions instead of recreating them on every call.

  • #600 8228e04 Thanks @jxom! - Fixed Bytes.fromHex and Hex.toBytes shifting the bytes of odd-length hex values when size was specified.

  • #600 8228e04 Thanks @jxom! - Fixed RpcTransport.fromHttp sending both the default and the caller's Content-Type when fetchOptions.headers set it, instead of the caller's value alone.

  • #570 8a9f850 Thanks @gakonst! - Improved AbiItem.getSignatureHash and AbiItem.getSelector performance, along with the selector lookups in AbiItem.fromAbi, AbiFunction.decodeData, AbiEvent.decodeLog and AbiEvent.extractLogs, by caching signature hashes by normalized signature in a bounded cache that Caches.clear and engine changes reset.

  • #600 8228e04 Thanks @jxom! - Fixed Siwe.validateMessage accepting a message with a nonce shorter than 8 alphanumeric characters or a version other than 1, which EIP-4361 does not allow.

  • #600 8228e04 Thanks @jxom! - Fixed AbiItem.fromAbi throwing AbiItem.AmbiguityError for string and bytes overloads when the argument is a plain string; only hex strings and Uint8Array values now match bytes.

  • #582 8d042de Thanks @jxom! - Fixed Tick.fromPrice accepting negative prices between -1 and 0 as their positive counterparts instead of throwing Tick.PriceOutOfBoundsError.

  • #600 8228e04 Thanks @jxom! - Fixed TypedData.assert and TypedData.validate (and so TypedData.getSignPayload and TypedData.serialize) rejecting struct names that contain :, such as HyperliquidTransaction:SendAsset.

  • #593 c370946 Thanks @jxom! - Fixed UserOperation.toPacked and UserOperation.toInitCode to keep the padded EIP-7702 0x7702 initCode marker expected by EntryPoint 0.8 and 0.9, using the delegate address only with the new forHash option.

  • #598 b2771c8 Thanks @jxom! - Fixed AbiFunction.decodeData returning undefined when a function name has a zero-input overload and the calldata targets another overload, by keeping the other overloads on items fromAbi resolves without args.

ox@0.14.64

Choose a tag to compare

@github-actions github-actions released this 09 Nov 02:17
4acc182

Patch Changes

  • #603 0f76422 Thanks @jxom! - Fixed AbiError.decode to resolve overloaded errors by the selector in data instead of always decoding with the first matching overload.

  • #601 354db45 Thanks @jxom! - Fixed AbiEvent.assertArgs not matching integer arguments given as a number against values decoded as bigint, or as a bigint against small integers decoded as number.

  • #590 ed0af24 Thanks @jxom! - Fixed Base32.toBytes and Base32.toHex accepting non-canonical input (non-zero trailing bits or an impossible length) by throwing Base32.InvalidPaddingError.

  • #581 0dcd096 Thanks @jxom! - Fixed Cbor.decode to decode a __proto__ map key as an own property instead of replacing the prototype of the decoded object.

  • #592 867e641 Thanks @jxom! - Fixed Attribution.fromData to return undefined when a codes or CBOR length field claims more bytes than precede it.

  • #585 9bc4970 Thanks @jxom! - Fixed Hex.toBigInt and Hex.toNumber throwing on odd-length hex with signed: true, and Hex.fromNumber returning 0x0 for a negative number with signed: true and no size.

  • #597 0253792 Thanks @jxom! - Fixed Rlp.toBytes and Rlp.toHex to reject non-canonical encodings (a single byte below 0x80 with a length prefix, or a long-form or zero-padded length) with Rlp.NonCanonicalError.

  • #601 354db45 Thanks @jxom! - Fixed Bytes.fromHex and Hex.toBytes shifting the bytes of odd-length hex values when size was specified.

  • #601 354db45 Thanks @jxom! - Fixed RpcTransport.fromHttp dropping fetchOptions.headers supplied as a Headers instance or tuple array, and sending both the default and the caller's Content-Type when only their casing differed.

  • #601 354db45 Thanks @jxom! - Fixed Siwe.validateMessage accepting a message with a nonce shorter than 8 alphanumeric characters or a version other than 1, which EIP-4361 does not allow.

  • #601 354db45 Thanks @jxom! - Fixed AbiItem.fromAbi throwing AbiItem.AmbiguityError for string and bytes overloads when the argument is a plain string; only hex strings and Uint8Array values now match bytes.

  • #583 e415932 Thanks @jxom! - Fixed Tick.fromPrice accepting negative prices between -1 and 0 as their positive counterparts instead of throwing Tick.PriceOutOfBoundsError.

  • #601 354db45 Thanks @jxom! - Fixed TypedData.assert and TypedData.validate (and so TypedData.getSignPayload and TypedData.serialize) rejecting struct names that contain :, such as HyperliquidTransaction:SendAsset.

  • #579 90b00c7 Thanks @jxom! - Added a {"type":"module"} marker to _types/ so declaration files resolve as ESM under TypeScript node16 (and nodenext before TypeScript 5.8); CommonJS consumers on node16 should switch to nodenext or bundler resolution.

  • #594 4208467 Thanks @jxom! - Fixed UserOperation.toPacked and UserOperation.toInitCode to keep the padded EIP-7702 0x7702 initCode marker expected by EntryPoint 0.8, using the delegate address only with the new forHash option.

  • #599 942c3a3 Thanks @jxom! - Fixed AbiFunction.decodeData returning undefined when a function name has a zero-input overload and the calldata targets another overload, by keeping the other overloads on items fromAbi resolves without args.

ox@0.14.63

Choose a tag to compare

@github-actions github-actions released this 04 Nov 02:07
9a5d8b6

Patch Changes

  • #575 d9d63a7 Thanks @jxom! - Added userAddress to AccountOperation transaction 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.

ox@0.14.62

Choose a tag to compare

@github-actions github-actions released this 03 Nov 04:21
95dc1f3

Patch Changes

  • #565 20457a6 Thanks @jxom! - Fixed AbiEvent.decode and AbiEvent.encode for anonymous events: decode no longer expects a selector topic and reads every topic as an indexed input, and encode no longer prepends the selector.

  • #571 4a029cf Thanks @gakonst! - Improved validation performance in Hex.assert, Value, TypedData, Siwe.isUri, and ABI overload resolution by reusing module-level regular expressions instead of recreating them on every call.

  • #571 4a029cf Thanks @gakonst! - Improved AbiItem.getSignatureHash and AbiItem.getSelector performance, along with the selector lookups in AbiItem.fromAbi, AbiFunction.decodeData, AbiEvent.decodeLog and AbiEvent.extractLogs, by caching signature hashes by normalized signature in a bounded cache that Caches.clear resets.

ox@0.14.61

Choose a tag to compare

@github-actions github-actions released this 02 Nov 00:44
24beab5

Patch Changes

  • #561 f9e8a6e Thanks @jxom! - Fixed AbiItem.fromAbi resolving indistinguishable overloads, such as bytes32 and bytes, uint256 and int256, or uint256[] and uint256[2], to the last match. It now throws AbiItem.AmbiguityError, and a selector selects the overload. An overload matches only an integer in its range or fixed bytes of its size.

  • #559 4f5a87a Thanks @jxom! - Fixed AbiParameters.decode accepting intN/uintN words outside the declared type's range and address words with non-zero padding; it now throws Hex.IntegerOutOfRangeError or Address.InvalidAddressError, matching Solidity's abi.decode.

  • #555 c18169b Thanks @jxom! - Deprecated KeyAuthorization isAdmin and updated account docs for TIP-1137, which removes admin access keys at T14 while keeping their wire encoding decodable.

  • #561 f9e8a6e Thanks @jxom! - Fixed TxEnvelopeEip1559.assert, TxEnvelopeEip4844.assert, TxEnvelopeEip7702.assert, and TxEnvelopeTempo.assert accepting a maxPriorityFeePerGas above a zero maxFeePerGas. Their deserialize functions now read an empty maxFeePerGas as zero when a tip is set, so such a transaction throws TransactionEnvelope.TipAboveFeeCapError. Zero fees now show in the error messages.

  • #561 f9e8a6e Thanks @jxom! - Fixed TypedData.assert and TypedData.validate accepting invalid struct names, such as uint7, bytes32 or Foo.Bar, and invalid field types, such as uint, uint7, bytes0 or an undefined struct, including in structs referenced only as array elements. They now throw TypedData.InvalidStructTypeError and the new TypedData.InvalidTypeError. TypedData.encodeType now includes struct names that contain `# ox.