@secux/app-btc
Version:
SecuX Hardware Wallet BTC API
18 lines (15 loc) • 1.23 kB
JavaScript
;
/*!
Copyright 2022 SecuX Technology Inc
Copyright Chen Wei-En
Copyright Wu Tsung-Yu
Licensed under the Apache License, Version 2.0 (the License);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an AS IS BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/Object.defineProperty(exports,"__esModule",{value:!0}),exports.CoinType=exports.PaymentGRS=void 0;const payment_1=require("./payment");Object.defineProperty(exports,"CoinType",{enumerable:!0,get:function(){return payment_1.CoinType}});const bs58_1=require("@secux/utility/lib/bs58"),groestl=require("groestl-hash-js");class PaymentGRS extends payment_1.PaymentBTC{static CoinSupported(coin){if(coin!==payment_1.CoinType.GROESTL)throw Error("Not supported cointype")}}exports.PaymentGRS=PaymentGRS,PaymentGRS.bs58check=new bs58_1.bs58Check((function(data){return Buffer.from(groestl.groestl_2(data,1,1))}));