UNPKG

turtlecoin-wallet-backend

Version:

[![Build Status](https://travis-ci.org/turtlecoin/turtlecoin-wallet-backend-js.svg?branch=master)](https://travis-ci.org/turtlecoin/turtlecoin-wallet-backend-js)

29 lines (28 loc) 1.17 kB
"use strict"; // Copyright (c) 2018, Zpalmtree // // Please see the included LICENSE file for more information. Object.defineProperty(exports, "__esModule", { value: true }); const turtlecoin_utils_1 = require("turtlecoin-utils"); /** * This needs to be a function, rather than a default export, since our config * can change when a user calls createWallet() with a non default config. * Due to how the module system works, a default export is cached and so the * config will never update. */ function CryptoUtils(config) { return new turtlecoin_utils_1.CryptoNote({ addressPrefix: config.addressPrefix, cnFastHash: config.cnFastHash, coinUnitPlaces: config.decimalPlaces, derivePublicKey: config.derivePublicKey, deriveSecretKey: config.deriveSecretKey, generateKeyDerivation: config.generateKeyDerivation, generateKeyImage: config.generateKeyImage, generateRingSignatures: config.generateRingSignatures, keccakIterations: 1, secretKeyToPublicKey: config.secretKeyToPublicKey, underivePublicKey: config.underivePublicKey, }); } exports.CryptoUtils = CryptoUtils;