/** * @license * @preserve * * KeeeX SAS Public code * https://keeex.me * Copyright 2013-2023 KeeeX All Rights Reserved. * * These computer program listings and specifications, herein, * are and remain the property of KeeeX SAS. The intellectual * and technical concepts herein are proprietary to KeeeX SAS * and may be covered by EU and foreign patents, * patents in process, trade secrets and copyright law. * * These listings are published as a way to provide third party * with the ability to process KeeeX data. * As such, support for public inquiries is limited. * They are provided "as-is", without warrany of any kind. * * They shall not be reproduced or copied or used in whole or * in part as the basis for manufacture or sale of items unless * prior written permission is obtained from KeeeX SAS. * * For a license agreement, please contact: * * */ import * as btcTypes from "./types.js"; import type * as io from "../shared/io.js"; /** * - Private key string representation is the WIF * - Public key string representation is hex(prefix|x|y) where x and y have fixed 256bit length * - Address is regular bitcoin address * - Signatures are regular bitcoin-message signature format */ export default class BitcoinFormatter implements io.IDataFormatter { #private; private readonly config; constructor(config?: btcTypes.BitcoinKeyConfiguration); privateBytesToString: (privateData: Uint8Array) => Promise; privateStringToBytes: (privateData: string, addressType: btcTypes.AddressType) => Promise>; publicBytesToAddress: (publicData: Uint8Array, forceConfig?: btcTypes.BitcoinKeyConfiguration) => Promise; publicBytesToString: (publicData: Uint8Array) => string; publicStringToBytes: (publicData: string) => io.OutputWithMetadata; signatureBytesToString: (signatureData: Uint8Array) => string; signatureStringToBytes: (signatureData: string) => Uint8Array; messageRawToSignable: (message: Uint8Array, messageFormat: btcTypes.MessageFormat) => Promise; }