Skip to content

feat(core): Add bytesLen and bytesLenUnsafe utilities (#353)#392

Merged
Hanssen0 merged 1 commit into
ckb-devrel:releases/nextfrom
Hanssen0:feat/bytes-len
Jun 29, 2026
Merged

feat(core): Add bytesLen and bytesLenUnsafe utilities (#353)#392
Hanssen0 merged 1 commit into
ckb-devrel:releases/nextfrom
Hanssen0:feat/bytes-len

Conversation

@Hanssen0

Copy link
Copy Markdown
Member

Cherry-pick #353

Copilot AI review requested due to automatic review settings June 29, 2026 03:00
@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 98597b5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@ckb-ccc/core Minor
@ckb-ccc/did-ckb Patch
@ckb-ccc/eip6963 Patch
@ckb-ccc/joy-id Patch
@ckb-ccc/lumos-patches Patch
@ckb-ccc/nip07 Patch
@ckb-ccc/okx Patch
@ckb-ccc/rei Patch
@ckb-ccc/shell Patch
@ckb-ccc/spore Patch
@ckb-ccc/ssri Patch
@ckb-ccc/type-id Patch
@ckb-ccc/udt Patch
@ckb-ccc/uni-sat Patch
@ckb-ccc/utxo-global Patch
@ckb-ccc/xverse Patch
@ckb-ccc/ccc Patch
ckb-ccc Patch
@ckb-ccc/connector Patch
@ckb-ccc/connector-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for liveccc ready!

Name Link
🔨 Latest commit 98597b5
🔍 Latest deploy log https://app.netlify.com/projects/liveccc/deploys/6a41e9f6911e800008e7fcf9
😎 Deploy Preview https://deploy-preview-392--liveccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 38 (🔴 down 1 from production)
Accessibility: 88 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for apiccc ready!

Name Link
🔨 Latest commit 98597b5
🔍 Latest deploy log https://app.netlify.com/projects/apiccc/deploys/6a41e9f8a309f00009bfd928
😎 Deploy Preview https://deploy-preview-392--apiccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 82 (🔴 down 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 95 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for docsccc ready!

Name Link
🔨 Latest commit 98597b5
🔍 Latest deploy log https://app.netlify.com/projects/docsccc/deploys/6a41e9f6436fb300083adfcb
😎 Deploy Preview https://deploy-preview-392--docsccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 36 (🔴 down 51 from production)
Accessibility: 95 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 82 (🟢 up 7 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for appccc ready!

Name Link
🔨 Latest commit 98597b5
🔍 Latest deploy log https://app.netlify.com/projects/appccc/deploys/6a41e9f67ec05400088fc5a1
😎 Deploy Preview https://deploy-preview-392--appccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 66 (🔴 down 13 from production)
Accessibility: 89 (🟢 up 1 from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds byte-length helper utilities to the core hex module, intended to efficiently compute the byte size of HexLike inputs (with a fast-path for validated Hex strings), and publishes the change via a changeset.

Changes:

  • Add bytesLen(hexLike) utility that returns the byte length of a HexLike value.
  • Add bytesLenUnsafe(hex) utility that computes byte length directly from a Hex string length (handling odd-digit hex).
  • Add a changeset bumping @ckb-ccc/core as a minor release for the new API.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
packages/core/src/hex/index.ts Introduces bytesLen and bytesLenUnsafe utilities for computing byte length of hex-like inputs.
.changeset/eighty-terms-cry.md Declares a minor changeset for exposing the new utilities in @ckb-ccc/core.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/core/src/hex/index.ts
Comment thread packages/core/src/hex/index.ts Outdated
Comment thread packages/core/src/hex/index.ts Outdated
Comment thread packages/core/src/hex/index.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread packages/core/src/hex/index.ts Outdated
Comment thread packages/core/src/hex/index.ts Outdated
@Hanssen0 Hanssen0 merged commit dd43386 into ckb-devrel:releases/next Jun 29, 2026
17 checks passed
@Hanssen0 Hanssen0 deleted the feat/bytes-len branch June 29, 2026 03:48
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.

3 participants