Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} from 'Utilities/bitcoin'
import { toHex } from 'Utilities/convert'
import { PaymentTx } from 'Services/Bitcore'
import { HdAccount } from 'Types'
import { AddressFormat } from 'Utilities/addressFormat'
import { bchCashAddrFormat } from 'Utilities/addressFormat/assets/BCH'
export {
Input as TrezorInput,
Output as TrezorOutput,
PublicKey as TrezorPublicKey,
SignedTransaction as TrezorSignedTransaction,
EthereumSignedTransaction as TrezorEthereumSignedTransaction,
}
TrezorConnect.manifest({
email: 'dev@faa.st',
appUrl: 'https://faa.st/app',
})
const requiredAddressFormats: { [symbol: string]: AddressFormat } = {
BCH: bchCashAddrFormat,
}
export function convertAddressFormat(assetSymbol: string, address: string): string {
const format = requiredAddressFormats[assetSymbol]
if (format) {
return format.convert(address)
}
return address
}
multisigAddressType,
MULTISIG_ADDRESS_TYPES,
} from "unchained-bitcoin";
import {
WalletInteraction,
PENDING,
ACTIVE,
INFO,
ERROR,
WARNING,
} from "./interaction";
const TrezorConnect = require("trezor-connect").default;
TrezorConnect.manifest({email: "foo@bar.com", appUrl: "https://localhost:3000"});
/**
* Interaction with Trezor hardware wallets
* @extends {module:interaction.WalletInteraction}
*/
export class TrezorInteraction extends WalletInteraction {
/**
* @param {object} options
* @param {string} options.network - bitcoin network
*/
constructor({network}) {
super({network});
this.trezorCoin = coin(network);
}