Skip to content

feat: v1#231

Open
jxom wants to merge 204 commits into
mainfrom
v1
Open

feat: v1#231
jxom wants to merge 204 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 Error Error Jul 6, 2026 11:56pm

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
github-actions Bot and others added 30 commits June 18, 2026 19:24
* feat(abi): move human-readable utils into ox

* chore: bump vocs

* chore: up

* chore: up

* chore: format
Add a 1024 nesting-depth limit to Rlp.toBytes/toHex decoding, throwing
Rlp.DepthLimitExceededError instead of overflowing the call stack on
deeply nested untrusted RLP input.

Amp-Thread-ID: https://ampcode.com/threads/T-019f11c2-9b15-775b-964d-340d62f0a299
* refactor(tempo)!: remove multisig config_id concept

Derive multisig account addresses directly from the initial config.
Drop config_id from the owner approval digest and the 0x05 wire format.
Raise maxOwners to 255 with u8 weights. Validate nested multisig owner
approvals (depth limit, no init, no keychain).

* Update multisig-remove-config-id.md

* test(tempo): add multisig access-key e2e coverage

Authorize an access key via a multisig-signed AccountKeychain
authorizeKey call, execute a keychain-signed transaction with it,
and reject keyAuthorization on multisig transactions.
Adds keyId, multisigInit, multisigSignatureCount, and capabilities to the
tempo TransactionRequest; carries keyType/keyData/feePayer through toRpc
(shimming long key data into a 2-byte length hint); withholds feeToken
until the fee payer has signed (TIP-76); defaults data-less lifted calls
to the zero address; and marks toEnvelope output as pending a fee payer
signature when feePayer is set. Mirrored in the zod codecs.

Amp-Thread-ID: https://ampcode.com/threads/T-019f3562-6191-707e-8402-ee011f40a8a0
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