Skip to content

feat: add Locker Wallet - #603

Open
mounirrquiba wants to merge 1 commit into
hyperweb-io:mainfrom
locker-protocol:add-locker-wallet
Open

mounirrquiba wants to merge 1 commit into
hyperweb-io:mainfrom
locker-protocol:add-locker-wallet

Conversation

@mounirrquiba

Copy link
Copy Markdown

Summary

Adds @cosmos-kit/locker-extension and @cosmos-kit/locker for Locker Wallet (https://lockerprotocol.com), a browser extension for Chrome, Brave and Firefox whose keys never sit in the browser: each transaction is shown as a QR code and signed on Locker Vault, an app on an offline phone.

Changes

  • wallets/locker-extension, modelled on the Vultisig extension wallet: the client wraps window.lockerCosmos, the Keplr-compatible API the extension defines on every page (enable, disable, getKey, the direct offline signer, signDirect, signArbitrary, sendTx).
  • The wallet signs SIGN_MODE_DIRECT only, because its offline screen reviews the protobuf SignDoc it signs. An amino signer or signAmino is therefore refused with a message that says so, instead of being answered with another kind of signer.
  • wallets/locker re-exports it, as the other wallets do. Logo in public/images/logos/wallets/locker.svg, entry in the README.

Testing

  • makage build of both packages; eslint passes; pnpm install --frozen-lockfile accepts the lockfile.
  • Checked in Chrome with the extension: the wallet is found, getOfflineSigner(chainId) gives the direct signer, an amino request is refused with the message above.

Locker Wallet is a browser extension (Chrome, Brave, Firefox) whose keys never sit in the browser: each transaction is shown as a QR code and signed on Locker Vault, an app on an offline phone. On every page it defines window.lockerCosmos, a Keplr-compatible API marked isLocker.

@cosmos-kit/locker-extension wraps that API, modelled on the Vultisig extension wallet: enable, disable, getKey, the direct offline signer, signDirect, signArbitrary and sendTx. The wallet signs SIGN_MODE_DIRECT only (its offline screen reviews the protobuf SignDoc), so an amino signer or signAmino is refused by name instead of being answered with another kind of signer. @cosmos-kit/locker re-exports it; the logo is added to public/images/logos/wallets and the README.
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