Skip to content

feat: v1 - #231

Merged
jxom merged 231 commits into
mainfrom
v1
Jul 13, 2026
Merged

jxom merged 231 commits into
mainfrom
v1

Conversation

@jxom

@jxom jxom commented May 7, 2026 •

Copy link
Copy Markdown
Member

Breaking changes

  • Hex-encoded crypto coordinates. Migrated Signature, PublicKey, BlsPoint, and all envelope types (Transaction, Authorization, ERC envelopes, Tempo) from bigint r/s/x/y/Fp/Fp2 to padded Hex.Hex (32-byte for secp256k1/P256/WebAuthnP256, 48-byte for BLS12-381). The bigintType generic is removed.

    - Signature.from({ r: 0x6e10...n, s: 0x4a90...n, yParity: 1 })
    + Signature.from({
    +   r: '0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf',
    +   s: '0x4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db8',
    +   yParity: 1,
    + })
  • @noble/* v2. Upgraded @noble/ciphers, @noble/curves, @noble/hashes, @scure/bip32, @scure/bip39. ECDSA signatures (Secp256k1, P256) now default to lowS: true. Module .noble re-exports follow v2 (randomSecretKey, Point, bls.longSignatures.*, etc.).

  • PeerDAS (EIP-7594) blob model. Removed the EIP-4844 blob-sidecar surface (Blobs.toSidecars, Blobs.BlobSidecar(s), TxEnvelopeEip4844.sidecars, Kzg.Kzg.computeBlobKzgProof). Added the BlobCells module for cell/column propagation. KZG backends must implement computeCells, computeCellsAndKzgProofs, recoverCellsAndKzgProofs, verifyCellKzgProofBatch.

    - sidecars: { blobs, commitments, proofs }
    + sidecars: { blobs, commitments, cellProofs }
  • ABI decode checksums by default. AbiParameters.decode (and downstream AbiFunction/AbiEvent/AbiError decoders) checksum decoded address outputs. Opt out with checksumAddress: false.

Notable additions

  • Crypto serialized inputs and as option. Secp256k1, P256, WebCryptoP256, and Bls now accept Hex.Hex | Bytes.Bytes | Signature.Signature | PublicKey.PublicKey for signature/publicKey params, and expose as: 'Hex' | 'Bytes' | 'Object' on sign / getPublicKey / recoverPublicKey.

    - const signature = Secp256k1.sign({ payload, privateKey })
    + const signature = Secp256k1.sign({ payload, privateKey, as: 'Hex' })
  • AbiEvent.decodeLog. Extract and decode an event log directly from an ABI.

    const abi = Abi.from([
      'event Transfer(address indexed from, address indexed to, uint256 value)',
    ])
    
    const { event, args } = AbiEvent.decodeLog(abi, {
      data: '0x0000000000000000000000000000000000000000000000000000000000000001',
      topics: [
        '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
        '0x000000000000000000000000a5cc3c03994db5b0d9a5eedd10cabab0813678ac',
        '0x000000000000000000000000a5cc3c03994db5b0d9a5eedd10cabab0813678ac',
      ],
    })
    // event: { name: 'Transfer', type: 'event', ... }
    // args:  { from: '0xa5cc...', to: '0xa5cc...', value: 1n }
  • AbiEvent.extractLogs. Filter and decode logs from a batch against an ABI.

    const logs = AbiEvent.extractLogs(abi, logs, { eventName: 'Transfer' })
    // [{ eventName: 'Transfer', args: { from, to, value }, topics, data }, ...]
  • AbiError.extract. Select the matching ABI error from revert data and decode its arguments.

    const abi = Abi.from([
      'error InvalidSignature(uint r, uint s, uint8 yParity)',
    ])
    
    const { error, args } = AbiError.extract(
      abi,
      '0xecde6349...0001a4...0045...0001',
    )
    // error: { name: 'InvalidSignature', type: 'error', ... }
    // args:  [420n, 69n, 1]
  • AbiFunction.decodeData selector inference. Pass an ABI plus calldata and the function is resolved from the 4-byte selector. Decoding selector-only calldata for a function with inputs now throws AbiParameters.DataSizeTooSmallError instead of silently returning undefined, and constructorless AbiConstructor deploy data is now allowed when there are no arguments.

    const abi = Abi.from(['function approve(address, uint256)', /* ... */])
    
    const input = AbiFunction.decodeData(
      abi,
      '0x095ea7b3000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000000000000000000000000000000000000000010f2c',
    )
    // ['0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', 69420n]
  • Transaction envelope router. TxEnvelope.from / serialize / deserialize / hash / getSignPayload / toRpc infer the envelope type from input properties and route to the matching TxEnvelopeLegacy / TxEnvelopeEip2930 / TxEnvelopeEip1559 / TxEnvelopeEip4844 / TxEnvelopeEip7702 module.

    const envelope = TxEnvelope.from({
      chainId: 1,
      maxFeePerGas: 1n,
    })
    
    const serialized = TxEnvelope.serialize(envelope, { signature })
    const hash = TxEnvelope.hash(envelope)

@vercel

vercel Bot commented May 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ox Ready Ready Preview, Comment Jul 13, 2026 10:07pm

Request Review

@socket-security

socket-security Bot commented May 7, 2026 •

Copy link
Copy Markdown

Bumps @noble/ciphers, @noble/curves, @noble/hashes, @scure/bip32,
and @scure/bip39 to v2 and refactors crypto wrappers to the new APIs
(Uint8Array signatures, Point.fromBytes, Signature.fromBytes/toBytes,
bls.longSignatures, randomSecretKey, .js import extensions).

Adds an internal helper for converting between ox's { r, s, yParity }
Signature shape and noble's compact/recovered byte layouts. Restores
ImportMeta.env types for tests now that vitest v4 dropped them.

Amp-Thread-ID: https://ampcode.com/threads/T-019e05c5-ba3e-711e-8ea5-532440226027
jxom added 20 commits May 8, 2026 15:25
Bumps @noble/ciphers, @noble/curves, @noble/hashes, @scure/bip32,
and @scure/bip39 to v2 and refactors crypto wrappers to the new APIs
(Uint8Array signatures, Point.fromBytes, Signature.fromBytes/toBytes,
bls.longSignatures, randomSecretKey, .js import extensions).

Adds an internal helper for converting between ox's { r, s, yParity }
Signature shape and noble's compact/recovered byte layouts. Restores
ImportMeta.env types for tests now that vitest v4 dropped them.

Amp-Thread-ID: https://ampcode.com/threads/T-019e05c5-ba3e-711e-8ea5-532440226027
The tempo node returns a blockTimestamp on transaction responses; add
it to the core Transaction type, parse it in fromRpc, and serialize it
in toRpc. Updates the tempo e2e tests to assert it on transactions
returned via Transaction.fromRpc.

Amp-Thread-ID: https://ampcode.com/threads/T-019e05c5-ba3e-711e-8ea5-532440226027
github-actions Bot and others added 18 commits July 7, 2026 20:40
# Conflicts:
#	.changeset/eth-get-raw-transaction-by-hash.md
#	.changeset/multisig-remove-config-id.md
#	src/core/AbiParameters.ts
#	src/core/_test/AbiParameters.decode.test.ts
#	src/package.json
#	src/version.ts
* feat(zod): add ABI schemas

* chore: changeset
tmm and others added 8 commits July 9, 2026 17:52
#293)

Docs deploys were failing at install time with `TypeError: fetch failed`
(`AggregateError [ETIMEDOUT]` connecting to a Cloudflare edge IP) while
pnpm downloaded vocs from https://pkg.pr.new/vocs@35ebd0c. pkg.pr.new
snapshots are ephemeral and less reliable to fetch than the npm registry.

The pinned snapshot's content matches the published [email protected] (identical
dependency graph; theme.css differs only in formatting), so pin that
instead and resolve it from the registry.


Claude-Session: https://claude.ai/code/session_01Hs7BNHbyd3S6cu7F2ZdPDT

Co-authored-by: Claude <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 72330572 Deployed Jul 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants