Skip to content

release: 1.0.0#88

Merged
tim-hm merged 21 commits intomainfrom
release/1.0.0
Oct 3, 2025
Merged

release: 1.0.0#88
tim-hm merged 21 commits intomainfrom
release/1.0.0

Conversation

@tim-hm
Copy link
Collaborator

@tim-hm tim-hm commented Sep 25, 2025

No description provided.

With `2.0.1` @Nobel added the `.js` extension to the export map — meaning you can no longer import without the extension in esm.
@github-actions
Copy link

github-actions bot commented Sep 25, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 80.58% 1718 / 2132
🔵 Statements 80.58% 1718 / 2132
🔵 Functions 78.78% 130 / 165
🔵 Branches 83.37% 301 / 361
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/lib.ts 0% 0% 0% 0% 1-49
src/core/encoding.ts 90% 100% 80% 90% 5-6
src/core/logger.ts 72.28% 66.66% 44.44% 72.28% 23-24, 27-32, 34-39, 80-86, 89-90, 93-94
src/core/signer.ts 91.48% 90.47% 90.9% 91.48% 36-42, 127
src/core/did/did.ts 94.33% 92.3% 100% 94.33% 86, 160-161
src/core/did/key.ts 85.71% 57.14% 100% 85.71% 10-11, 14-15, 19-20
src/core/did/nil.ts 92.59% 80% 100% 92.59% 14-15
src/nuc/builder.ts 86.95% 88.23% 84.61% 86.95% 81-83, 99-101, 121-123, 139-141, 318-319, 403-404, 523-526, 564-567
src/nuc/codec.ts 85.71% 92.3% 100% 85.71% 115-123
src/nuc/envelope.ts 100% 100% 100% 100%
src/nuc/header.ts 100% 100% 100% 100%
src/nuc/payload.ts 100% 100% 100% 100%
src/services/nilauth/client.ts 85.99% 88% 80.95% 85.99% 56-85, 174-176, 185-187, 195-197, 363-364
src/services/nilauth/urls.ts 100% 100% 87.5% 100%
src/services/payer/builder.ts 62.61% 45.45% 55.55% 62.61% 46-49, 57-59, 62-64, 67-69, 73-76, 79-80, 93-94, 100-120
src/services/payer/gen/tx_pb.ts 100% 100% 100% 100%
src/validator/chain.ts 86.86% 82.92% 100% 86.86% 47-49, 79-84, 123-128, 176-178
src/validator/validator.ts 75.3% 78.26% 83.33% 75.3% 145-147, 163-165, 180, 190-215, 238-243, 266-268
Generated in workflow #299 for commit 3d1867a by the Vitest Coverage Report Action

This release will now be 1.0.0 and so the deprecation message should reference the _next major version_.
Better aligns nuc-ts and nuc-rs builder apis.
- Renames `build()` to `sign()` to make the cryptographic operation explicit
- Renames chained builder methods for semantic accuracy (`extendingDelegation`, `invokingFrom`)
- Fix automatic policy inheritance when extending delegations — eg policies shouldn't be copied between tokens
- Replace legacy signed-payload auth with Nuc bearer tokens with attenuated commands
- To make the payer's intentions explicit the payload now includes `payer_did` and `subscriber_did` fields
- Url query parameter changed from `public_key` to `did` for subscription status
- Removed legacy `createSignedRequest` utility
- Methods now accept `Keypair` and `Did` objects instead of raw strings
- Rename Builder factory methods for clarity and alignment with `nuc-rs`:
  - `extendingDelegation` -> `delegationFrom`
  - `invokingFrom` -> `invocationFrom`
  - `...FromString` variants updated accordingly
- Add an convenience method `keypair.signer()`
- Update integration tests to use the `did:key` method
Key ordering must match exactly what nilauth expects otherwise it results in diffent digests. See NillionNetwork/nilauth#50.
Using the `@deprecated` tag was noisy as even using `did:key` still gets flagged in editors.
tim-hm added 8 commits October 2, 2025 10:08
For libraries to consume this correctly there needed to be an easier way to construct the keypair with the correct signer — otherwise all nucs would need to be manually signed.

To be honest this might break the model — eg do we just need a Signer abstraction and do away with keypair? I'm punting that decision given how close we are to release.
…Client`

The `paySubscription` method coupled payment execution with validation, making it difficult to integrate with custom wallet providers or handle payment flows that require user interaction (like browser wallet confirmations).
With the move to support web3 signers, the keypair became an unnecessary intermediate abstraction where consumers would need to unnecessary create both keypair and a signer instances.

- Replace Keypair.generate() with Signer.generate()
- Replace Keypair.from(privateKey) with Signer.fromPrivateKey(privateKey)
- Replace keypair.toDid() with await signer.getDid()
- Replace PayerBuilder.fromKeypair(keypair) with PayerBuilder.fromPrivateKey(privateKey)
@tim-hm tim-hm marked this pull request as ready for review October 3, 2025 07:55
@tim-hm
Copy link
Collaborator Author

tim-hm commented Oct 3, 2025

Given timelines I'm going to merge as-is so we can cut 1.0.0-rc.2.

There is more work to be done here but I will have to circle back.

@tim-hm tim-hm merged commit 8c0bb6d into main Oct 3, 2025
6 of 8 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.

1 participant