Constructor
new ColdcardMultisigSettingsFileParser(options)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options argument Properties
|
- Source:
Extends
Methods
deriveDeeperXpubIfNecessary(result) → {Object}
This method will take the result from the Coldcard JSON and:
- determine which t/U/V/x/Y/Zpub to use
- derive deeper if necessary (and able) using functionality from unchained-bitcoin
Parameters:
Name | Type | Description |
---|---|---|
result |
Object | parsed data from ColdcardJSON |
- Source:
Returns:
the desired xpub (if possible)
- Type
- Object
parse(file) → {Object}
Parse the Coldcard JSON file and do some basic error checking add a field for rootFingerprint (it can sometimes be calculated if not explicitly included)
Parameters:
Name | Type | Description |
---|---|---|
file |
Object | JSON file exported from Coldcard |
- Overrides:
- Source:
Returns:
the parsed response
- Type
- Object
request() → {Object}
Provide the request.
Subclasses may override this function. It can return any kind of object. Strings, data for QR codes, HTTP requests, command lines, functions, &c. are all allowed. Whatever is appropriate for the interaction.
- Overrides:
- Source:
Returns:
the request data
- Type
- Object
(async) run() → {void}
Throws an error.
- Overrides:
- Source:
Throws:
An error since this is an indirect interaction.
Returns:
- Type
- void
validateColdcardBip32Path(bip32Path) → {string}
This validates three things for an incoming Coldcard bip32Path
- Is the bip32path valid syntactically?
- Does the bip32path start with one of the known Coldcard chroots?
- Are there any hardened indices in the relative path below the chroot?
Parameters:
Name | Type | Description |
---|---|---|
bip32Path |
string | bip32Path to validate against Coldcard chroots |
- Source:
Returns:
empty or with the appropriate error message
- Type
- string