UNPKG

@secux/app-btc

Version:
56 lines (52 loc) 1.66 kB
/*! 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. */ /// <reference types="node" /> /// <reference types="node" /> import { PaymentBTC, CoinType } from './payment'; export { PaymentBCH, CoinType }; declare class PaymentBCH extends PaymentBTC { protected static CoinSupported(coin: CoinType): void; /** * Pay to Public Key Hash for BITCOINCASH * @param {CoinType} coin * @param {Buffer} param1 [publickey | hashed publickey] * @returns */ static p2pkh(coin: CoinType, opt: { publickey?: Buffer; hash?: Buffer; }): { address: string; scriptPublickey: Buffer; }; /** * Pay to Script Hash for BITCOINCASH * @param {CoinType} coin * @param {Buffer} opt [redeemScript | hashed redeem] * @returns */ static p2sh(coin: CoinType, opt: { redeemScript?: Buffer; hash?: Buffer; }): { address: string; scriptPublickey: Buffer; }; /** * decode address to script * @param {string} address */ static decode(coin: CoinType, address: string): Buffer; }