feat: add needsXpubsForColdSigning capability method - #9430
Open
davidkaplanbitgo wants to merge 1 commit into
Open
feat: add needsXpubsForColdSigning capability method#9430davidkaplanbitgo wants to merge 1 commit into
davidkaplanbitgo wants to merge 1 commit into
Conversation
Contributor
Comment on lines
+247
to
+255
| /** | ||
| * Whether xpubs / xpub derivation paths must be included alongside a built | ||
| * transaction for cold (offline) signing. | ||
| * @param txHex The built transaction, hex-encoded | ||
| * @returns {boolean} True if xpubs are required, false otherwise | ||
| */ | ||
| needsXpubsForColdSigning(txHex: string): boolean { | ||
| return true; | ||
| } |
Contributor
There was a problem hiding this comment.
is this necessary to include in baseCoin if its only applicable to abstractUtxoCoin?
Contributor
Author
There was a problem hiding this comment.
Ideally could just call this function without needing to also check if it is a UTXO coin
lcovar
previously approved these changes
Aug 5, 2026
davidkaplanbitgo
force-pushed
the
davidkaplan/wcn-1799-remove-xpubs-from-ovc-transaction-downloads-for-cold-utxo
branch
from
August 5, 2026 20:33
48b4acc to
923e1c6
Compare
Adds a coin-level capability so callers can check whether a built transaction requires xpubs/derivation paths for cold signing instead of sniffing tx format themselves. PSBT transactions carry BIP-32 derivation info inline, so xpubs are only needed for legacy UTXO txs. TICKET: WCN-1799
davidkaplanbitgo
force-pushed
the
davidkaplan/wcn-1799-remove-xpubs-from-ovc-transaction-downloads-for-cold-utxo
branch
from
August 5, 2026 20:33
923e1c6 to
f9e5964
Compare
lcovar
approved these changes
Aug 5, 2026
| * @param keychains The user/backup/bitgo keychains for this wallet, in that order | ||
| * @returns The txPrebuild JSON, augmented with `pubs` and `xpubsWithDerivationPath` | ||
| */ | ||
| prepareColdTransaction<T extends TransactionPrebuild>( |
Contributor
There was a problem hiding this comment.
Why does the baseCoin need an implementation at all?
This base implementation assumes multisig, but most of our coins are MPC. For the base method I think we can just return back txPrebuild. For coins that actually need this step, they can override the method in their implementation.
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.
Adds a coin-level capability so callers can check whether a built transaction requires xpubs/derivation paths for cold signing instead of sniffing tx format themselves. PSBT transactions carry BIP-32 derivation info inline, so xpubs are only needed for legacy UTXO txs.
TICKET: WCN-1799