Skip to content

feat(stellar-wallet-snap): Implement keyring API exportAccount - #215

Closed
stanleyyconsensys wants to merge 12 commits into
bump/snap-sdkfrom
feat/stellar/export-pk
Closed

feat(stellar-wallet-snap): Implement keyring API exportAccount#215
stanleyyconsensys wants to merge 12 commits into
bump/snap-sdkfrom
feat/stellar/export-pk

Conversation

@stanleyyconsensys

@stanleyyconsensys stanleyyconsensys commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Explanation

This PR Implement keyring API exportAccount

  • Add exportAccount in keyring handler
  • Add StellarSecretKeyStruct for secret key validation
  • Export stellar secret string from Wallet Object
  • Add exception ExportAccountException
  • Update keyring API permission

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@stanleyyconsensys
stanleyyconsensys requested a review from a team as a code owner August 27, 2026 04:48
this.#logger.debug('Keyring request handled', {
origin,
method: request.method,
result: keyringRequestResult,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

remove it for prevent logging the PK

@stanleyyconsensys stanleyyconsensys changed the title Feat/stellar/export pk feat(stellar-wallet-snap): Implement keyring API exportAccount Aug 27, 2026
@stanleyyconsensys
stanleyyconsensys requested a lite review from Copilot August 27, 2026 04:50
@stanleyyconsensys

Copy link
Copy Markdown
Contributor Author

@copilot review

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown

@copilot review

Reviewed. I verified the keyring handler no longer logs keyring results, so private key material from exportAccount is not logged. I also checked the recent CI failure on bump/snap-sdk; it was due to dirty snap.manifest.json shasums after build and is already addressed on this branch.


### Added

- Add `exportAccount` keyring method for base32 Stellar secret-seed export ([#187](https://github.com/MetaMask/internal-snaps/pull/187))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will update the PR number

/**
* Validation struct for a Stellar secret seed (`S…` strkey / base32).
*/
export const StellarSecretKeyStruct = refine(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you use the sensitive struct that we have here?

@stanleyyconsensys
stanleyyconsensys requested a review from a team as a code owner September 1, 2026 04:12
@cursor
cursor Bot requested review from Julink-eth and hmalik88 September 1, 2026 04:15
…pi` to `24.1.0` + `snaps-execution-environments` to `11.3.0` + `metamask/snaps-jest` to `10.2.1` + `metamask/keyring-snap-sdk` to `10.0.0` (#214)

## Explanation

### This PR bumps
- snap-sdk from 11.2.0 to 12.0.1
- it is a breaking change from snap-sdk, as it requires kerying api
24.1.0+
- it will start to pass the `Origin metadata` to keyring api submit
request, but none of our validation is blocking it, so it is safe to
bump
- snap-utils from 12.4.0 to 12.6.0
- kerying api from 23.7.0 to 24.1.0
- it is a breaking change from keyring api, as it drop node version
support 20 and 18
  - Client already support that version, safe to bump
- snaps-execution-environments from 11.2.0 to 11.3.0
- metamask/snaps-jest 10.2.0 to 10.2.1
- metamask/keyring-snap-sdk 9.2.1 to 10.0.0


### With those bumps, they add
- support PrivateKeyEncoding with base32 (It will be used for Stellar
Private Key Export)
- support for the optional originMetadata property to all handlers that
also support origin

### Test bump PR on client
MetaMask/metamask-extension#45822

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/internal-snaps/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/internal-snaps/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them
An error occurred while trying to automatically change base from bump/snap-sdk to main September 1, 2026 08:37
An error occurred while trying to automatically change base from bump/snap-sdk to main September 1, 2026 11:40
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.

3 participants