How to use the default function from tweetnacl
Find comprehensive JavaScript tweetnacl.default code examples handpicked from public code repositorys.
78 79 80 81 82 83 84 85 86 87const verifySignUserService = (publicKey, nonce, signature) => { const fullMessage = `APTOS\nnonce: ${nonce}\nmessage: ${(0, sha256_1.default)(publicKey)}`; const fullMessage1 = `APTOS\nmessage: ${(0, sha256_1.default)(publicKey)}\nnonce: ${nonce}`; //console.log("fullMessage: ", fullMessage); return (tweetnacl_1.default.sign.detached.verify(Buffer.from(fullMessage), Buffer.from(signature, "hex"), Buffer.from(publicKey, "hex")) || tweetnacl_1.default.sign.detached.verify(Buffer.from(fullMessage1), Buffer.from(signature, "hex"), Buffer.from(publicKey, "hex"))); }; exports.verifySignUserService = verifySignUserService; const getTraderByDayService = (address, fromDate, toDate, chainId) => __awaiter(void 0, void 0, void 0, function* () { const histories = yield (0, history_services_1.getHistoryTraderByDayService)(fromDate, toDate, {
+ 11 other calls in file
tweetnacl.box is the most popular function in tweetnacl (320 examples)