UNPKG

@secux/app-dash

Version:

SecuX Hardware Wallet DASH API

1 lines 1.13 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SecuxDASH=void 0;const e=require("@secux/app-btc"),t=require("ow"),r=require("@secux/utility"),s=require("@secux/app-btc/lib/interface"),o=s.coinmap[s.CoinType.DASH].coinType;class a extends e.SecuxBTC{static addressConvert(...e){return"string"==typeof e[1]?(0,t.default)(e[1],(0,r.ow_strictPath)(o)):e[1].coin=s.CoinType.DASH,super.addressConvert(...e)}static prepareAddress(...e){return(0,t.default)(e[0],(0,r.ow_strictPath)(o)),e[1]&&(e[1].coin=s.CoinType.DASH),super.prepareAddress(...e)}static resolveAddress(...e){return"string"==typeof e[1]?(0,t.default)(e[1],(0,r.ow_strictPath)(o)):e[1].coin=s.CoinType.DASH,super.resolveAddress(...e)}static prepareSign(...e){var s;return e[0].forEach((e=>(0,t.default)(e.path,(0,r.ow_strictPath)(o)))),e[1].to.path&&(0,t.default)(e[1].to.path,(0,r.ow_strictPath)(o)),(null===(s=e[1].utxo)||void 0===s?void 0:s.path)&&(0,t.default)(e[1].utxo.path,(0,r.ow_strictPath)(o)),super.prepareSign(...e)}static resolveTransaction(...e){return e[3]=s.CoinType.DASH,super.resolveTransaction(...e)}}exports.SecuxDASH=a;