docs: document wallet secret export policy#224
Merged
El-swaggerito merged 1 commit intoJul 23, 2026
Conversation
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.
Closes #211
Description
Documents the PocketPay SDK policy for wallet secret export and clarifies the security boundary between supported local-key access and a managed wallet-export feature.
This PR adds a dedicated wallet secret export policy that explains:
exportWallet(),exportSecretKey(), mnemonic, backup-file, clipboard, QR-code, or recovery workflow;The README documentation index now links directly to the new policy.
Linked Issue
Closes #211
Type of Change
Changes Made
Added
docs/wallet-secret-export.mdcreateWallet()returns a localWalletKeypaircontaining a secret key.importWallet(secretKey)requires the caller to already possess the secret.getPublicKey(secretKey)derives only a public key and does not recover or export a secret.Signer,AccountAbstraction,LocalSigner, hardware wallets, HSMs, passkeys, MPC signers, and remote signers must not be assumed to expose private key material.Updated
README.mddocs/wallet-secret-export.md.Supported Behaviour Documented
The new policy documents the behaviour already present in the SDK:
createWallet()generates and returns a local keypair in memory.importWallet(secretKey)validates a secret already possessed by the caller.getPublicKey(secretKey)derives the associated public key.LocalSignermay hold secret material in memory for signing.No SDK source behaviour or public API was changed by this PR.
Unsupported Behaviour Documented
The policy explicitly states that the SDK does not provide:
exportWallet()orexportSecretKey()APIs;Security Guidance
The documentation follows a conservative secret-handling policy:
Acceptance Criteria
Validation
Passed
npm ci0 vulnerabilities.npm run check:circulargit diff --checkgit diff --cached --checkREADME.mddocs/wallet-secret-export.mdRepository Validation Limitations
npm run verifycould not complete because the current repository state contains unrelated TypeScript export errors in existing source files.npm run lintResult: failed with 121 existing TypeScript errors across 14 source files.
The errors include missing exports such as:
PocketPayErrorSDKConfigStellarNetworkWalletKeypairThese errors are located in existing
src/files and are unrelated to the two documentation files changed by this PR.npm run buildResult: failed with the same 121 TypeScript errors reported by
npm run lint.npm testResult:
The failures are primarily caused by the same existing export problems, including:
PocketPayError is not a constructor;Right-hand side of 'instanceof' is not an object;getTransactions,filterByDirection, andsortTransactionsByDatenot being exported;Relevant account-abstraction tests passed, including the test confirming that
LocalSignerdoes not expose its secret key.No source files, test files, configuration files, or dependency definitions were modified to address these unrelated repository failures because doing so would expand this documentation-only PR beyond issue #211.
Commit
Files Changed
Reviewer Notes
This PR intentionally documents the current security boundary rather than adding an export implementation.
The key distinction is: