Skip to content

Merge releases/next into release since a minor version has been released#383

Merged
Hanssen0 merged 52 commits into
releasefrom
releases/next
Jun 22, 2026
Merged

Merge releases/next into release since a minor version has been released#383
Hanssen0 merged 52 commits into
releasefrom
releases/next

Conversation

@Hanssen0

Copy link
Copy Markdown
Member

See #341 and #382

phroi and others added 30 commits January 7, 2026 14:35
feat(btc): add PSBT signing and broadcasting support
base32 (RFC 4648 lowercase no-padding) plus argsToDid, didToArgs,
and isDidCkb for converting between the 20-byte Type ID args returned
by createDidCkb and the human-readable did:ckb URI form per WIP-01.
Vitest covers known vectors and edge cases.
…istDidCkbsByLock)

findDidCkbCell wraps findSingletonCellByType and decodes DidCkbData.
resolveDidCkb takes a did:ckb string instead of raw Type ID args.
listDidCkbsByLock enumerates every live DID owned by a lock,
useful for wallet/dashboard reverse lookup. Bad cells are skipped
rather than fail the whole listing.
Walks backward through the DID cell chain by reading each transferring
tx and matching its inputs against the DID Type ID. Returns ordered
entries with action (CREATE for fresh mint, MIGRATE for did:plc import,
UPDATE for transfers), tx hash, output index, block number, capacity,
and decoded DidCkbData. maxSteps caps the walk to prevent runaways.
Minimal did:plc surface scoped to what a did:ckb migration needs.

- fetchPlcLog: read the op log from the public PLC directory
- getGenesisOperation / getRotationKeys: extract genesis and parse
  modern (rotationKeys) and legacy (signingKey + recoveryKey) shapes
- parseDidKey: decode multicodec-tagged did:key (secp256k1 / p256)
- signRotationHash: ECDSA sign a 32-byte CKB tx hash with prehash
  enabled so SHA-256 is applied internally, matching the on-chain
  k256/p256 Verifier
- verifyPrivateKeyMatch: sanity check before sending

Adds @noble/curves as a dependency. Exposed via the ./plc subpath
so consumers who only need history or resolution don't pull the
curve code into their bundle.
truthixify and others added 22 commits June 14, 2026 00:12
migrateDidCkb wraps createDidCkb and stamps the source did:plc into
the DidCkbDataV1.localId field. Returns the same {tx, id, index}
shape so callers can drop it in wherever createDidCkb fits.

buildMigrationWitness is a pure helper: takes a tx hash, the genesis
PLC operation, and the chosen rotation key, signs the hash via the
PLC subpath, and returns a typed DidCkbWitness ready to be set on
the first input. The curve is inferred from the genesis op's
rotation key unless the caller overrides it.
…ples

Three runnable examples for the new did-ckb advanced surface.

- resolveDid: resolveDidCkb on a known identifier and listDidCkbsByLock
  on the signer's address
- didHistory: getDidCkbHistory walking the cell chain back to genesis
- migrateDid: end-to-end did:plc import via fetchPlcLog, migrateDidCkb,
  and buildMigrationWitness, including the verifyPrivateKeyMatch
  sanity check before sending
resolver.test covers findDidCkbCell hit/miss, resolveDidCkb rejecting
non-did:ckb strings, and listDidCkbsByLock decoding the cells findCells
yields (skipping any without a type script).

history.test simulates a three-step cell chain (genesis + two transfers)
and asserts the walk returns UPDATE, UPDATE, CREATE newest-first.
A second case flips the genesis to MIGRATE when localId is set.
Per Hanssen0's review, switch findPriorDidCell to accept TransactionLike
and fetch each input's previous output via input.getCell(client) instead
of manually reading prevTx.transaction.outputs[idx].

input.getCell uses the client's cell cache, so repeat walks across the
same chain reuse fetched cells instead of redoing getTransaction calls.
Inputs whose previous output can't be fetched are skipped rather than
aborting the walk.
Per Hanssen0's review on the example, the id field now accepts either
a 20-byte Type ID args hex (what createDidCkb returns) or a did:ckb
string. Strings are sniffed via isDidCkb and converted with didToArgs;
hex inputs go through ccc.hexFrom as before.

Test covers the URI input path. Example calls getDidCkbHistory with
the did variable directly instead of pre-converting via didToArgs.
Per Hanssen0's review:

- resolver.didCkbTypeScript: Script.from already runs args through
  hexFrom, no need to do it ourselves
- examples/migrateDid: WitnessArgs.from accepts a BytesLike for
  outputType, so witness.toBytes() can go in raw
…y prettier

The hexFrom removal in the previous commit shrunk the expression enough
that prettier wants the call on one line.
feat(did-ckb): identifier helpers, resolver, history walk, did:plc migration
chore(releases/next): bump packages version
chore(releases/next): bump packages version
@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cf75827

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@netlify

netlify Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploy Preview for liveccc ready!

Name Link
🔨 Latest commit cf75827
🔍 Latest deploy log https://app.netlify.com/projects/liveccc/deploys/6a397f3b642bcf00082ec4bd
😎 Deploy Preview https://deploy-preview-383--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 22, 2026

Copy link
Copy Markdown

Deploy Preview for docsccc ready!

Name Link
🔨 Latest commit cf75827
🔍 Latest deploy log https://app.netlify.com/projects/docsccc/deploys/6a397f3b3304f20008d8f162
😎 Deploy Preview https://deploy-preview-383--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: 74 (🔴 down 14 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 22, 2026

Copy link
Copy Markdown

Deploy Preview for appccc ready!

Name Link
🔨 Latest commit cf75827
🔍 Latest deploy log https://app.netlify.com/projects/appccc/deploys/6a397f3b5fc1480008855280
😎 Deploy Preview https://deploy-preview-383--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: 71 (🔴 down 15 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.

@netlify

netlify Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploy Preview for apiccc ready!

Name Link
🔨 Latest commit cf75827
🔍 Latest deploy log https://app.netlify.com/projects/apiccc/deploys/6a397f3bc2664100085549d5
😎 Deploy Preview https://deploy-preview-383--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: 86 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 95 (🟢 up 1 from production)
PWA: -
View the detailed breakdown and full score reports

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

@Hanssen0 Hanssen0 merged commit 7dc522b into release Jun 22, 2026
23 checks passed
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.

4 participants