diff options
| author | Adam Soltys <[email protected]> | 2021-05-27 11:30:07 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-06-09 16:06:06 -0700 |
| commit | 57414b3d332e986af6b1ef48136e0d0ef918a95b (patch) | |
| tree | 291f4c7cf5e60683ee6d4af7d41468cb1d3e3e07 /routes | |
| parent | 6bf4bf019f70435bcea1e4bb586f91fec6ddcee5 (diff) | |
| download | coinos-server-57414b3d332e986af6b1ef48136e0d0ef918a95b.tar.gz coinos-server-57414b3d332e986af6b1ef48136e0d0ef918a95b.zip | |
deps cleanup
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/liquid/receive.js | 5 | ||||
| -rw-r--r-- | routes/payments.js | 5 | ||||
| -rw-r--r-- | routes/users.js | 14 |
3 files changed, 5 insertions, 19 deletions
diff --git a/routes/liquid/receive.js b/routes/liquid/receive.js index 05ecc21f..fa7ff7d4 100644 --- a/routes/liquid/receive.js +++ b/routes/liquid/receive.js @@ -4,8 +4,7 @@ const zmq = require("zeromq"); const { Op } = require("sequelize"); const { fromBase58 } = require("bip32"); const bitcoin = require("bitcoinjs-lib"); -const elements = require("elementsjs-lib"); -const { networks } = require("liquidjs-lib"); +const { Block, networks } = require("@asoltys/liquidjs-lib"); const network = networks[ @@ -192,7 +191,7 @@ zmqRawBlock.on("message", async (topic, message, sequence) => { where: { confirmed: 0 } }); - const block = elements.Block.fromHex(message.toString("hex"), true); + const block = Block.fromHex(message.toString("hex"), true); let hash, json; diff --git a/routes/payments.js b/routes/payments.js index e8e94d8a..005223af 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -1,5 +1,4 @@ -const BitcoinCore = require("bitcoin-core"); -const lnd = require("../lib/lnd"); +const BitcoinCore = require("@asoltys/bitcoin-core"); const { Op } = require("sequelize"); const { join } = require("path"); const fs = require("fs"); @@ -93,7 +92,7 @@ ah(async () => { const lnapath = join(require("os").homedir(), ".lightningreg/regtest"); lna = require("clightning-client")(lnapath); } else { - lna = lnd(config.lna); + throw new Error("lnd not supported"); } app.post("/lightning/channel", require("./lightning/channel")); diff --git a/routes/users.js b/routes/users.js index 09ba5d43..71f4b89a 100644 --- a/routes/users.js +++ b/routes/users.js @@ -2,11 +2,10 @@ const axios = require("axios"); const bcrypt = require("bcrypt"); const jwt = require("jsonwebtoken"); const authenticator = require("otplib").authenticator; -const randomWord = require("random-words"); const getAccount = require("../lib/account"); const Sequelize = require("sequelize"); const bitcoin = require("bitcoinjs-lib"); -const liquid = require("liquidjs-lib"); +const liquid = require("@asoltys/liquidjs-lib"); const { fromBase58, fromPrivateKey } = require("bip32"); const { Mutex } = require("async-mutex"); const bip32 = require("bip32"); @@ -46,17 +45,6 @@ app.get( }) ); -app.get( - "/challenge", - ah(async (req, res) => { - const ip = req.headers["x-forwarded-for"] || req.connection.remoteAddress; - challenge[ip] = randomWord(); - l.info("setting up challenge", ip, challenge[ip]); - const data = await textToImage.generate(challenge[ip]); - res.send(data); - }) -); - app.post( "/register", ah(async (req, res) => { |
