Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .changeset/agent-core-browser-safe-auth.md

This file was deleted.

23 changes: 23 additions & 0 deletions packages/agent-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# @tangle-network/agent-core

## 0.4.1

### Patch Changes

- 077b3d4: fix(auth): make the token module browser-import-safe

The auth token module referenced `Buffer` at module-eval time (top-level
`JWT_HEADER` / `JWT_HEADER_EDDSA` = `base64UrlEncode(...)`) and statically
imported `node:crypto`. Because the package **root** re-exports this module,
any browser bundle that transitively imports `@tangle-network/agent-core`
(e.g. via `@tangle-network/sdk-telemetry`) boot-crashed with
`ReferenceError: Buffer is not defined`.

- base64url encode/decode is now isomorphic (`btoa`/`atob` + `TextEncoder`/
`TextDecoder`), never `Buffer`
- the HS256 and EdDSA JWT headers are computed lazily on first use, not at
module load
- HMAC/Ed25519 signing, verification, and key generation resolve `node:crypto`
on demand via `process.getBuiltinModule` (server-only), so merely importing
the module never pulls the builtin into a browser graph

Token wire format is unchanged — already-issued tokens still verify.

## 0.4.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tangle-network/agent-core",
"version": "0.4.0",
"version": "0.4.1",
"description": "Core transport interfaces, event utilities, auth, SSE parsing, and resilience primitives for talking to Tangle agents",
"type": "module",
"license": "MIT",
Expand Down
Loading