Constructor
new TrezorConfirmMultisigAddress(options)
Most of the information required to confirm a multisig address
lives in the Multisig
object from unchained-bitcoin
.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options argument Properties
|
Example
import {
generateMultisigFromPublicKeys, MAINNET, P2SH,
} from "unchained-bitcoin";
import {TrezorConfirmMultisigAddress} from "unchained-wallets";
const multisig = generateMultisigFromPublicKeys(MAINNET, P2SH, 2, "03a...", "03b...");
const interaction = new TrezorConfirmMultisigAddress({network: MAINNET, bip32Path: "m/45'/0'/0'/0/0", multisig});
await interaction.run();
Extends
Methods
connectParams() → {Array.<function(), Object>}
- Overrides:
- Source:
Returns:
TrezorConnect parameters
- Type
- Array.<function(), Object>
messages() → {Array.<module:interaction.Message>}
Adds messages about BIP32 path warnings.
- Overrides:
- Source:
Returns:
messages for this interaction
- Type
- Array.<module:interaction.Message>
parse() → {void}
Throws an error.
- Overrides:
- Source:
Throws:
An error since this is a direct interaction.
Returns:
- Type
- void
parsePayload(payload) → {Object}
Override this method in a subclass to parse the payload of a successful response from the device.
By default, the entire payload is returned.
Parameters:
Name | Type | Description |
---|---|---|
payload |
Object | the raw payload from the device response |
- Overrides:
- Source:
Returns:
- relevant or formatted data built from the raw payload
- Type
- Object
request() → {void}
Throws an error.
- Overrides:
- Source:
Throws:
An error since this is a direct interaction.
Returns:
- Type
- void
(async) run() → {Promise}
Awaits the call of this.method
, passing in the output of
this.params()
.
If the call returns but is unsuccessful (result.success
) is
false, will throw the returned error message. If some other
error is thrown, it will not be caught.
Otherwise it returns the result of passing result.payload
to
this.parsePayload
.
- Overrides:
- Source:
Returns:
handles the work of calling TrezorConnect
- Type
- Promise