feat: replace base 58 and 64 pkgs with scure/base - #1846
Open
pradel wants to merge 1 commit into
Open
Conversation
jannik-stacks
requested review from
Copilot and
jannik-stacks
and removed request for
Copilot
March 30, 2026 11:24
There was a problem hiding this comment.
Pull request overview
Replaces bs58, bs58check, and base64-js usage with @scure/base to reduce direct dependencies while keeping the same encoding/decoding behavior across the Stacks encryption/storage packages.
Changes:
- Swap base64 encoding/decoding from
base64-jsto@scure/basein encryption + storage code paths. - Swap base58 encoding/decoding from
bs58to@scure/basein encryption and update related unit tests. - Update workspace dependency manifests/lockfile to add
@scure/baseand remove directbs58/base64-jsdeps.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/storage/tests/storage.test.ts | Updates tests to decode legacy Gaia token using @scure/base base64. |
| packages/storage/src/hub.ts | Uses @scure/base for legacy auth token base64 encoding. |
| packages/storage/package.json | Adds @scure/base, removes direct base64-js dependency. |
| packages/stacking/package.json | Bumps @scure/base and removes bs58 from dependencies. |
| packages/encryption/tests/keys.test.ts | Updates base58check test to use createBase58check(sha256) from @scure/base. |
| packages/encryption/src/keys.ts | Replaces bs58 with @scure/base base58 implementation. |
| packages/encryption/src/ec.ts | Replaces base64 encode/decode in ECIES payloads with @scure/base. |
| packages/encryption/package.json | Adds @scure/base, removes direct base64-js / bs58 and related type/dev deps. |
| package.json | Removes @types/bs58check from repo root devDependencies. |
| package-lock.json | Lockfile updates reflecting dependency removals/additions across workspaces. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
@jannik-stacks ready for review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace the bs58, bs58check, and base64-js npm packages with the independently audited @scure/base package (v1.2.6) across @stacks/encryption, @stacks/storage and @stacks/stacking. This reduces the number of dependencies bundled with the apps.
Breaking change?
No. The API surface is identical — base58.encode/decode, base64.encode/decode, and createBase58check(sha256).encode/decode all have the same signatures and behavior.
Checklist