Skip to content

refactor: Use @icp-sdk/core for Principal and remove @dfinity deps#199

Closed
raymondk wants to merge 1 commit intodfinity:mainfrom
raymondk:rk/icp-sdk-core
Closed

refactor: Use @icp-sdk/core for Principal and remove @dfinity deps#199
raymondk wants to merge 1 commit intodfinity:mainfrom
raymondk:rk/icp-sdk-core

Conversation

@raymondk
Copy link
Copy Markdown
Collaborator

Remove the dependency on the @dfinity packages since they're being deprecated in favor of icp-sdk/core

Copilot AI review requested due to automatic review settings April 30, 2026 19:12
@raymondk raymondk requested review from a team as code owners April 30, 2026 19:12
@github-actions
Copy link
Copy Markdown

Thank you for contributing! Unfortunately this repository does not accept external contributions yet.

We are working on enabling this by aligning our internal processes and our CI setup to handle external contributions. However this will take some time to set up so in the meantime we unfortunately have to close this Pull Request.

We hope you understand and will come back once we accept external PRs.

— The DFINITY Foundation

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 migrates the codebase off the deprecated @dfinity/* packages by switching Principal imports to @icp-sdk/core and removing the direct @dfinity dependencies.

Changes:

  • Replaced @dfinity/principal imports with @icp-sdk/core/principal across runtime and test code.
  • Removed @dfinity/utils usage by inlining isNullish in the CLI.
  • Updated package.json/package-lock.json to drop @dfinity/principal + @dfinity/utils and add @icp-sdk/core.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/signer/eth.ts Switch Principal type import to @icp-sdk/core/principal.
src/signer/eth.test.ts Switch test Principal import to @icp-sdk/core/principal.
src/signer/btc.ts Switch Principal type import to @icp-sdk/core/principal.
src/signer/btc.test.ts Switch test Principal import to @icp-sdk/core/principal.
src/schnorr/ed25519.ts Switch Principal type import to @icp-sdk/core/principal.
src/schnorr/ed25519.tests/pocketic_derivation.test.ts Switch test Principal import to @icp-sdk/core/principal.
src/schnorr/ed25519.tests/mainnet_derivation.test.ts Switch test Principal import to @icp-sdk/core/principal.
src/schnorr/bip340secp256k1.tests/pocketic_derivation.test.ts Switch test Principal import to @icp-sdk/core/principal.
src/schnorr/bip340secp256k1.tests/mainnet_derivation.test.ts Switch test Principal import to @icp-sdk/core/principal.
src/ecdsa/secp256k1.ts Switch Principal type import to @icp-sdk/core/principal.
src/ecdsa/secp256k1.tests/pocketic_derivation.test.ts Switch test Principal import to @icp-sdk/core/principal.
src/ecdsa/secp256k1.tests/mainnet_derivation.test.ts Switch test Principal import to @icp-sdk/core/principal.
src/cli.ts Switch Principal import to @icp-sdk/core/principal and inline isNullish.
package.json Remove direct @dfinity/* deps and add @icp-sdk/core.
package-lock.json Lockfile updated to reflect dependency changes.

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

Comment thread src/cli.ts

// Inlined from `@dfinity/utils` to avoid depending on the package for a single helper.
const isNullish = <T>(
argument: T | undefined | null,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants