Skip to content

feat: v1#231

Open
jxom wants to merge 169 commits into
mainfrom
v1
Open

feat: v1#231
jxom wants to merge 169 commits into
mainfrom
v1

Conversation

@jxom
Copy link
Copy Markdown
Member

@jxom jxom commented May 7, 2026

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
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

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

Project Deployment Actions Updated (UTC)
ox Ready Ready Preview, Comment Jun 6, 2026 6:22pm

Request Review

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
Implementation for the changeset added in 2b32e0c (the source change was lost in a concurrent stash on the previous commit).

Amp-Thread-ID: https://ampcode.com/threads/T-019e197d-5765-7569-9e8b-b992045f9165
jxom and others added 30 commits May 22, 2026 17:27
# Conflicts:
#	.github/workflows/changesets.yml
#	.github/workflows/snapshot.yml
#	.github/workflows/verify.yml
#	scripts/prepublish.ts
#	scripts/utils/exports.ts
#	src/package.json
#	src/tempo/KeyAuthorization.ts
#	src/tempo/SignatureEnvelope.test.ts
#	src/tempo/SignatureEnvelope.ts
#	src/tempo/ZoneRpcAuthentication.test.ts
#	test/vitest.config.ts
…d format JSDoc examples

The fromRpc return spread account/isAdmin independently, producing a type
with independently-optional fields that does not satisfy the OneOf admin
pairing. tsc -b missed this but tsgo (zile build) and examples:check caught
it. Build the result as a base KeyAuthorization with a paired adminPair and
cast, mirroring fromTuple. Also formats tempo JSDoc example snippets and adds
the missing zod/tempo/MultisigConfig export.

Amp-Thread-ID: https://ampcode.com/threads/T-019e86eb-d7da-728b-a54e-4dd72ebe3171
# Conflicts:
#	.npmrc
#	pnpm-lock.yaml
#	src/package.json
#	src/tempo/MultisigConfig.ts
#	src/tempo/SignatureEnvelope.ts
#	src/version.ts
Derive 5-15 word meta descriptions from TSDoc summaries with an optional
@description override, wire them into docgen output and static pages, and
refactor OG image generation to import assets directly.

Amp-Thread-ID: https://ampcode.com/threads/T-019e9be9-2b68-7531-bde7-a79cd9cc2776
Recreate the static homepage OG image in code and bump the npm install
command and "by Wevm" badge sizing.

Amp-Thread-ID: https://ampcode.com/threads/T-019e9be9-2b68-7531-bde7-a79cd9cc2776
…r item

Drop the group-level link on each API module and add an Overview entry as
the first child linking to the module root, sourcing the reference index
table link from a dedicated field.

Amp-Thread-ID: https://ampcode.com/threads/T-019e9be9-2b68-7531-bde7-a79cd9cc2776
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.

1 participant