Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Keystone #113

Merged
merged 3 commits into from
Dec 13, 2024
Merged

feat: Keystone #113

merged 3 commits into from
Dec 13, 2024

Conversation

gbarkhatov
Copy link
Contributor

@gbarkhatov gbarkhatov commented Dec 11, 2024

Adds a support for the Keystone HW wallet

Closes #10

Problem 1:

When running npm link to test out on simple-staking we have issues related to the default exports.

import sdk, { PlayStatus, ReadStatus, SDK, SupportedResult } from "@keystonehq/sdk";

if (sdk?.bootstrap) {
  sdk.bootstrap();
  this.viewSdk = sdk;
} else {
  // commonjs -> esm npm link issue
  (sdk as any).default.bootstrap();
  this.viewSdk = (sdk as any).default;
}

So in storybook sdk is defined and has sdk.bootstrap. While in simple-staking you have to access sdk.default.bootstrap. We either solve this:

  • via Keystone side and named export in their @keystonehq/sdk (already requested)
  • on our side by playing around with vite on bbn-wallet-connect or simple-staking

@totraev @supertong any ideas?

Problem 2:

To use Keystone, we need to implement signMessage with ecdsa. The BIP322 implementation is already there, but we don't care about it on our current tech stack. It is also not implemented in Tomo wallet connector.

Copy link
Collaborator

@jrwbabylonlab jrwbabylonlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/components/Wallets/index.tsx Outdated Show resolved Hide resolved
src/core/Wallet.ts Outdated Show resolved Hide resolved
@totraev totraev mentioned this pull request Dec 12, 2024
@gbarkhatov gbarkhatov merged commit 621e270 into main Dec 13, 2024
1 check 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.

BTC wallets: Add Keystone HW wallet
3 participants