diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..668151e --- /dev/null +++ b/.gitignore @@ -0,0 +1,172 @@ +# Please take extra care not to add rules that will make tracked files ignored. +# To test that, run `git ls-files -i --exclude-standard`. +# To check why a specific file is ignored, run `git check-ignore -v `. + +# === Rule for dotfiles === +# Ignore all dotfiles. +.* +# Exclude specific dotfiles that we want to track. +!deps/**/.* +!.devcontainer/ +!.devcontainer/.devcontainer.json +!test/fixtures/**/.* +!.clang-format +!.cpplint +!.editorconfig +!.eslintignore +!.eslintrc.js +!.eslintrc.yaml +!.gitattributes +!.github +!.gitignore +!.gitkeep +!.gitpod.yml +!.mailmap +!.nycrc +!.yamllint.yaml + +# === Rules for root dir === +/core +/vgcore.* +/v8*.log +/perf.data +/perf.data.old +/tags +/tags.* +/doc/api.xml +/node +/node_g +/gon-config.json +/*.exe +/*.swp +/out +/*.msi +/*.wixpdb +/*.qlog +# For GitHub Codespaces +/pythonenv* + +# === Rules for artifacts of `./configure` === +/icu_config.gypi +/config.gypi +/config.status +/config_fips.gypi + +# === Rules for MSVS artifacts === +Debug/ +Release/ +*.sln +*.suo +*.vcxproj* +UpgradeLog*.XML +_UpgradeReport_Files/ +*.sdf +*.opensdf +*.VC.* +*.wixobj +/tools/msvs/genfiles/ +/npm.wxs +/corepack.wxs +/tools/msvs/msi/**/Release/ +/tools/msvs/msi/**/obj/ +/tools/msvs/msi/**/x64/ +# Exclude MSVS files used for .msi file generation +!tools/msvs/msi/**/custom_actions.vcxproj +!tools/msvs/msi/**/nodemsi.sln + +# === Rules for GYP artifacts === +*-nodegyp* +/gyp-*-tool +/test/addons/??_*/ +/*.mk + +# === Rules for other build artifacts === +/email.md +/deps/v8-* +/deps/icu +/deps/icu*.zip +/deps/icu*.tgz +/deps/icu-tmp +./node_modules +/android-toolchain/ +# generated by gyp on Windows +/deps/openssl/openssl.props +/deps/openssl/openssl.targets +/deps/openssl/openssl.xml +/deps/openssl/openssl-fipsmodule.props +/deps/openssl/openssl-fipsmodule.targets +/deps/openssl/openssl-fipsmodule.xml +# generated by gyp on android +/*.target.mk +/*.host.mk +/deps/openssl/openssl.target.mk +/deps/zlib/zlib.target.mk +# generated by MSVC with /P enabled +tools/*/*.i +tools/*/*.i.tmp + +# === Rules for release artifacts === +/*.tar.* +/*.pkg +/SHASUMS*.txt* + +# === Rules for `node_modules` === +!**/node_modules/** +/node_modules +/tools/doc/node_modules +/tools/clang-format/node_modules + +# === Rules for test artifacts === +/*.tap +/*.xml +/v8*-tap.json +/node_trace.*.log +# coverage related +/gcovr +/build +/coverage + +# === Rules for Xcode artifacts === +*.xcodeproj +*.xcworkspace +*.pbxproj + +# === Rules for files in `/deps` === +# Exclude all files in the vendored `npm`. +!/deps/npm/node_modules +# These are not needed and causes issues for distro packagers. +/deps/npm/node_modules/.bin/ +# Respect V8's .gitignore +!deps/v8/** +# Ignore the libuv book +/deps/uv/docs/code/ +/deps/uv/docs/src/guide/ +# Ignore .github directories +/deps/**/.github/ +# Ignore dependencies fetched by tools/v8/fetch_deps.py +/deps/.cipd + +# === Rules for Windows vcbuild.bat === +/temp-vcbuild + +# === Rules for CMake === +cmake-build-debug/ +CMakeCache.txt +CMakeFiles +CTestTestfile.cmake +cmake_install.cmake +install_manifest.txt +*.cbp + +# === Global Rules === +# Keep last to avoid being excluded +*.pyc +__pycache__ +.DS_Store +*~ + +# === Rules for C++ development === +compile_commands.json + +epicboxlib_source/target +config.json \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6a1f647 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "epicboxlib_source/epic-wallet"] + path = epicboxlib_source/epic-wallet + url = https://github.com/EpicCash/epic-wallet.git diff --git a/Doc_2.0.0/ReadMe.md b/Doc_2.0.0/ReadMe.md deleted file mode 100644 index 741fd4a..0000000 --- a/Doc_2.0.0/ReadMe.md +++ /dev/null @@ -1 +0,0 @@ -Protocole 2.0.0 wallet <-> epicbox diff --git a/Doc_2.0.0/epicbox_2.0.0_17_march_2023.pdf b/Doc_2.0.0/epicbox_2.0.0_17_march_2023.pdf deleted file mode 100644 index bfef8c9..0000000 Binary files a/Doc_2.0.0/epicbox_2.0.0_17_march_2023.pdf and /dev/null differ diff --git a/Doc_2.0.0/epicbox_email_like_addresses.pdf b/Doc_2.0.0/epicbox_email_like_addresses.pdf deleted file mode 100644 index 1235c45..0000000 Binary files a/Doc_2.0.0/epicbox_email_like_addresses.pdf and /dev/null differ diff --git a/README.md b/README.md index b2b6829..46575be 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,109 @@ +## Nginx Passthrough/Proxy Example + +To expose your Epicbox Docker service securely on your own domain, use a simple nginx reverse proxy. This allows you to use SSL and a custom domain name. + +### 1. Start Epicbox Docker with Custom Domain + +```sh +EPICBOX_DOMAIN=your-epicbox-domain.example docker compose up -d --build +``` + +### 2. Example nginx Reverse Proxy Configuration + +Place this in your nginx config (e.g., `/etc/nginx/sites-available/epicbox.conf`): + +``` +upstream epicbox_backend { + ip_hash; + server 127.0.0.1:8888 max_fails=3 fail_timeout=10s; + server 127.0.0.1:8889 max_fails=3 fail_timeout=10s; +} +server { + server_name your-epicbox-domain.example www.your-epicbox-domain.example; + + root /var/www/html/epicbox/; + index index.html index.htm; + + location / { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_pass http://epicbox_backend; + proxy_read_timeout 90; + + # WebSocket support + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + access_log /var/log/nginx/epicbox.access.log; + error_log /var/log/nginx/epicbox.error.log; + + listen 443 ssl; + ssl_certificate /etc/letsencrypt/live/your-epicbox-domain.example/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/your-epicbox-domain.example/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; +} +``` + +- Replace `your-epicbox-domain.example` with your actual domain. +- Adjust SSL certificate paths as needed. + +### 3. Reload nginx + +```sh +sudo nginx -s reload +``` + +Now, your domain will securely proxy to your Epicbox Docker service! # epicboxnodejs -Epicbox version on nodejs with elements of rust and adopt changes in epicbox protocole. -Added app_mongo_many.js for run many isntances under one domain. Each instance need use the same mongo database, in all instances adopted fastsend method. -For fastsend method only one of instances must have in config_many.json set fast_send_master=true, slaves ips must be set in array fast_send_slaves. -All instances must have the same epicbox domain and epicbox port set ( correct to your used epicbox.domain ). +Epicbox Relay Server for Epic Cash, built with Node.js and Rust. + +## Docker Quick Start + +1. **Clone the repository and initialize submodules:** + ```sh + git clone + cd epicboxnodejs-source + git submodule update --init --recursive + ``` + +2. **Build and start all services with Docker Compose:** + ```sh + docker compose up -d --build + ``` + +3. **Custom configuration via environment variables:** + You can override key settings at runtime: + ```sh + EPICBOX_DOMAIN=my.domain.com docker compose up -d --build + ``` + - `EPICBOX_DOMAIN`: Sets the domain for epicbox services (default: epicbox.your-domain.com) + - `EPICBOX_PORT`: Sets the port for epicbox services (default: 443) + - `NGINX_PORT`: Sets the external port for nginx (default: 8443) + +4. **Access the service:** + - Open `http://localhost:8443` (or your chosen NGINX_PORT) in your browser. -Instance with set fast_send_master = true can work like independent alone epicbox ( like preverious version app_mongo.js ). +5. **Scaling and failover:** + - Two epicbox instances are started by default (epicbox1 and epicbox2). + - nginx will automatically route requests to available instances. -For each instance so you must use diffirent config_many.json file ( set other local port, or fast_send_master = false etc. ) so to run epicbox use command: +## Configuration Reference -node app_mongo_many.js config_many.json +All major settings can be configured via environment variables or a `.env` file: -And for next one: +``` +EPICBOX_DOMAIN=my.domain.com +EPICBOX_PORT=443 +``` -node app_mongo_many.js config_many_slave1.json +## Advanced -Enjoy. \ No newline at end of file +- MongoDB, nginx, and epicbox instances are all managed via `docker-compose.yml`. +- For custom setups, edit `docker-compose.yml` and `default_config.json` as needed. \ No newline at end of file diff --git a/app_mongo.js b/app_mongo.js index 9ebfdc4..582ce9c 100644 --- a/app_mongo.js +++ b/app_mongo.js @@ -1,154 +1,59 @@ -/* -This is a program for an elite, narrow group of several Epic Box operators in the world. -If you are not one of them, reading this code is pointless. -*/ - -// -// Add indexes in mongo ( the first two for faster finding second to delete slate from database after set seconds ( 7 days in example = 7*24*60*60=) ) -// use epicbox -// db.slates.createIndex({queue:1, made:1, createdat: 1}) -// -// db.slates.createIndex({messageid:1, made:1}) -// -// db.slates.createIndex({ "createdat": 1 }, {expireAfterSeconds: 604800 }) -// - -const fs = require("fs") - -// Html server used for websockets server -const {createServer} = require("http") - -// Used for execute rust module which fast check addreses and verify signatures -const { execFile } = require('node:child_process') - -// For generate uid message id for Slate sending to wallet. -const uid = require('uid2') - -// Websocket for communicate with other epicboxes, and Websocket Server for receive all ws connections from wallets -const { WebSocket, WebSocketServer } = require('ws') - -// Mogodb driver for externally store messageid and slates for ver 2.0.0. of epicbox, tp work with answer by wallet with slate id message -const { MongoClient } = require('mongodb'); - -// Connection URL for mongo, please change if your mongo server is on other location, you can add authorization and open firewall for it. -// each instance of epicbox which you run on your domain must use the same mongodb -- so change to correct ip and remeber open ports in firewall -// it's good idea to add one field (createdat:new Date()) in stored document and set index with timeout which which can delete documents which are old about 3-4 days -// because in special situation when wallet use 2.0.0 and later use older version stored messagid information from mognodb can't be removed by epicbox -var mongourl = "mongodb://localhost:27017" - -var dbName = "epicbox" -var collectionname = "slates" - -var challenge = "7WUDtkSaKyGRUnQ22rE3QUXChV8DmA6NnunDYP4vheTpc" - - -// change to your epicbox domaina -var epicbox_domain = "epicbox.fastepic.eu" -var epicbox_port = 443 - -// change to your port - standard is 3423 - remeber to open locale firewall - in linux sudo ufw 3424 allow -// you can run many instance of this epicbox - simpel copy folder with other name and change this port to next which you want -// remeber to correct set nginx to switch between different instances of epic box - read more in my git about it. -var localepicboxserviceport = 3424 - -// interval for check in intervals if new Slates are for connected wallets ( it is not the same what interval in wallets ! ) -var interval = null - -// time of interval ( ms ) in which epicbox can try repeat send the oldest slate for address. // -var intervalperiod = 4000 // 4 seconds - - -//Where is executable rust named epicboxlib compiled from epicboxlib subfolder -var pathtoepicboxlib = "./epicboxlib" - -// amount of repeats FastSend message to wallet -var fast_send_repeats = 20 - -// interval in ms of repeat FastSend message to wallet -var fast_send_repeat_interval_ms = 1000 - -var varinterval = 1000*60*5; - -//current version of protocol of epicboxnodejs ( wallet can use lower ) -// -const protver = "2.0.0" - -const vardata = fs.readFileSync('config.json', - {encoding:'utf8', flag:'r'}); - - -function getvars(data){ - - try { - - let v = JSON.parse(data) - - // mongourl = v.mongo_url - // dbName = v.mongo_dbName - // collectionname = v.mongo_collection_name - challenge = v.challenge - epicbox_domain = v.epicbox_domain - epicbox_port = v.epicbox_port - localepicboxserviceport = v.local_epicbox_service_port - intervalperiod = v.interval_period_ms - pathtoepicboxlib = v.path_to_epicboxlib_exec_file - fast_send_repeats = v.fast_send_repeats - fast_send_repeat_interval_ms = v.fast_send_repeat_interval_ms - varinterval = v.var_interval - console.log(data) - - } catch(err) { - - console.error(err) - - } - - -} - -getvars(vardata) - -setInterval(()=>{ - - try{ - - fs.readFile('config.json', 'utf8', (err, data) => { - if (err) { - console.error(err); - return; - } - - let v = JSON.parse(data) - - challenge = v.challenge - epicbox_domain = v.epicbox_domain - epicbox_port = v.epicbox_port - localepicboxserviceport = v.local_epicbox_service_port - intervalperiod = v.interval_period_ms - pathtoepicboxlib = v.path_to_epicboxlib_exec_file - fast_send_repeats = v.fast_send_repeats - fast_send_repeat_interval_ms = v.fast_send_repeat_interval_ms - varinterval = v.var_interval - - - }); - +// Add indexes in mongo +// Before start create user and indexes +/* - } catch(err){ - console.error(err) + db.slates.createIndex({queue:1, made:1, createdat: 1}); + db.slates.createIndex({messageid:1, made:1}); + db.slates.createIndex({ "createdat": 1 }, {expireAfterSeconds: 604800 }); + db.createUser( + { + user: "epicbox", + pwd: passwordPrompt(), // or cleartext password + roles: [ + { role: "readWrite", db: "epicbox" }, + { role: "readWrite", db: "epicbox" } + ] } + ); -}, varinterval) - - +*/ +const fs = require("fs"); +const {createServer} = require("http"); +const { execFile } = require('node:child_process'); +const uid = require('uid2'); +const { WebSocket, WebSocketServer } = require('ws'); +const { MongoClient } = require('mongodb'); -const mongoclient = new MongoClient(mongourl) +const customConfig = process.argv.indexOf('--config'); +//this epicbox protocol version +const protver = "3.0.0"; +/** + * @deprecated in wallet version 3.5.2 + * use dynamic challenge strings + */ +const static_challenge = "7WUDtkSaKyGRUnQ22rE3QUXChV8DmA6NnunDYP4vheTpc"; +//used to reference client socket (ws) to public address (epic address) for slate passthroughs +const clients_publicaddress = {}; +const config = { + mongourl: "mongodb://127.0.0.1:27019", + epicbox_domain: process.env.EPICBOX_DOMAIN || "epicbox.your-domain.com", + epicbox_port: process.env.EPICBOX_PORT || 443, + localepicboxserviceport: "3423", + pathtoepicboxlib: "./epicboxlib", + db_name: "epicbox", + collection_name: "slates", + challenge_interval: 60000, + debugMessage: true, + stats: false, + instance_id: process.env.EPICBOX_INSTANCE_ID || 0 +}; +let mongoclient = null; +let collection = null; +let statistics = { -var statistics = { - from: new Date(), connectionsInHour: 0, slatesReceivedInHour: 0, @@ -159,11 +64,9 @@ var statistics = { slatesAttempt:0 } +//clean stats every hour setInterval(()=>{ - - statistics = { - from: new Date(), connectionsInHour: 0, slatesReceivedInHour: 0, @@ -171,832 +74,671 @@ setInterval(()=>{ slatesSentInHour: 0, subscribeInHour: 0, activeconnections: 0, - slatesAttempt:0 + slatesAttempt: 0 } - -},60*60*1000); - - - - -const requestListener = function (req, res) { - res.writeHead(200) - res.end(`\n\ -\n\ -\n\ -Epicbox\n\ -\n\ -\n\ -\n\ -\n\ -

Epicbox servers. Local server number 1

\n\ -

Protocol 2.0.0

\n\ -epic-wallet to build with protocol 2.0.0\n\ -

Asia, Australia - epicbox.hyperbig.com

\n\ -

North America, South America - epicbox.epic.tech

\n\ -

US East Cost - epicbox.epicnet.us

\n\ -

Africa, Europe - epicbox.fastepic.eu

\n\ -
\n\ -

More about Epic

\n\ -Epic Cash main webpage\n\ -
\n\ -
\n\ - Example use in toml file.\n\ -\n\ -
\n\
-\n\
-\n\
-[epicbox]\n\
-epicbox_domain = 'epicbox.fastepic.eu'\n\
-epicbox_port = 443\n\
-epicbox_protocol_unsecure = false\n\
-epicbox_address_index = 0\n\
-epicbox_listener_interval = 10\n\
-\n\
-\n\
-
\n\ -

start listen: epic-wallet listen -m epicbox

\n\ -
\n\ -

\n\ -Epicbox Statistics from ${statistics.from.toUTCString()}:\n\ -

\n\ -

\n\ -connections: ${statistics.connectionsInHour}
\n\ -active connections: ${statistics.activeconnections}
\n\ -subscribes: ${statistics.connectionsInHour}
\n\ -received slates: ${statistics.slatesReceivedInHour}
\n\ -relayed slates: ${statistics.slatesRelayedInHour}
\n\ -sending slate attempts: ${statistics.slatesAttempt}
\n\ -

\n\ -\n\ -`); +}, 60*60*1000); + + +const requestListener = (req, res) => { + res.writeHead(200); + // List of Epicbox endpoints to check + const endpoints = [ + { label: "North America, South America", url: "https://epicbox.epiccash.com" }, + { label: "US East Coast", url: "https://epicbox.epicnet.us" }, + { label: "Epic Mobile Server", url: "https://epicbox.stackwallet.com" } + ]; + const https = require('https'); + let results = []; + let checked = 0; + endpoints.forEach((ep, idx) => { + https.get(ep.url, (resp) => { + let color = resp.statusCode === 200 ? 'green' : 'red'; + results[idx] = ` ${ep.label} - ${ep.url}`; + resp.resume(); + checked++; + if (checked === endpoints.length) sendPage(); + }).on('error', () => { + results[idx] = ` ${ep.label} - ${ep.url}`; + checked++; + if (checked === endpoints.length) sendPage(); + }); + }); + function sendPage() { + res.end(` + + + Epicbox + + + +

Epicbox server (Instance ${config.instance_id})

+

Protocol version ${protver}

+ ${results.join('
')} +
+

More about Epic

+ Epic Cash website +

+ Required epic-wallet.toml settings. +

+                [epicbox]
+                epicbox_domain = '${config.epicbox_domain}'
+                epicbox_port = ${config.epicbox_port}
+                
+

start listen: epic-wallet listen -m epicbox

+
+

Epicbox Statistics from ${statistics.from.toUTCString()}:

+

+ connections: ${statistics.connectionsInHour}
+ active connections: ${statistics.activeconnections}
+ subscribes: ${statistics.connectionsInHour}
+ received slates: ${statistics.slatesReceivedInHour}
+ relayed slates: ${statistics.slatesRelayedInHour}
+ sending slate attempts: ${statistics.slatesAttempt}
+

+ + `); + } } - - - - -// -// HTTMl server creation with function for receives requests -// Used by WebSocketServer -// -const server = createServer(requestListener); - - -// uncommented WebSocket creation with option for zip messages /* -const wss = new WebSocketServer({ - //port: 3425, - server:server, - perMessageDeflate: { - zlibDeflateOptions: { - // See zlib defaults. - chunkSize: 1024, - memLevel: 7, - level: 3 - }, - zlibInflateOptions: { - chunkSize: 10 * 1024 - }, - // Other options settable: - clientNoContextTakeover: true, // Defaults to negotiated value. - serverNoContextTakeover: true, // Defaults to negotiated value. - serverMaxWindowBits: 10, // Defaults to negotiated value. - // Below options specified as default values. - concurrencyLimit: 10, // Limits zlib concurrency for perf. - threshold: 1024 // Size (in bytes) below which messages - // should not be compressed if context takeover is disabled. - } -})*/ - + webserver for port 80 +*/ +const server = createServer(requestListener); -//WebSocket creation using HTTML server +/* + epicbox websocket +*/ const wss = new WebSocketServer({ - server:server, -}) - -// function pon connectione - run when wallets connect by webscoket to epicbox -wss.on('connection', function connection(ws, req) { - - statistics.connectionsInHour = statistics.connectionsInHour+1; - - ws.uid = uid(5); - ws.epicboxver = null; - ws.iphere = null; - // it is taken from nginx - if(req.headers['x-forwarded-for']) ws.iphere = req.headers['x-forwarded-for'].split(',')[0].trim(); - const ip2 = req.socket.remoteAddress; - - console.log(`[${new Date().toLocaleTimeString()}] [${ws.uid}] Connection from ip `, ws.iphere, " nginx/firewall ", ip2) - - ws.queueforsubscribe = null - - - ws.on('close', (code, reason)=>{ - try{ - if(ws.queueforsubscribe!=null) { - console.log(`[${ws.uid}]`," Socket close for ", ws.queueforsubscribe) - ws.queueforsubscribe = null; + server: server, +}); - } - console.log( `[${new Date().toLocaleTimeString()}] Close by code: `, code, " and reason ", reason.toString()) +wss.on('connection', (ws, req) => { - } catch(err){ - console.error(err) + if(config.stats){ + statistics.connectionsInHour++; } - }) - - ws.on('error', (errws) =>{ - console.error(errws) - try{ - - if(ws.queueforsubscribe!=null) { - ws.queueforsubscribe = null; - - } - } catch(err){ - console.error(err) + ws.uid = uid(5); + ws.epicboxver = null; + ws.ip = null; + ws.challenge = null; + ws.epicPublicAddress = null; + //don't send challenges or slates to busy client + ws.process_slate = false; + //count send attempts to client + ws.sendslate_attempts = 0; + ws.max_sendslate_attempts = 0; + ws.pending_challenge = false; + ws.client_details = { + wallet_version: '', + wallet_mode: '', + protocol_version: '' + }; + + + if (req.headers['x-forwarded-for']){ + ws.ip = req.headers['x-forwarded-for'].split(',')[0].trim(); + } else { + ws.ip = req.socket.remoteAddress; } - }); - - - // - // Standard method send by wallets or by epicboxes to epicbox - // one Made is added for receive accept from wallets ( epicbox 2.0.0 suggestion ) - // - ws.on('message', function message(data) { - - // console.log('received: %s', data) - try{ - if(data.toString()=="ping") { ws.send("pong"); /*console.log("ping");*/ return; } - if(data.toString()=="pong") {ws.send("ping"); /*console.log("pong");*/return;} - let json=JSON.parse(data) - - if(json.type=="Challenge") { - console.log(json) - console.log('[%s][%s] -> [%s] send return [%s]', new Date().toLocaleTimeString(), ws.iphere, "Challenge", challenge) - // remove for less move on internet, because Challenge is send automatic in interval but old wallets maybe need it - ws.send(JSON.stringify({"type": "Challenge","str": challenge})) - - } else if(json.type=="Subscribe") { - console.log(json) - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "Subscribe") - subscribe(ws, json) - } else if(json.type=="Unsubscribe") { - console.log(json) - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "Unsubscribe") - unsubscribe(ws, json) - } else if(json.type=="PostSlate"){ - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "PostSlate") - postslate(ws, json) - } else if(json.type=="Made"){ - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "Made") - made(ws, json) - - } else if(json.type=="GetVersion"){ - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "GetVersion") - let st = JSON.stringify({type:"GetVersion", str:protver}) - console.log(st) - ws.send(JSON.stringify({type:"GetVersion", str:protver})) - - } else if(json.type=="FastSend"){ - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "GetVersion") - fastsend(ws) - - } else console.log('received: %s', data); - - } catch(err){ - - } - }); - - // here we send Challenge to wallet or other epicbox when connected - - let jsonhello = {"type":"Challenge","str":challenge} - ws.send(JSON.stringify(jsonhello)); + console.log(`[${new Date().toLocaleTimeString()}] [${ws.uid}] New connection from `, ws.ip); -}); + // send a Challenge to wallet or other epicbox when first time connect + // challenges are send in interval every x seconds later + challenge(ws); + ws.on('close', (code, reason) => { -// -// Start fast send for 5 seconds -// + if(ws.client_details.wallet_mode == 'listener'){ + delete clients_publicaddress[ws.epicPublicAddress]; + } + ws.epicPublicAddress = null; + console.log('[%s] - [%s][%s] -> [%s] code: %s, reason: %s', new Date().toLocaleTimeString(), ws.uid, ws.ip, "Close connection", code, reason.toString()); + }); -async function fastsend(ws){ + ws.on('error', (err) => { + if(ws.client_details.wallet_mode == 'listener'){ + delete clients_publicaddress[ws.epicPublicAddress]; + } + ws.epicPublicAddress = null; + console.log('[%s] - [%s][%s] -> [%s] error: %s', new Date().toLocaleTimeString(), ws.uid, ws.ip, "Error", err); + }); - ws.fastsendcounter = 0; + ws.on('message', (data) => { + let message = null; + + try{ + message = JSON.parse(data); + }catch(err){ + console.log("Error parsing json data from client.", err); + if(ws.client_details.wallet_mode == 'listener'){ + delete clients_publicaddress[ws.epicPublicAddress]; + } + ws.epicPublicAddress = null; + return ws.close(code = 3000, reason = 'Error parsing message.'); + } - ws.fastsendInterval = setInterval(function(){ + let type = message.type; + + /* TODO: + - clients should set version via setVersion type + - split wallet client from epicbox client + */ + switch (type.toLowerCase()) { + case "ping": + ws.send("pong"); + break; + case "pong": + ws.send("ping"); + break; + /** + * @deprecated epicbox protocol version 3.0.0 + * clients should not be allowed to trigger challenge/subscribe requests + */ + case "challenge": + challenge(ws); + break; + case "subscribe": + subscribe(ws, message); + break; + case "unsubscribe": + unsubscribe(ws); + break; + case "postslate": + validatePostslate(ws, message); + break; + //made is send after slate was successfully processed in wallet + case "made": + made(ws, message); + break; + /** + * @deprecated epicbox protocol version 3.0.0 + */ + case "getversion": + ws.send(JSON.stringify({type: "GetVersion", str: protver})) + break; + /** + * @deprecated epicbox protocol version 3.0.0 + */ + case "fastsend": + ws.send(JSON.stringify({type:"Ok"})); + break; + case "clientdetails": + clientdetails(ws, message); + break; + } + //end switch message type - ws.send(JSON.stringify({type:"FastSend"})); - ws.fastsendcounter = ws.fastsendcounter + 1; - if(ws.fastsendcounter>fast_send_repeats) { + console.log('[%s] - [%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.uid, ws.ip, type); + config.debugMessage ? console.log("Message", message) : null; - ws.fastsendcounter = 0; - clearInterval(ws.fastsendInterval); - } - }, fast_send_repeat_interval_ms); - + }); +}); +/* + get current unix timestamp +*/ +const getTimestamp = () => { + return Math.floor(Date.now() / 1000); } -// -// Subscribe function run when wallet send Subscribe message -// -async function subscribe(ws, json){ - console.log(`[${ws.uid}]`," subscribe ", json.address) - - try{ - - // check if wallet wants use ver 2.0.0 - if(json.hasOwnProperty("ver") && json.ver=="2.0.0") ws.epicboxver = "2.0.0"; - - - // start check using externally rust program for verify signature send from wallet - const child = execFile(pathtoepicboxlib, ["verifysignature", json.address , challenge, json.signature], (error, stdout, stderr) => { - if (error) { - throw error; - } - - var isTrueSet = (stdout === 'true'); - - // if sugnature is OK - if(isTrueSet) { - - - -// for backward for older wallets /* - try { - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - - // find message id send in Made message from vallet - collection.find({ queue: json.address, made: false}).sort({ "createdat" : 1 }).limit(1).toArray().then((findResult)=>{ - - - if(findResult.length>0) { - - statistics.slatesAttempt = statistics.slatesAttempt + 1 - console.log("try check and send from subscribe for ", json.address) - - - let fromrabbit = JSON.parse(findResult[0].payload) - let answer= {} - answer.type="Slate" - answer.from = findResult[0].replyto - answer.str = fromrabbit.str - answer.signature = fromrabbit.signature - answer.challenge = fromrabbit.challenge - - let answerstr = null - - if(ws.epicboxver == "2.0.0"){ - - let messageid = findResult[0].messageid - - answer.epicboxmsgid = messageid - answer.ver = ws.epicboxver - answerstr = JSON.stringify(answer) - ws.send(answerstr) - console.log("Sent to 2.0.0 ", json.address) - - } else { - - answerstr = JSON.stringify(answer) - ws.send(answerstr) - console.log("Looks sent to ", json.address) - collection.updateOne({messageid:findResult[0].messageid, made:false}, {$set:{made:true} }).then((updateResult)=>{ - - - }); - - } - - - } else { - // console.log("msgrabbit ", msgrabbit) - //console.log("Error ", err) - } - - - }); - - - } catch(err){ - console.log(err) - } - + send challenge to client. + the first challenge must use the old static challenge string for backward compatibility. + older epicbox clients with protocol version 2.0.0 + new epicbox/clients can use a dynamic challenge. + //TODO if client blocks then this send messages are waiting in the queue + @param {object} ws - Client socket */ -// and for backward for older wallets - - - - statistics.subscribeInHour = statistics.subscribeInHour+1 - if(ws.epicboxver) console.log(ws.epicboxver) - // here we store address of wallet which is queue in RabbitMq - ws.queueforsubscribe = json.address - - ws.send(JSON.stringify({type:"Ok"})) - - } else { - console.log("Signature error") - ws.send(JSON.stringify({type:"Error", kind:"signature error", description:"Signature error"})) - } - }); - - } catch(err){ - console.log(err) - ws.send(JSON.stringify({type:"Error", kind:"signature error", description:"Signature error"})) - } +const challenge = (ws) => { + //we do not know clients epicbox version on first challenge request. + //todo. client should send its version when connect to epicbox via client_details + let challenge = ws.epicboxver == "2.0.0" || ws.epicboxver == null ? static_challenge : uid(32); + ws.challenge = challenge; + ws.send(JSON.stringify({"type": "Challenge", "str": challenge})); + ws.pending_challenge = true; } -// -// run when wallet sent Unsuscribe Message -// -async function unsubscribe(ws, json){ - - try{ - - ws.queueforsubscribe = null; - - // fast send Ok message to wallet, because unsubscribe rather always without error - ws.send(JSON.stringify({type:"Ok"})); //return; - - } catch(e) { - console.log(e) - } - +/* + Information about the clients wallet version, Client command and supported epixbox protocol + @param {object} ws - Client socket + @param {json} message - Client message see epic wallet +*/ +const clientdetails = (ws, message) => { + ws.client_details = message; + ws.send(JSON.stringify({type:"Ok"})); } -// -// Run when wallet or other epicbox want send to epicbox Slate -// it can send to other epicbox when to address domain is differnet when our epicbox domain -// -async function postslate(ws, json){ - - try { - console.log("postslate from ", json.from, "to ", json.to) - - let from = json.from.split('@') - from = from[0] - - // use externally rust program to verify addresses - it is the same which is used to verify signatures - const childadd = execFile(pathtoepicboxlib, ['verifyaddress', json.from, json.to], (erroradr, stdoutadr, stderradr) => { - if(erroradr){ - throw erroradr - } - - var isTrueSetadr = (stdoutadr === 'true'); - - if(isTrueSetadr) { - - // use rust program to verify signatures - const child = execFile(pathtoepicboxlib, ["verifysignature", from , json.str, json.signature], (error, stdout, stderr) => { - - if (error) { - throw error; - } - - var isTrueSet = (stdout === 'true'); - - - if(isTrueSet) { - - statistics.slatesReceivedInHour = statistics.slatesReceivedInHour + 1 - preparePostSlate(ws, json, "") - - } else { - - // check again signatures --- why ? it is rather never used, but it is in orginal rust code. - const child2 = execFile(pathtoepicboxlib, ["verifysignature", from , challenge, json.signature], (error, stdout, stderr) => { - - var isTrueSet2 = (stdout === 'true'); - if(isTrueSet2){ - - statistics.slatesReceivedInHour = statistics.slatesReceivedInHour + 1 - preparePostSlate(ws, json, challenge); - - } else { - ws.send(JSON.stringify({type:"Error", kind:"postslate error", description:"PostSlate error"})) - } - }) - } - - }) - - } else { - ws.send(JSON.stringify({type:"Error", kind:"postslate error", description:"PostSlate Addresses error"})) - - } - }) - +/* + Subscribe + validate client address and send back a pending slate + @param {object} ws - Client socket + @param {json} message - Client message see epic wallet +*/ +const subscribe = (ws, message) => { - } catch(err){ - console.error("postslate ", err) - ws.send(JSON.stringify({type:"Error", kind:"postslate error", description:"PostSlate error"})) + try{ - } + //set used epicbox protocol version + if(message.hasOwnProperty("ver")){ + switch (message.ver) { + case "2.0.0": + ws.epicboxver = "2.0.0"; + break; + default: + //new version is + ws.epicboxver = "3.0.0"; + break; + } + } + // verify that client is the owner of the public key + let args = ["verifysignature", message.address, ws.challenge, message.signature]; + const child = execFile(config.pathtoepicboxlib, args, (error, stdout, stderr) => { + if (error) throw error; + + // if signature is OK + if(stdout === 'true'){ + + if(config.stats){ + statistics.subscribeInHour++; + } + + // client proved that he is the owner of the public address + ws.epicPublicAddress = message.address; + + //add client listener for passthrough slates; + if(clients_publicaddress[ws.epicPublicAddress] == undefined && ws.client_details.wallet_mode == 'listener'){ + clients_publicaddress[ws.epicPublicAddress] = ws; + } + + ws.lastSubscriptionTime = getTimestamp(); + ws.pending_challenge = false; + + //if at some case a made request was not send back from client + //we set 'process_slate' back to false after 3 successfully subscriptions + //and let the client try to process not made slates again. + //max resets are limited to 3 rounds. + if(ws.sendslate_attempts >= 3 && ws.max_sendslate_attempts <= 3){ + ws.sendslate_attempts = 0; + ws.max_sendslate_attempts++; + ws.process_slate = false; + } + + //if it's not possible for client to process not made slates after 3 rounds (=9 attempts), + //then delete all not made slates from client in db + if(ws.max_sendslate_attempts >= 3){ + collection.deleteMany({ queue: ws.epicPublicAddress, made: false}); + ws.sendslate_attempts = 0; + ws.max_sendslate_attempts = 0; + ws.process_slate = false; + } + + //get not processed tx for client + //prevent sending same slate multible times + if(ws.process_slate == false){ + collection.find({ queue: ws.epicPublicAddress, made: false}).sort({ "createdat" : 1 }).limit(1).toArray().then( (res) => { + + if(res && res.length > 0) { + + if(config.stats){ + statistics.slatesAttempt++; + } + + let dbslate = res[0]; + let payload = JSON.parse(dbslate.payload); + let slate = { + type: "Slate", + from: dbslate.replyto, + str: payload.str, + signature: payload.signature, + challenge: payload.challenge, + }; + + if(ws.epicboxver == "2.0.0" || ws.epicboxver == "3.0.0"){ + slate.epicboxmsgid = dbslate.messageid; + slate.ver = ws.epicboxver; + }else{ + collection.updateOne({ messageid:dbslate.messageid }, { $set: { made:true } }); + } + + //TODO: check if this was already send on previous interval to client but client does block + //if client blocks, this will end in multible made requests + //we must set a flag here if the slate to client was already send but client did not process yet for any reasons. + + ws.send(JSON.stringify(slate)); + ws.process_slate = true; + console.log("Sent slate to", ws.epicPublicAddress); + config.debugMessage ? console.log(slate) : null; + + }else{ + + //no slate found but subscribe was ok + ws.send(JSON.stringify({type:"Ok"})); + + } + //end if result > 0 + + }); + }else{ + //send back some response + ws.sendslate_attempts++; + ws.send(JSON.stringify({type:"Ok"})); + } + + }else{ + //client cannot prove that he is the owner of the public address + if(ws.client_details.wallet_mode == 'listener'){ + delete clients_publicaddress[ws.epicPublicAddress]; + } + ws.epicPublicAddress = null; + ws.send(JSON.stringify({type: "Error", kind: "InvalidSignature", description: "Invalid signature."})); + } + }); + + }catch(err){ + console.log("Erro execute epicboxlib", err); + } } +/* + Unsubscribe and close client connection + @param {object} ws - Client socket +*/ +const unsubscribe = (ws) => { -// -// run only for wallets used ver 2.0.0 -// for standard wallets never used -// it say by message Made that slate was received and correct made in wallet -// then epicbox can remove Slate from RabbotMq and message id from mongodb -// -function made(ws, json){ - - console.log(json); - - try { - - if(json.hasOwnProperty("epicboxmsgid") && ws.epicboxver=="2.0.0" && json.hasOwnProperty("ver") && json.ver=="2.0.0"){ - - - // check signature by externally rust app - const child = execFile(pathtoepicboxlib, ["verifysignature", json.address , challenge, json.signature], (error, stdout, stderr) => { - if (error) { - throw error; - } - - var isTrueSet = (stdout === 'true'); - - if(isTrueSet) { - - console.log("Made signature OK") - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - console.log("Update for ", json.epicboxmsgid) - collection.updateOne({messageid:json.epicboxmsgid, made:false}, {$set:{made:true}}).then((updateResult)=>{ - - console.log("make update result ", updateResult) - - //ws.send(JSON.stringify({type:"Ok"})) - - }).catch(console.error) - + if(ws.epicPublicAddress != null){ + if(ws.client_details.wallet_mode == 'listener'){ + delete clients_publicaddress[ws.epicPublicAddress]; } - - }); - - - } - - } catch( err ){ - - console.log(err) - } + ws.epicPublicAddress = null; + ws.close(1000, "Work complete."); + } } +/* + client sends a new tx or a response to an tx + validate address format and signature + @param {object} ws - Client socket + @param {json} message - Client message see epic wallet +*/ +const validatePostslate = (ws, message) => { -// -// run from postslate or forpostpostslat -// prepare received Slate for store in RabbitMq or send to other epicbox if domain of to address is different from this epicbox domain -// -function preparePostSlate(ws, json, chall){ - - let str = JSON.parse(json.str) - let addressto= {} - addressto.publicKey = str.destination.public_key - addressto.domain = str.destination.domain - addressto.port = str.destination.port - if(addressto.port==null ) addressto.port = 443; else addressto.port = Number(addressto.port); - - if(addressto.domain==epicbox_domain && addressto.port===epicbox_port){ - - let signed_payload = {str: json.str, challenge: chall, signature: json.signature} - signed_payload = JSON.stringify(signed_payload) - - let buf = Buffer.from(signed_payload) - let epicboxreplyto = json.from - - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - - - // here insert slate to mongo - here is added messageId which is used in ver. 2.0.0 - - collection.insertOne({ queue:addressto.publicKey, made:false, payload:buf, replyto: epicboxreplyto, createdat: new Date(), expiration:86400000, messageid:uid(32) }).then((insertResult)=>{ - - ws.send(JSON.stringify({type:"Ok"})); - - // fast send if only one slate in database - - // find message id send in Made message from vallet - collection.find({ queue: addressto.publicKey, made: false}).sort({ "createdat" : 1 }).toArray().then((findResult)=>{ - - if(findResult.length==1){ - - - wss.clients.forEach(function each(client) { - if (client.readyState === 1 && client.queueforsubscribe!=null && client.queueforsubscribe==addressto.publicKey) { - - - - statistics.slatesAttempt = statistics.slatesAttempt + 1 - console.log("try check and send ", client.queueforsubscribe) - - - let fromrabbit = JSON.parse(findResult[0].payload) - let answer= {} - answer.type="Slate" - answer.from = findResult[0].replyto - answer.str = fromrabbit.str - answer.signature = fromrabbit.signature - answer.challenge = fromrabbit.challenge - - let answerstr = null - - if(client.epicboxver == "2.0.0"){ - - let messageid = findResult[0].messageid - - answer.epicboxmsgid = messageid - answer.ver = client.epicboxver - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Sent to 2.0.0 ", client.queueforsubscribe) - - } else { + try { + console.log("postslate from ", message.from, "to ", message.to); - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Looks sent to ", client.queueforsubscribe) - collection.updateOne({messageid:findResult[0].messageid, made:false}, {$set:{made:true} }).then((updateResult)=>{ + let publickey = message.from.split('@'); + publickey = publickey[0]; + // use epicboxlib to verify address format + let args = ['verifyaddress', message.from, message.to]; + execFile(config.pathtoepicboxlib, args, (error, stdout, stderr) => { + if(error) throw error; - }); + if(stdout === 'true') { - } - + //verify that the message we receive was signed from publickey + let args = ["verifysignature", publickey, message.str, message.signature]; + execFile(config.pathtoepicboxlib, args, (error, stdout, stderr) => { - + if (error) throw error; + if(stdout === 'true') { - } - }) + if(config.stats){ + statistics.slatesReceivedInHour++; + } + postSlate(ws, message); + }else{ + console.log("Error postslate signature", publickey); + ws.send(JSON.stringify({type: "Error", kind: "InvalidRequest", description: "Error postslate signature."})); } - }) - - }).catch((err)=>{ - - ws.send(JSON.stringify({type:"Error", kind:"Slate send error", description:"Slate problem"})) - console.error(err) - - }) - - + }); + }else{ + console.log("Error validate address format", message.from, message.to); + + ws.send(JSON.stringify({type:"Error", kind:"InvalidRequest", description: `Wrong address format. From: ${message.from}, To: ${message.to}`})); - - } else { - // connect by wss to other epicbox - // when received Challange send by Message PostSlate Slate received from wallet. - // - // - sock = new WebSocket("wss://"+addressto.domain+":"+addressto.port) - sock.on('error', console.error) - sock.on('open', ()=>{console.log("Connect "+addressto.domain+":"+addressto.port)}) - sock.on('message',(mes)=>{ - try{ - ames = JSON.parse(mes) - if(ames.type=="Challenge") { - let reqqq = {type:"PostSlate", from:json.from, to:json.to, str:json.str, signature:json.signature} - sock.send(JSON.stringify(reqqq)) - - fs.writeFile('./test51pool.txt', JSON.stringify(reqqq), err => { - if (err) { - console.error(err); - } - // file written successfully - }); - - console.log("Send to wss://"+addressto.domain+":"+addressto.port) - } - if(ames.type=="Ok") { - statistics.slatesRelayedInHour = statistics.slatesRelayedInHour + 1 - console.log("Sent correct to wss://"+addressto.domain+":"+addressto.port) - ws.send(JSON.stringify({type:"Ok"})); - } - - } catch(ee){ - console.error(ee) - ws.send(JSON.stringify({type:"Error", kind:"Slate send error remote server", description:"Slate problem remote server"})); - } - }) - } + } + }); + }catch(err){ + console.error("Error postslate", err); + } } +/* + client sends made response if successfully processed slate + @param {object} ws - Client socket + @param {json} message - Client message see epic wallet +*/ +const made = (ws, message) => { + + if(ws.epicPublicAddress != null && message.hasOwnProperty("epicboxmsgid") && message.hasOwnProperty("ver") && (message.ver == "2.0.0" || message.ver == "3.0.0")){ + let args = []; + if(message.ver == "3.0.0"){ + args = ["verifysignature", ws.epicPublicAddress, message.epicboxmsgid, message.signature]; + }else{ + args = ["verifysignature", ws.epicPublicAddress, ws.challenge, message.signature]; + } + const child = execFile(config.pathtoepicboxlib, args, (error, stdout, stderr) => { + if (error) throw error; + + if(stdout === 'true') { + console.log("Update for ", message.epicboxmsgid); + collection.updateOne({queue: ws.epicPublicAddress, messageid: message.epicboxmsgid, made:false}, { $set: {made:true}}).then( (updateResult) => { + config.debugMessage ? console.log("DB update result", updateResult) : null; + ws.send(JSON.stringify({type:"Ok"})); + ws.process_slate = false; + ws.sendslate_attempts = 0; + //if this slate was processed then send the next slate to client via challenge->subscribe + challenge(ws); + + }); + }else{ + + ws.send(JSON.stringify({type:"Error", kind:"InvalidSignature", description: `Invalid signature.`})); + } + }); + } +} -// -// function warking in interval repeted in 3 sec. after finish loop -// it check all connected websockets to epicbox and if they are in Subscribe mode check if new Slate are waitng for it -// if new slate is ... when send it. -// check if wallet use 2.0.0 version -// -function forInterval(){ - - clearInterval(interval) - - let foractiveconnections = 0 - - wss.clients.forEach(function each(client) { - if (client.readyState === 1 && client.queueforsubscribe!=null) { - foractiveconnections = foractiveconnections + 1 - //console.log("Checking ", client.queueforsubscribe) - try { - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - - // find message id send in Made message from vallet - collection.find({ queue: client.queueforsubscribe, made: false}).sort({ "createdat" : 1 }).limit(1).toArray().then((findResult)=>{ - - - if(findResult.length>0) { - - statistics.slatesAttempt = statistics.slatesAttempt + 1 - console.log("try check and send ", client.queueforsubscribe) - - - let fromrabbit = JSON.parse(findResult[0].payload) - let answer= {} - answer.type="Slate" - answer.from = findResult[0].replyto - answer.str = fromrabbit.str - answer.signature = fromrabbit.signature - answer.challenge = fromrabbit.challenge - - let answerstr = null - - if(client.epicboxver == "2.0.0"){ - - let messageid = findResult[0].messageid - - answer.epicboxmsgid = messageid - answer.ver = client.epicboxver - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Sent to 2.0.0 ", client.queueforsubscribe) - - } else { - - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Looks sent to ", client.queueforsubscribe) - collection.updateOne({messageid:findResult[0].messageid, made:false}, {$set:{made:true} }).then((updateResult)=>{ - - - }); - - } - - - } else { - // console.log("msgrabbit ", msgrabbit) - //console.log("Error ", err) - } +/* + store tx in db or forward to foreign epicbox + if domain does not match our epicbox domain + @param {object} ws - Client socket + @param {json} message - Client message see epic wallet +*/ +const postSlate = (ws, json) => { - }); + let str = {}; + try{ + str = JSON.parse(json.str); + }catch(err){ + console.log("Error parsing message string", err); + return; + } - - } catch(err){ - console.log(err) + let addressto = {}; + addressto.publicKey = str.destination.public_key; + addressto.domain = str.destination.domain; + addressto.port = str.destination.port != null ? str.destination.port : 443; + + if ( + addressto.domain === config.epicbox_domain && + String(addressto.port) === String(config.epicbox_port) + ) { + + //challenge is not required, we keep it for backward compatibility + let signed_payload = JSON.stringify({str: json.str, challenge: "", signature: json.signature}); + let messageid = uid(32); + collection.insertOne({ + queue: addressto.publicKey, + made: false, + payload: Buffer.from(signed_payload), + replyto: json.from, + createdat: new Date(), + expiration: 86400000, + messageid: messageid + }).catch((err)=>{ + console.error("Error insert to db", err); + }); + + let receiver = clients_publicaddress[addressto.publicKey]; + if(receiver != undefined && receiver.process_slate == false && receiver.readyState === 1){ + if(config.stats){ + statistics.slatesAttempt++; + } + let slate = { + type: "Slate", + from: json.from, + str: json.str, + signature: json.signature, + challenge: "", + }; + if(receiver.epicboxver == "2.0.0" || receiver.epicboxver == "3.0.0"){ + slate.epicboxmsgid = messageid; + slate.ver = receiver.epicboxver; + }else{ + collection.updateOne({ messageid:messageid }, { $set: { made:true } }); + } + ws.send(JSON.stringify({type:"Ok"})); + receiver.send(JSON.stringify(slate)); + receiver.process_slate = true; + console.log("Passthrough slate to", receiver.epicPublicAddress); + config.debugMessage ? console.log(slate) : null; + }else{ + ws.send(JSON.stringify({type:"Ok"})); } - - } + return; // Do not relay externally + } + // Only relay to foreign epicbox domains + sock = new WebSocket("wss://" + addressto.domain +":"+ addressto.port); + sock.on('error', console.error); + sock.on('open', () => { + console.log("Connect "+ addressto.domain +":"+ addressto.port); + }); + sock.on('message', (data) => { + try{ + message = JSON.parse(data); + if(message.type === "Challenge") { + let slate = {type: "PostSlate", from: json.from, to: json.to, str: json.str, signature: json.signature}; + sock.send(JSON.stringify(slate)); + } + if( message.type === "Ok" ) { + if(config.stats){ + statistics.slatesRelayedInHour++; + } + console.log("Sent to wss://"+ addressto.domain +":"+ addressto.port); + ws.send(JSON.stringify({type:"Ok"})); + } + }catch(err){ + console.error("Error forward slate to foreign epicbox", err); + ws.send(JSON.stringify({type: "Error", kind: "InvalidRequest", description: `Error forward slate to foreign epicbox. ToDomain: ${addressto.domain}:${addressto.port}, err: ${err}`})); + } }); - - statistics.activeconnections = foractiveconnections - - interval = setInterval( forInterval, intervalperiod); - } +/* + send recurring challenge -> subscribe cycles to all clients +*/ +const challengeInterval = () => { + + wss.clients.forEach( (ws) => { + + if (ws.readyState === 1 + && ws.epicPublicAddress !== null + //do not spam clients with challenge requests + //do not send new challenge if old challenge request was not subscribed (when client blocks) + && (ws.pending_challenge == false || (getTimestamp() - ws.lastSubscriptionTime >= config.challenge_interval)) + ) { + try{ + + challenge(ws); + }catch(err){ + console.log("Send Interval challenge error ", err); + } + } - -function forIntervalChallenge(){ - - console.log("Challenge Interval") - - wss.clients.forEach(function each(client) { - if (client.readyState === 1 && client.queueforsubscribe!=null && client.epicboxver == "2.0.0") { - - try{ - - client.send(JSON.stringify({"type": "Challenge","str": challenge})) - - } catch(err){ - - console.log("Send Interval challenge error ", err) - } - } }); - } +/* + load config for epixbox custom settings +*/ +const loadConfig = async(filePath) =>{ -// must be replice -let changeStream; -async function run() { - try { - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); + try{ + let jsonData = fs.readFileSync(filePath, 'utf8'); + let data = JSON.parse(jsonData); + + // Priority: ENV > config file > default + config.mongourl = process.env.MONGO_URL || data.mongo_url || config.mongourl; + config.epicbox_domain = process.env.EPICBOX_DOMAIN || data.epicbox_domain || config.epicbox_domain; + config.epicbox_port = process.env.EPICBOX_PORT || data.epicbox_port || config.epicbox_port; + config.localepicboxserviceport = process.env.LOCAL_EPICBOX_SERVICE_PORT || data.local_epicbox_service_port || config.localepicboxserviceport; + config.pathtoepicboxlib = process.env.PATH_TO_EPICBOXLIB_EXEC_FILE || data.path_to_epicboxlib_exec_file || config.pathtoepicboxlib; + config.db_name = process.env.MONGO_DBNAME || data.mongo_dbName || config.db_name; + config.collection_name = process.env.MONGO_COLLECTION_NAME || data.mongo_collection_name || config.collection_name; + config.challenge_interval = process.env.CHALLENGE_INTERVAL || data.challenge_interval || config.challenge_interval; + config.debugMessage = process.env.DEBUG !== undefined ? process.env.DEBUG === 'true' : (data.debug !== undefined ? data.debug : config.debugMessage); + config.stats = process.env.STATS !== undefined ? process.env.STATS === 'true' : (data.stats !== undefined ? data.stats : config.stats); - // Open a Change Stream on the "haikus" collection - changeStream = collection.watch(); - // Print change events - for await (const change of changeStream) { - console.log("Received change:\n", change); + } catch(err){ + console.error(err); } - await changeStream.close(); - - } finally { - console.log("End") - } -} - - -// -// main starting function -// -async function main() { - await mongoclient.connect(); - console.log('Connected successfully to mongo'); +} - //run().catch(console.log); - - server.listen(localepicboxserviceport) - - interval = setInterval( forInterval, 2000); - - setInterval(forIntervalChallenge, 3*60*1000); +const startEpicbox = async() => { - return "Epicbox ready to work."; + let configPath = customConfig != -1 && process.argv[customConfig+1] != undefined ? process.argv[customConfig+1] : './config.json'; + console.log("Use config:", configPath); + await loadConfig(configPath); + mongoclient = new MongoClient(config.mongourl); + let db = mongoclient.db(config.db_name); + collection = db.collection(config.collection_name); + await mongoclient.connect(); + console.log('Connected successfully to MongoDB'); + server.listen(config.localepicboxserviceport); + setInterval(challengeInterval, config.challenge_interval); + console.log("Epicbox ready to work."); } // We are using this single function to handle multiple signals -function handle(signal) { - console.log(`So the signal which I have Received is: ${signal}`); - +const handle = (signal) => { + console.log(`So the signal which I have Received is: ${signal}`); wss.clients.forEach(function each(client) { - client.close(); - }); mongoclient.close(); process.exit() - } - + process.on('SIGINT', handle); process.on('SIGBREAK', handle); //process.on("SIGTERM", handle); //process.on("SIGKILL", handle); - -main() - .then(console.log) - .catch(console.error) - -// That's all -// It is one day created software and seven days finding bugs :))) -// If you has suggestion or something is starnge for you simple ask me on keybase or telegram -// Thank you for reading. Sorry my English. - - - +startEpicbox(); diff --git a/app_mongo_many.js b/app_mongo_many.js deleted file mode 100644 index e7d2819..0000000 --- a/app_mongo_many.js +++ /dev/null @@ -1,1356 +0,0 @@ -/* -This is a program for an elite, narrow group of several Epic Box operators in the world. -If you are not one of them, reading this code is pointless. -*/ - -// -// Add indexes in mongo ( the first two for faster finding second to delete slate from database after set seconds ( 7 days in example = 7*24*60*60=) ) -// use epicbox -// db.slates.createIndex({queue:1, made:1, createdat: 1}) -// -// db.slates.createIndex({messageid:1, made:1}) -// -// db.slates.createIndex({ "createdat": 1 }, {expireAfterSeconds: 604800 }) -// - -const fs = require("fs") - -// Html server used for websockets server -const {createServer} = require("http") - -// Used for execute rust module which fast check addreses and verify signatures -const { execFile } = require('node:child_process') - -// For generate uid message id for Slate sending to wallet. -const uid = require('uid2') - -// Websocket for communicate with other epicboxes, and Websocket Server for receive all ws connections from wallets -const { WebSocket, WebSocketServer } = require('ws') - -// Mogodb driver for externally store messageid and slates for ver 2.0.0. of epicbox, tp work with answer by wallet with slate id message -const { MongoClient } = require('mongodb'); - -// Connection URL for mongo, please change if your mongo server is on other location, you can add authorization and open firewall for it. -// each instance of epicbox which you run on your domain must use the same mongodb -- so change to correct ip and remeber open ports in firewall -// it's good idea to add one field (createdat:new Date()) in stored document and set index with timeout which which can delete documents which are old about 3-4 days -// because in special situation when wallet use 2.0.0 and later use older version stored messagid information from mognodb can't be removed by epicbox -var mongourl = "mongodb://localhost:27017" - -var dbName = "epicbox" -var collectionname = "slates" - -var challenge = "7WUDtkSaKyGRUnQ22rE3QUXChV8DmA6NnunDYP4vheTpc" - - -// change to your epicbox domaina -var epicbox_domain = "epicbox.fastepic.eu" -var epicbox_port = 443 - -// change to your port - standard is 3423 - remeber to open locale firewall - in linux sudo ufw 3424 allow -// you can run many instance of this epicbox - simpel copy folder with other name and change this port to next which you want -// remeber to correct set nginx to switch between different instances of epic box - read more in my git about it. -var localepicboxserviceport = 3424 - -// interval for check in intervals if new Slates are for connected wallets ( it is not the same what interval in wallets ! ) -var interval = null - -// time of interval ( ms ) in which epicbox can try repeat send the oldest slate for address. -// -var intervalperiod = 4000 // 4 seconds - - -//Where is executable rust named epicboxlib compiled from epicboxlib subfolder -var pathtoepicboxlib = "./epicboxlib" - -// amount of repeats FastSend message to wallet -var fast_send_repeats = 20 - -// interval in ms of repeat FastSend message to wallet -var fast_send_repeat_interval_ms = 1000 - -// Is this instance FastSendMaster ? - -var fast_send_master = true; - -// Slaves for FastSendMaster ( used only by Master to remove connection from not trusted instances ) - -var fast_send_slaves = ["::ffff:127.0.0.1"]; - -// where is fast_send_master ip - -var fast_send_master_ip = "localhost" - -// Port under which FastSendMaster works - -var fast_send_port = 3427 - -// interval for read data from config.json -var varinterval = 1000*60*5; - - - -//current version of protocol of epicboxnodejs ( wallet can use lower ) -// -const protver = "2.0.0" - - -if(process.argv[2]==null) process.exit(); - -const vardata = fs.readFileSync('config_many.json', - {encoding:'utf8', flag:'r'}); - - -function getvars(data){ - - try { - - let v = JSON.parse(data) - - mongourl = v.mongo_url - dbName = v.mongo_dbName - collectionname = v.mongo_collection_name - challenge = v.challenge - epicbox_domain = v.epicbox_domain - epicbox_port = v.epicbox_port - localepicboxserviceport = v.local_epicbox_service_port - intervalperiod = v.interval_period_ms - pathtoepicboxlib = v.path_to_epicboxlib_exec_file - fast_send_repeats = v.fast_send_repeats - fast_send_repeat_interval_ms = v.fast_send_repeat_interval_ms - - fast_send_master = v.fast_send_master, - fast_send_slaves = v.fast_send_slaves, - fast_send_master_ip = v.fast_send_master_ip, - fast_send_port = v.fast_send_port - varinterval = v.var_interval - console.log(data) - - } catch(err) { - - console.error(err) - - } - - -} - -getvars(vardata) - - - - -setInterval(()=>{ - - try{ - - fs.readFile('config_many.json', 'utf8', (err, data) => { - if (err) { - console.error(err); - return; - } - - let v = JSON.parse(data) - - challenge = v.challenge - epicbox_domain = v.epicbox_domain - epicbox_port = v.epicbox_port - localepicboxserviceport = v.local_epicbox_service_port - intervalperiod = v.interval_period_ms - pathtoepicboxlib = v.path_to_epicboxlib_exec_file - fast_send_repeats = v.fast_send_repeats - fast_send_repeat_interval_ms = v.fast_send_repeat_interval_ms - fast_send_slaves = v.fast_send_slaves - varinterval = v.var_interval - - - }); - - - } catch(err){ - - console.error(err) - } - -}, varinterval) - - - - -const mongoclient = new MongoClient(mongourl) - - -var statistics = { - - from: new Date(), - connectionsInHour: 0, - slatesReceivedInHour: 0, - slatesRelayedInHour:0, - slatesSentInHour: 0, - subscribeInHour: 0, - activeconnections: 0, - slatesAttempt:0 -} - -setInterval(()=>{ - - - statistics = { - - from: new Date(), - connectionsInHour: 0, - slatesReceivedInHour: 0, - slatesRelayedInHour: 0, - slatesSentInHour: 0, - subscribeInHour: 0, - activeconnections: 0, - slatesAttempt:0 - } - -},60*60*1000); - - - - -const requestListener = function (req, res) { - res.writeHead(200) - res.end(`\n\ -\n\ -\n\ -Epicbox\n\ -\n\ -\n\ -\n\ -\n\ -

Epicbox servers. Local server number 1

\n\ -

Protocol 2.0.0

\n\ -epic-wallet to build with protocol 2.0.0\n\ -

Asia, Australia - epicbox.hyperbig.com

\n\ -

North America, South America - epicbox.epic.tech

\n\ -

US East Cost - epicbox.epicnet.us

\n\ -

Africa, Europe - epicbox.fastepic.eu

\n\ -
\n\ -

More about Epic

\n\ -Epic Cash main webpage\n\ -
\n\ -
\n\ - Example use in toml file.\n\ -\n\ -
\n\
-\n\
-\n\
-[epicbox]\n\
-epicbox_domain = 'epicbox.fastepic.eu'\n\
-epicbox_port = 443\n\
-epicbox_protocol_unsecure = false\n\
-epicbox_address_index = 0\n\
-epicbox_listener_interval = 10\n\
-\n\
-\n\
-
\n\ -

start listen: epic-wallet listen -m epicbox

\n\ -
\n\ -

\n\ -Epicbox Statistics from ${statistics.from.toUTCString()}:\n\ -

\n\ -

\n\ -connections: ${statistics.connectionsInHour}
\n\ -active connections: ${statistics.activeconnections}
\n\ -subscribes: ${statistics.connectionsInHour}
\n\ -received slates: ${statistics.slatesReceivedInHour}
\n\ -relayed slates: ${statistics.slatesRelayedInHour}
\n\ -sending slate attempts: ${statistics.slatesAttempt}
\n\ -

\n\ -\n\ -`); -} - - - -// -// -// FastSend for many instances udner the same domain ( start code ) -// -// - -var ws_fastsend_master = null; -var ws_fastsend = null; - -function startfastsendslave(){ - - - - ws_fastsend = new WebSocket('ws://'+fast_send_master_ip+":"+fast_send_port); - - - - ws_fastsend.on('error', (err)=>{ - - console.log(err) - // if possible restart after 5 mins - // if(!ws_restarted) setTimeout(startfastsendslave, 5*1000*60); - - }); - - ws_fastsend.on('close', (err)=>{ - - // if possible restart after 5 mins - setTimeout(startfastsendslave, 5*1000*60); - - }); - - - - - ws_fastsend.on('open', function open() { - ws_fastsend.send(JSON.stringify({type:"HelloMaster", domain:epicbox_domain, port: epicbox_port })); - }); - - ws_fastsend.on('message', function message(data) { - try{ - - let json = JSON.parse(data) - - if(json.type=="FastSendMasterDomain"){ - - if(json.domain != epicbox_domain || json.port != epicbox_port) { - - console.error("Not good your FastSend Master domain is diffirent from yours. Master have "+json.domain +" port "+json.port ) - console.log("Must disconnect") - ws_fastsend.close(); - - } - - } else if(json.type=="FastSendMessage"){ - - - // check owns connected wallets if could receive this slate - wss.clients.forEach(function each(client) { - if (client.readyState === 1 && client.queueforsubscribe!=null && client.queueforsubscribe==json.queueforsubscribe) { - - - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - - // find message id send without made = false because can be more the same wallet connected .. ???? - // maybe findOne will be better here - collection.find({ messageid: json.uid}).toArray().then((findResult)=>{ - - - if(findResult.length>0){ - - - - statistics.slatesAttempt = statistics.slatesAttempt + 1 - console.log("try check and send ", client.queueforsubscribe) - - - let fromrabbit = JSON.parse(findResult[0].payload) - let answer= {} - answer.type="Slate" - answer.from = findResult[0].replyto - answer.str = fromrabbit.str - answer.signature = fromrabbit.signature - answer.challenge = fromrabbit.challenge - - let answerstr = null - - if(client.epicboxver == "2.0.0"){ - - let messageid = findResult[0].messageid - - answer.epicboxmsgid = messageid - answer.ver = client.epicboxver - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Sent to 2.0.0 ", client.queueforsubscribe) - - } else { - - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Looks sent to ", client.queueforsubscribe) - collection.updateOne({messageid:findResult[0].messageid, made:false}, {$set:{made:true} }).then((updateResult)=>{ - - - }); - - } - - } // end if - - }) // collection find - - } //end if - - })// end wss.clients - - - - - } - - - } catch(err){ - console.error(err) - } - }); - -} - - - -if(fast_send_master) { - - ws_fastsend_master = new WebSocketServer({ port: fast_send_port }); - - ws_fastsend_master.on('connection', function connection(ws, req) { - - if(req.headers['x-forwarded-for']) ws.iphere = req.headers['x-forwarded-for'].split(',')[0].trim(); - const ip2 = req.socket.remoteAddress; - - fast_send_slaves.forEach((slave, index)=>{ - - if(ip2!=slave && ws.iphere!=slave) { - - ws.send(JSON.stringify({type:"ERROR",msg:"I don't trust your ip "+ip2+" or "+ws.iphere})) - - console.log("Untrusted ip: "+ip2+" "+ws.iphere) - - ws.close() - - return; - - - } else { - - console.log("Trusted connected ip: "+ip2+" "+ws.iphere) - - } - - }) - - ws.on('error', console.error); - - ws.on('message', function message(data) { - - try{ - - let json = JSON.parse(data); - - if(json.type=="FastSendMessage") { - - // send message about new slate to slaves received from other slave - ws_fastsend_master.clients.forEach(function each(client) { - if (client !== ws && client.readyState === WebSocket.OPEN) { - client.send(data); - console.log("Send message about new slate to slaves received from other slave") - } - }); - - // check owns connected wallets if could receive this slate - wss.clients.forEach(function each(client) { - if (client.readyState === 1 && client.queueforsubscribe!=null && client.queueforsubscribe==json.queueforsubscribe) { - - console.log("Found wallet where need send Slate - Master") - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - - // find message id send without made = false because can be more the same wallet connected .. ???? - // maybe findOne will be better here - collection.find({ messageid: json.uid}).toArray().then((findResult)=>{ - - - if(findResult.length>0){ - - - - statistics.slatesAttempt = statistics.slatesAttempt + 1 - console.log("try check and send ", client.queueforsubscribe) - - - let fromrabbit = JSON.parse(findResult[0].payload) - let answer= {} - answer.type="Slate" - answer.from = findResult[0].replyto - answer.str = fromrabbit.str - answer.signature = fromrabbit.signature - answer.challenge = fromrabbit.challenge - - let answerstr = null - - if(client.epicboxver == "2.0.0"){ - - let messageid = findResult[0].messageid - - answer.epicboxmsgid = messageid - answer.ver = client.epicboxver - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Sent to 2.0.0 ", client.queueforsubscribe) - - } else { - - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Looks sent to ", client.queueforsubscribe) - collection.updateOne({messageid:findResult[0].messageid, made:false}, {$set:{made:true} }).then((updateResult)=>{ - - - }); - - } - - } // end if - - }) // collection find - - } //end if - - })// end wss.clients - - - } else if (json.type=="HelloMaster"){ - - if(json.domain!=epicbox_domain || json.port!=epicbox_port) { - - ws.send(JSON.stringify({type:"ERROR", msg:"Wrong domain and port. You sent "+json.domain+" port "+json.port+" but correct is "+epicbox_domain +" port "+epicbox_port})) - - console.log("Slave sent wrong epicbox domain or port in HelloMaster command") - - ws.close() - - } else { - - console.log("Slave sent correct domain and port") - } - - } - - - } catch(err){ - - console.log(err) - } - - }); - - ws.send(JSON.stringify({type:"FastSendMasterDomain", domain:epicbox_domain, port: epicbox_port})); - }); - -} else { - - startfastsendslave() -} - - - -// -// -// FastSend for many instances udner the same domain ( end code ) -// - - - -// -// HTTMl server creation with function for receives requests -// Used by WebSocketServer -// -const server = createServer(requestListener); - - -// uncommented WebSocket creation with option for zip messages -/* -const wss = new WebSocketServer({ - //port: 3425, - server:server, - perMessageDeflate: { - zlibDeflateOptions: { - // See zlib defaults. - chunkSize: 1024, - memLevel: 7, - level: 3 - }, - zlibInflateOptions: { - chunkSize: 10 * 1024 - }, - // Other options settable: - clientNoContextTakeover: true, // Defaults to negotiated value. - serverNoContextTakeover: true, // Defaults to negotiated value. - serverMaxWindowBits: 10, // Defaults to negotiated value. - // Below options specified as default values. - concurrencyLimit: 10, // Limits zlib concurrency for perf. - threshold: 1024 // Size (in bytes) below which messages - // should not be compressed if context takeover is disabled. - } -})*/ - - -//WebSocket creation using HTTML server -const wss = new WebSocketServer({ - server:server, -}) - -// function pon connectione - run when wallets connect by webscoket to epicbox -wss.on('connection', function connection(ws, req) { - - statistics.connectionsInHour = statistics.connectionsInHour+1; - - ws.uid = uid(5); - ws.epicboxver = null; - ws.iphere = null; - // it is taken from nginx - if(req.headers['x-forwarded-for']) ws.iphere = req.headers['x-forwarded-for'].split(',')[0].trim(); - const ip2 = req.socket.remoteAddress; - - console.log(`[${new Date().toLocaleTimeString()}] [${ws.uid}] Connection from ip `, ws.iphere, " nginx/firewall ", ip2) - - ws.queueforsubscribe = null - - - ws.on('close', (code, reason)=>{ - try{ - if(ws.queueforsubscribe!=null) { - console.log(`[${ws.uid}]`," Socket close for ", ws.queueforsubscribe) - ws.queueforsubscribe = null; - - } - console.log( `[${new Date().toLocaleTimeString()}] Close by code: `, code, " and reason ", reason.toString()) - - } catch(err){ - console.error(err) - } - - }) - - ws.on('error', (errws) =>{ - console.error(errws) - try{ - - if(ws.queueforsubscribe!=null) { - ws.queueforsubscribe = null; - - } - } catch(err){ - console.error(err) - } - }); - - - // - // Standard method send by wallets or by epicboxes to epicbox - // one Made is added for receive accept from wallets ( epicbox 2.0.0 suggestion ) - // - ws.on('message', function message(data) { - - // console.log('received: %s', data) - try{ - if(data.toString()=="ping") { ws.send("pong"); /*console.log("ping");*/ return; } - if(data.toString()=="pong") {ws.send("ping"); /*console.log("pong");*/return;} - let json=JSON.parse(data) - - if(json.type=="Challenge") { - console.log(json) - console.log('[%s][%s] -> [%s] send return [%s]', new Date().toLocaleTimeString(), ws.iphere, "Challenge", challenge) - // remove for less move on internet, because Challenge is send automatic in interval but old wallets maybe need it - ws.send(JSON.stringify({"type": "Challenge","str": challenge})) - - } else if(json.type=="Subscribe") { - console.log(json) - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "Subscribe") - subscribe(ws, json) - } else if(json.type=="Unsubscribe") { - console.log(json) - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "Unsubscribe") - unsubscribe(ws, json) - } else if(json.type=="PostSlate"){ - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "PostSlate") - postslate(ws, json) - } else if(json.type=="Made"){ - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "Made") - made(ws, json) - - } else if(json.type=="GetVersion"){ - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "GetVersion") - let st = JSON.stringify({type:"GetVersion", str:protver}) - console.log(st) - ws.send(JSON.stringify({type:"GetVersion", str:protver})) - - } else if(json.type=="FastSend"){ - console.log('[%s][%s] -> [%s]', new Date().toLocaleTimeString(), ws.iphere, "GetVersion") - fastsend(ws) - - } else console.log('received: %s', data); - - } catch(err){ - - } - }); - - // here we send Challenge to wallet or other epicbox when connected - - let jsonhello = {"type":"Challenge","str":challenge} - - ws.send(JSON.stringify(jsonhello)); - -}); - - -// -// Start fast send for 5 seconds -// - -async function fastsend(ws){ - - ws.fastsendcounter = 0; - - ws.fastsendInterval = setInterval(function(){ - - ws.send(JSON.stringify({type:"FastSend"})); - ws.fastsendcounter = ws.fastsendcounter + 1; - if(ws.fastsendcounter>fast_send_repeats) { - - ws.fastsendcounter = 0; - clearInterval(ws.fastsendInterval); - } - - }, fast_send_repeat_interval_ms); - - -} - -// -// Subscribe function run when wallet send Subscribe message -// -async function subscribe(ws, json){ - console.log(`[${ws.uid}]`," subscribe ", json.address) - - try{ - - // check if wallet wants use ver 2.0.0 - if(json.hasOwnProperty("ver") && json.ver=="2.0.0") ws.epicboxver = "2.0.0"; - - - // start check using externally rust program for verify signature send from wallet - const child = execFile(pathtoepicboxlib, ["verifysignature", json.address , challenge, json.signature], (error, stdout, stderr) => { - if (error) { - throw error; - } - - var isTrueSet = (stdout === 'true'); - - // if sugnature is OK - if(isTrueSet) { - - - -// for backward for older wallets -/* - try { - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - - // find message id send in Made message from vallet - collection.find({ queue: json.address, made: false}).sort({ "createdat" : 1 }).limit(1).toArray().then((findResult)=>{ - - - if(findResult.length>0) { - - statistics.slatesAttempt = statistics.slatesAttempt + 1 - console.log("try check and send from subscribe for ", json.address) - - - let fromrabbit = JSON.parse(findResult[0].payload) - let answer= {} - answer.type="Slate" - answer.from = findResult[0].replyto - answer.str = fromrabbit.str - answer.signature = fromrabbit.signature - answer.challenge = fromrabbit.challenge - - let answerstr = null - - if(ws.epicboxver == "2.0.0"){ - - let messageid = findResult[0].messageid - - answer.epicboxmsgid = messageid - answer.ver = ws.epicboxver - answerstr = JSON.stringify(answer) - ws.send(answerstr) - console.log("Sent to 2.0.0 ", json.address) - - } else { - - answerstr = JSON.stringify(answer) - ws.send(answerstr) - console.log("Looks sent to ", json.address) - collection.updateOne({messageid:findResult[0].messageid, made:false}, {$set:{made:true} }).then((updateResult)=>{ - - - }); - - } - - - } else { - // console.log("msgrabbit ", msgrabbit) - //console.log("Error ", err) - } - - - }); - - - } catch(err){ - console.log(err) - } - -*/ -// and for backward for older wallets - - - - statistics.subscribeInHour = statistics.subscribeInHour+1 - if(ws.epicboxver) console.log(ws.epicboxver) - // here we store address of wallet which is queue in RabbitMq - ws.queueforsubscribe = json.address - - ws.send(JSON.stringify({type:"Ok"})) - - } else { - console.log("Signature error") - ws.send(JSON.stringify({type:"Error", kind:"signature error", description:"Signature error"})) - } - }); - - } catch(err){ - console.log(err) - ws.send(JSON.stringify({type:"Error", kind:"signature error", description:"Signature error"})) - } -} - - -// -// run when wallet sent Unsuscribe Message -// -async function unsubscribe(ws, json){ - - try{ - - ws.queueforsubscribe = null; - - // fast send Ok message to wallet, because unsubscribe rather always without error - ws.send(JSON.stringify({type:"Ok"})); //return; - - } catch(e) { - console.log(e) - } - -} - - -// -// Run when wallet or other epicbox want send to epicbox Slate -// it can send to other epicbox when to address domain is differnet when our epicbox domain -// -async function postslate(ws, json){ - - try { - console.log("postslate from ", json.from, "to ", json.to) - - let from = json.from.split('@') - from = from[0] - - // use externally rust program to verify addresses - it is the same which is used to verify signatures - const childadd = execFile(pathtoepicboxlib, ['verifyaddress', json.from, json.to], (erroradr, stdoutadr, stderradr) => { - if(erroradr){ - throw erroradr - } - - var isTrueSetadr = (stdoutadr === 'true'); - - if(isTrueSetadr) { - - // use rust program to verify signatures - const child = execFile(pathtoepicboxlib, ["verifysignature", from , json.str, json.signature], (error, stdout, stderr) => { - - if (error) { - throw error; - } - - var isTrueSet = (stdout === 'true'); - - - if(isTrueSet) { - - statistics.slatesReceivedInHour = statistics.slatesReceivedInHour + 1 - preparePostSlate(ws, json, "") - - } else { - - // check again signatures --- why ? it is rather never used, but it is in orginal rust code. - const child2 = execFile(pathtoepicboxlib, ["verifysignature", from , challenge, json.signature], (error, stdout, stderr) => { - - var isTrueSet2 = (stdout === 'true'); - if(isTrueSet2){ - - statistics.slatesReceivedInHour = statistics.slatesReceivedInHour + 1 - preparePostSlate(ws, json, challenge); - - } else { - ws.send(JSON.stringify({type:"Error", kind:"postslate error", description:"PostSlate error"})) - } - }) - } - - }) - - } else { - ws.send(JSON.stringify({type:"Error", kind:"postslate error", description:"PostSlate Addresses error"})) - - } - }) - - - } catch(err){ - console.error("postslate ", err) - ws.send(JSON.stringify({type:"Error", kind:"postslate error", description:"PostSlate error"})) - - } - -} - - - -// -// run only for wallets used ver 2.0.0 -// for standard wallets never used -// it say by message Made that slate was received and correct made in wallet -// then epicbox can remove Slate from RabbotMq and message id from mongodb -// -function made(ws, json){ - - console.log(json); - - try { - - if(json.hasOwnProperty("epicboxmsgid") && ws.epicboxver=="2.0.0" && json.hasOwnProperty("ver") && json.ver=="2.0.0"){ - - - // check signature by externally rust app - const child = execFile(pathtoepicboxlib, ["verifysignature", json.address , challenge, json.signature], (error, stdout, stderr) => { - if (error) { - throw error; - } - - var isTrueSet = (stdout === 'true'); - - if(isTrueSet) { - - console.log("Made signature OK") - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - console.log("Update for ", json.epicboxmsgid) - collection.updateOne({messageid:json.epicboxmsgid, made:false}, {$set:{made:true}}).then((updateResult)=>{ - - console.log("make update result ", updateResult) - - //ws.send(JSON.stringify({type:"Ok"})) - - }).catch(console.error) - - } - - }); - - - } - - } catch( err ){ - - console.log(err) - } - -} - - - -// -// run from postslate or forpostpostslat -// prepare received Slate for store in RabbitMq or send to other epicbox if domain of to address is different from this epicbox domain -// -function preparePostSlate(ws, json, chall){ - - let str = JSON.parse(json.str) - let addressto= {} - addressto.publicKey = str.destination.public_key - addressto.domain = str.destination.domain - addressto.port = str.destination.port - if(addressto.port==null ) addressto.port = 443; else addressto.port = Number(addressto.port); - - if(addressto.domain==epicbox_domain && addressto.port===epicbox_port){ - - let signed_payload = {str: json.str, challenge: chall, signature: json.signature} - signed_payload = JSON.stringify(signed_payload) - - let buf = Buffer.from(signed_payload) - let epicboxreplyto = json.from - - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - - - // here insert slate to mongo - here is added messageId which is used in ver. 2.0.0 - - let newuid = uid(32) - - collection.insertOne({ queue:addressto.publicKey, made:false, payload:buf, replyto: epicboxreplyto, createdat: new Date(), expiration:86400000, messageid:newuid }).then((insertResult)=>{ - - ws.send(JSON.stringify({type:"Ok"})); - - // for many instances in one domain - if(fast_send_master) { - - try{ - // send a message about new slate to my slaves - ws_fastsend_master.clients.forEach(function each(client) { - if (client.readyState === WebSocket.OPEN) { - client.send(JSON.stringify({type:"FastSendMessage", uid:newuid, queueforsubscribe: addressto.publicKey })); - console.log("Send FastSendMessage to slave ...") - } - }); - - } catch(errtoslaves){ - - //console.log(errtoslaves) - } - - - } else { - - // I am only slave and must send a message to master - - try{ - - ws_fastsend.send(JSON.stringify({type:"FastSendMessage", uid:newuid, queueforsubscribe: addressto.publicKey })) - console.log("Send FastSendMessage to Master ...") - - } catch(errtomaster){ - - //console.log(errtomaster) - } - - } - // end for many instances in one domain - - // fast send if only one slate in database - - // find message id send in Made message from vallet - collection.find({ queue: addressto.publicKey, made: false}).sort({ "createdat" : 1 }).toArray().then((findResult)=>{ - - if(findResult.length==1){ - - - wss.clients.forEach(function each(client) { - if (client.readyState === 1 && client.queueforsubscribe!=null && client.queueforsubscribe==addressto.publicKey) { - - - - statistics.slatesAttempt = statistics.slatesAttempt + 1 - console.log("try check and send ", client.queueforsubscribe) - - - let fromrabbit = JSON.parse(findResult[0].payload) - let answer= {} - answer.type="Slate" - answer.from = findResult[0].replyto - answer.str = fromrabbit.str - answer.signature = fromrabbit.signature - answer.challenge = fromrabbit.challenge - - let answerstr = null - - if(client.epicboxver == "2.0.0"){ - - let messageid = findResult[0].messageid - - answer.epicboxmsgid = messageid - answer.ver = client.epicboxver - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Sent to 2.0.0 ", client.queueforsubscribe) - - } else { - - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Looks sent to ", client.queueforsubscribe) - collection.updateOne({messageid:findResult[0].messageid, made:false}, {$set:{made:true} }).then((updateResult)=>{ - - - }); - - } - - - - - - } - }) - - - } - - }) - - }).catch((err)=>{ - - ws.send(JSON.stringify({type:"Error", kind:"Slate send error", description:"Slate problem"})) - console.error(err) - - }) - - - - - - } else { - // connect by wss to other epicbox - // when received Challange send by Message PostSlate Slate received from wallet. - // - // - sock = new WebSocket("wss://"+addressto.domain+":"+addressto.port) - sock.on('error', console.error) - sock.on('open', ()=>{console.log("Connect "+addressto.domain+":"+addressto.port)}) - sock.on('message',(mes)=>{ - try{ - ames = JSON.parse(mes) - if(ames.type=="Challenge") { - let reqqq = {type:"PostSlate", from:json.from, to:json.to, str:json.str, signature:json.signature} - sock.send(JSON.stringify(reqqq)) - - fs.writeFile('./test51pool.txt', JSON.stringify(reqqq), err => { - if (err) { - console.error(err); - } - // file written successfully - }); - - console.log("Send to wss://"+addressto.domain+":"+addressto.port) - } - if(ames.type=="Ok") { - statistics.slatesRelayedInHour = statistics.slatesRelayedInHour + 1 - console.log("Sent correct to wss://"+addressto.domain+":"+addressto.port) - ws.send(JSON.stringify({type:"Ok"})); - } - - } catch(ee){ - console.error(ee) - ws.send(JSON.stringify({type:"Error", kind:"Slate send error remote server", description:"Slate problem remote server"})); - } - }) - } - - -} - - - -// -// function warking in interval repeted in 3 sec. after finish loop -// it check all connected websockets to epicbox and if they are in Subscribe mode check if new Slate are waitng for it -// if new slate is ... when send it. -// check if wallet use 2.0.0 version -// -function forInterval(){ - - clearInterval(interval) - - let foractiveconnections = 0 - - wss.clients.forEach(function each(client) { - if (client.readyState === 1 && client.queueforsubscribe!=null) { - foractiveconnections = foractiveconnections + 1 - //console.log("Checking ", client.queueforsubscribe) - try { - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - - // find message id send in Made message from vallet - collection.find({ queue: client.queueforsubscribe, made: false}).sort({ "createdat" : 1 }).limit(1).toArray().then((findResult)=>{ - - - if(findResult.length>0) { - - statistics.slatesAttempt = statistics.slatesAttempt + 1 - console.log("try check and send ", client.queueforsubscribe) - - - let fromrabbit = JSON.parse(findResult[0].payload) - let answer= {} - answer.type="Slate" - answer.from = findResult[0].replyto - answer.str = fromrabbit.str - answer.signature = fromrabbit.signature - answer.challenge = fromrabbit.challenge - - let answerstr = null - - if(client.epicboxver == "2.0.0"){ - - let messageid = findResult[0].messageid - - answer.epicboxmsgid = messageid - answer.ver = client.epicboxver - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Sent to 2.0.0 ", client.queueforsubscribe) - - } else { - - answerstr = JSON.stringify(answer) - client.send(answerstr) - console.log("Looks sent to ", client.queueforsubscribe) - collection.updateOne({messageid:findResult[0].messageid, made:false}, {$set:{made:true} }).then((updateResult)=>{ - - - }); - - } - - - } else { - // console.log("msgrabbit ", msgrabbit) - //console.log("Error ", err) - } - - - }); - - - } catch(err){ - console.log(err) - } - - } - - }); - - statistics.activeconnections = foractiveconnections - - interval = setInterval( forInterval, intervalperiod); - -} - - - -function forIntervalChallenge(){ - - console.log("Challenge Interval") - - wss.clients.forEach(function each(client) { - if (client.readyState === 1 && client.queueforsubscribe!=null && client.epicboxver == "2.0.0") { - - try{ - - client.send(JSON.stringify({"type": "Challenge","str": challenge})) - - } catch(err){ - - console.log("Send Interval challenge error ", err) - } - } - }); - - -} - - - -// must be replice -let changeStream; -async function run() { - try { - - const db = mongoclient.db(dbName); - const collection = db.collection(collectionname); - - // Open a Change Stream on the "haikus" collection - changeStream = collection.watch(); - // Print change events - for await (const change of changeStream) { - console.log("Received change:\n", change); - } - await changeStream.close(); - - } finally { - console.log("End") - } -} - - -// -// main starting function -// -async function main() { - - await mongoclient.connect(); - console.log('Connected successfully to mongo'); - - //run().catch(console.log); - - server.listen(localepicboxserviceport) - - interval = setInterval( forInterval, 2000); - - setInterval(forIntervalChallenge, 3*60*1000); - - return "Epicbox ready to work."; - -} - - -// We are using this single function to handle multiple signals -function handle(signal) { - console.log(`So the signal which I have Received is: ${signal}`); - - - wss.clients.forEach(function each(client) { - - client.close(); - - }); - - mongoclient.close(); - process.exit() - -} - -process.on('SIGINT', handle); -process.on('SIGBREAK', handle); -//process.on("SIGTERM", handle); -//process.on("SIGKILL", handle); - - -main() - .then(console.log) - .catch(console.error) - -// That's all -// It is one day created software and seven days finding bugs :))) -// If you has suggestion or something is starnge for you simple ask me on keybase or telegram -// Thank you for reading. Sorry my English. - - - diff --git a/config.json b/config.json deleted file mode 100644 index a5cfb1e..0000000 --- a/config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "mongo_url": "mongodb://localhost:2701", - "mongo_dbName": "epicbox", - "mongo_collection_name": "slates", - "challenge": "7WUDtkSaKyGRUnQ22rE3QUXChV8DmA6NnunDYP4vheTpc", - "epicbox_domain": "epicbox.fastepic.eu", - "epicbox_port": 443, - "local_epicbox_service_port": 3424, - "interval_period_ms": 4000, - "path_to_epicboxlib_exec_file": "./epicboxlib", - "fast_send_repeats": 20, - "fast_send_repeat_interval_ms": 1000, - "var_interval": 300000 -} \ No newline at end of file diff --git a/config_many.json b/config_many.json deleted file mode 100644 index 3542f67..0000000 --- a/config_many.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "mongo_url": "mongodb://localhost:27017", - "mongo_dbName": "epicbox", - "mongo_collection_name": "slates", - "challenge": "7WUDtkSaKyGRUnQ22rE3QUXChV8DmA6NnunDYP4vheTpc", - "epicbox_domain": "epicbox.fastepic.eu", - "epicbox_port": 443, - "local_epicbox_service_port": 3424, - "interval_period_ms": 4000, - "path_to_epicboxlib_exec_file": "./epicboxlib", - "fast_send_repeats": 20, - "fast_send_repeat_interval_ms": 1000, - "fast_send_master": true, - "fast_send_slaves": [ - "::ffff:127.0.0.1" - ], - "fast_send_master_ip": "localhost", - "fast_send_port": 3427, - "var_interval": 300000 -} diff --git a/default_config.json b/default_config.json new file mode 100644 index 0000000..9e71f64 --- /dev/null +++ b/default_config.json @@ -0,0 +1,12 @@ +{ + "mongo_url": "mongodb://epicbox:epicboxpass@mongodb:27017/epicbox?authSource=epicbox", + "mongo_dbName": "epicbox", + "mongo_collection_name": "slates", + "epicbox_domain": "epicbox.your-domain.com", + "epicbox_port": 443, + "local_epicbox_service_port": 3423, + "path_to_epicboxlib_exec_file": "./epicboxlib", + "challenge_interval": 60000, + "debug": false, + "stats": false +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e0b16f9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,63 @@ +# Use the official MongoDB image +version: '3.8' +services: + mongodb: + image: mongo:6.0 + container_name: mongodb + restart: always + # ports section removed; not needed for internal Docker Compose networking + environment: + - MONGO_INITDB_ROOT_USERNAME=root + - MONGO_INITDB_ROOT_PASSWORD=rootpass + - MONGO_INITDB_DATABASE=epicbox + volumes: + - mongo_data:/data/db + - ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro + + epicbox1: + build: + context: . + dockerfile: epicbox/Dockerfile + container_name: epicbox1 + restart: always + environment: + - MONGO_URL=mongodb://epicbox:epicboxpass@mongodb:27017/epicbox?authSource=epicbox + - EPICBOX_INSTANCE_ID=1 + - EPICBOX_DOMAIN=${EPICBOX_DOMAIN:-epicbox.your-domain.com} + - EPICBOX_PORT=${EPICBOX_PORT:-443} + depends_on: + - mongodb + ports: + - "8888:3423" + + epicbox2: + build: + context: . + dockerfile: epicbox/Dockerfile + container_name: epicbox2 + restart: always + environment: + - MONGO_URL=mongodb://epicbox:epicboxpass@mongodb:27017/epicbox?authSource=epicbox + - EPICBOX_INSTANCE_ID=2 + - EPICBOX_DOMAIN=${EPICBOX_DOMAIN:-epicbox.your-domain.com} + - EPICBOX_PORT=${EPICBOX_PORT:-443} + depends_on: + - mongodb + ports: + - "8889:3423" + + nginx: + image: nginx:alpine + container_name: nginx + restart: always + ports: + - "8443:443" + entrypoint: ["/bin/sh", "-c", "envsubst < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;'"] + volumes: + - ./nginx/nginx.conf.template:/etc/nginx/nginx.conf.template:ro + depends_on: + - epicbox1 + - epicbox2 + +volumes: + mongo_data: diff --git a/epicbox/Dockerfile b/epicbox/Dockerfile new file mode 100644 index 0000000..0e84963 --- /dev/null +++ b/epicbox/Dockerfile @@ -0,0 +1,73 @@ + + +# ---- Builder Stage ---- +FROM debian:stable-slim AS builder + +# Install Rust and build dependencies +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + curl \ + ca-certificates \ + clang \ + libclang-dev \ + llvm-dev \ + libncursesw6 \ + cmake \ + build-essential \ + git \ + libssl-dev \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* + +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" + +WORKDIR /usr/src/epicboxlib_source + +# Copy the binary crate and its library dependency +COPY epicboxlib_source/Cargo.toml ./Cargo.toml +COPY epicboxlib_source/Cargo.lock ./Cargo.lock +COPY epicboxlib_source/src ./src +COPY epicboxlib_source/epicboxlib ./epicboxlib +# Copy epic-wallet submodule and its dependencies for local path resolution +COPY epicboxlib_source/epic-wallet ./epic-wallet + +RUN cargo build --release + +# ---- Runtime Stage ---- +FROM debian:stable-slim + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + locales \ + openssl \ + libncursesw6 \ + nodejs \ + npm \ + && rm -rf /var/lib/apt/lists/* + +RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ + locale-gen + +ENV LANG=en_US.UTF-8 + +WORKDIR /usr/src/app + +# Copy Node.js app files +COPY package*.json ./ +COPY . . + +# Copy default_config.json as config.json for app compatibility +COPY default_config.json ./config.json + +# Copy the Rust binary from the builder stage +COPY --from=builder /usr/src/epicboxlib_source/target/release/epicboxlib ./epicboxlib + +RUN chmod +x ./epicboxlib + +# Install Node.js dependencies +RUN npm install --production + +EXPOSE 3000 + +CMD ["npm", "start"] diff --git a/epicbox/Dockerfile.alt b/epicbox/Dockerfile.alt new file mode 100644 index 0000000..feedadd --- /dev/null +++ b/epicbox/Dockerfile.alt @@ -0,0 +1,81 @@ +# Dockerfile for epic-epicbox +# ---- Builder Stage ---- +FROM debian:stable-slim AS builder + +# Install Rust and build dependencies +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + curl \ + ca-certificates \ + clang \ + libclang-dev \ + llvm-dev \ + libncursesw6 \ + cmake \ + build-essential \ + git \ + libssl-dev \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* + +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" + WORKDIR . + +# Copy the binary crate and its library dependency +COPY epicboxlib_source/Cargo.toml ./Cargo.toml +COPY epicboxlib_source/Cargo.lock ./Cargo.lock +COPY epicboxlib_source/src ./src +COPY epicboxlib_source/epicboxlib ./epicboxlib + +# Copy epic-wallet submodule and its dependencies for local path resolution +COPY epicboxlib_source/epic-wallet ./epic-wallet + +RUN cargo build --release + +FROM node:18-alpine AS builder2 +COPY package*.json . +COPY app_mongo.js . +RUN npm install +RUN npm install -g pkg +RUN pkg -t node18-linux-x64 -o epicbox.bin app_mongo.js + +# ---- Runtime Stage ---- +FROM debian:stable-slim + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + sudo \ + locales \ + openssl \ + libncursesw6 \ + && rm -rf /var/lib/apt/lists/* + +RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ + locale-gen + +ENV LANG=en_US.UTF-8 + +RUN useradd -u 1001 -G sudo -U -m -s /bin/bash epicsvcs \ + && echo "epicsvcs ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoersUSER epicsvcs + +WORKDIR /home/epicsvcs + +# Copy binaries +COPY --from=builder target/release/epicboxlib . +COPY --from=builder2 epicbox.bin ./epicbox + +# Copy default_config.json as config.json for app compatibility +COPY --chown=epicsvcs:epicsvcs default_config.json ./config.json + +RUN chown epicsvcs:epicsvcs ./epicboxlib +RUN chown epicsvcs:epicsvcs ./epicbox + +RUN chmod +x ./epicboxlib +RUN chmod +x ./epicbox + +EXPOSE 3000 +USER epicsvcs + +CMD ["./epicbox", "config.json"] + diff --git a/epicboxlib/Cargo.toml b/epicboxlib/Cargo.toml deleted file mode 100644 index db69521..0000000 --- a/epicboxlib/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "epicboxlib" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] - -epicboxlib = { path = "./epicboxlib" } diff --git a/epicboxlib/epicboxlib/src/error/error_kind.rs b/epicboxlib/epicboxlib/src/error/error_kind.rs deleted file mode 100644 index 41786e4..0000000 --- a/epicboxlib/epicboxlib/src/error/error_kind.rs +++ /dev/null @@ -1,34 +0,0 @@ -use failure::Fail; -use crate::types::EpicboxError; - -#[derive(Clone, Eq, PartialEq, Debug, Fail)] -pub enum ErrorKind { - #[fail(display = "\x1b[31;1merror:\x1b[0m {}", 0)] - GenericError(String), - #[fail(display = "\x1b[31;1merror:\x1b[0m secp error")] - SecpError, - #[fail(display = "\x1b[31;1merror:\x1b[0m invalid character!")] - InvalidBase58Character(char, usize), - #[fail(display = "\x1b[31;1merror:\x1b[0m invalid length!")] - InvalidBase58Length, - #[fail(display = "\x1b[31;1merror:\x1b[0m invalid checksum!")] - InvalidBase58Checksum, - #[fail(display = "\x1b[31;1merror:\x1b[0m invalid network!")] - InvalidBase58Version, - #[fail(display = "\x1b[31;1merror:\x1b[0m invalid key!")] - InvalidBase58Key, - #[fail(display = "\x1b[31;1merror:\x1b[0m could not parse number from string!")] - NumberParsingError, - #[fail(display = "\x1b[31;1merror:\x1b[0m could not parse `{}` to a epicbox address!", 0)] - EpicboxAddressParsingError(String), - #[fail(display = "\x1b[31;1merror:\x1b[0m unable to encrypt message")] - Encryption, - #[fail(display = "\x1b[31;1merror:\x1b[0m unable to decrypt message")] - Decryption, - #[fail(display = "\x1b[31;1merror:\x1b[0m unable to verify proof")] - VerifyProof, - #[fail(display = "\x1b[31;1merror:\x1b[0m epicbox websocket terminated unexpectedly!")] - EpicboxWebsocketAbnormalTermination, - #[fail(display = "\x1b[31;1merror:\x1b[0m epicbox protocol error `{}`", 0)] - EpicboxProtocolError(EpicboxError), -} diff --git a/epicboxlib/epicboxlib/src/error/mod.rs b/epicboxlib/epicboxlib/src/error/mod.rs deleted file mode 100644 index f224f83..0000000 --- a/epicboxlib/epicboxlib/src/error/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -mod error_kind; -mod result; - -pub use error_kind::ErrorKind; -pub use result::Result; -pub use failure::Error; \ No newline at end of file diff --git a/epicboxlib/epicboxlib/src/error/result.rs b/epicboxlib/epicboxlib/src/error/result.rs deleted file mode 100644 index 805da7a..0000000 --- a/epicboxlib/epicboxlib/src/error/result.rs +++ /dev/null @@ -1,3 +0,0 @@ -use failure::Error; - -pub type Result = std::result::Result; \ No newline at end of file diff --git a/epicboxlib/epicboxlib/src/types/epicbox_message.rs b/epicboxlib/epicboxlib/src/types/epicbox_message.rs deleted file mode 100644 index abd0d6d..0000000 --- a/epicboxlib/epicboxlib/src/types/epicbox_message.rs +++ /dev/null @@ -1,85 +0,0 @@ -use rand::{Rng, thread_rng}; -use ring::{aead, digest, pbkdf2}; - -use crate::error::{ErrorKind, Result}; -use crate::utils::{from_hex, to_hex}; -use crate::utils::secp::{Secp256k1, PublicKey, SecretKey}; -use crate::types::EpicboxAddress; - -#[derive(Debug, Serialize, Deserialize)] -pub struct EpicboxMessage { - #[serde(default)] - pub destination: Option, - encrypted_message: String, - salt: String, - nonce: String, -} - -impl EpicboxMessage { - pub fn new( - message: String, - destination: &EpicboxAddress, - receiver_public_key: &PublicKey, - secret_key: &SecretKey, - ) -> Result { - let secp = Secp256k1::new(); - let mut common_secret = receiver_public_key.clone(); - common_secret - .mul_assign(&secp, secret_key) - .map_err(|_| ErrorKind::Encryption)?; - let common_secret_ser = common_secret.serialize_vec(&secp, true); - let common_secret_slice = &common_secret_ser[1..33]; - - let salt: [u8; 8] = thread_rng().gen(); - let nonce: [u8; 12] = thread_rng().gen(); - let mut key = [0; 32]; - pbkdf2::derive(&digest::SHA512, 100, &salt, common_secret_slice, &mut key); - let mut enc_bytes = message.as_bytes().to_vec(); - let suffix_len = aead::CHACHA20_POLY1305.tag_len(); - for _ in 0..suffix_len { - enc_bytes.push(0); - } - let sealing_key = aead::SealingKey::new(&aead::CHACHA20_POLY1305, &key) - .map_err(|_| ErrorKind::Encryption)?; - aead::seal_in_place(&sealing_key, &nonce, &[], &mut enc_bytes, suffix_len) - .map_err(|_| ErrorKind::Encryption)?; - - Ok(EpicboxMessage { - destination: Some(destination.clone()), - encrypted_message: to_hex(enc_bytes), - salt: to_hex(salt.to_vec()), - nonce: to_hex(nonce.to_vec()), - }) - } - - pub fn key(&self, sender_public_key: &PublicKey, secret_key: &SecretKey) -> Result<[u8; 32]> { - let salt = from_hex(self.salt.clone()).map_err(|_| ErrorKind::Decryption)?; - - let secp = Secp256k1::new(); - let mut common_secret = sender_public_key.clone(); - common_secret - .mul_assign(&secp, secret_key) - .map_err(|_| ErrorKind::Decryption)?; - let common_secret_ser = common_secret.serialize_vec(&secp, true); - let common_secret_slice = &common_secret_ser[1..33]; - - let mut key = [0; 32]; - pbkdf2::derive(&digest::SHA512, 100, &salt, common_secret_slice, &mut key); - - Ok(key) - } - - pub fn decrypt_with_key(&self, key: &[u8; 32]) -> Result { - let mut encrypted_message = - from_hex(self.encrypted_message.clone()).map_err(|_| ErrorKind::Decryption)?; - let nonce = from_hex(self.nonce.clone()).map_err(|_| ErrorKind::Decryption)?; - - let opening_key = aead::OpeningKey::new(&aead::CHACHA20_POLY1305, key) - .map_err(|_| ErrorKind::Decryption)?; - let decrypted_data = - aead::open_in_place(&opening_key, &nonce, &[], 0, &mut encrypted_message) - .map_err(|_| ErrorKind::Decryption)?; - - String::from_utf8(decrypted_data.to_vec()).map_err(|_| ErrorKind::Decryption.into()) - } -} diff --git a/epicboxlib/src/main.rs b/epicboxlib/src/main.rs deleted file mode 100644 index fb46836..0000000 --- a/epicboxlib/src/main.rs +++ /dev/null @@ -1,57 +0,0 @@ -extern crate epicboxlib; - -use epicboxlib::error::{ErrorKind, Result}; -use epicboxlib::types::{EpicboxAddress, EpicboxError, EpicboxRequest, EpicboxResponse}; -use epicboxlib::utils::crypto::{verify_signature, Base58, Hex}; -use epicboxlib::utils::secp::{PublicKey, Signature}; - -use std::env; - -fn main() { - - - let args: Vec = env::args().collect(); - - - let verifysignature: &str = "verifysignature"; - let verifyaddress: &str = "verifyaddress"; - - if verifysignature.eq(args[1].as_str()) { - - let answer = match verify_signature_main(args[2].as_str(), args[3].as_str(), args[4].as_str()){ - - Ok(answer) => true, - Err(e) => false, - }; - - print!("{}", answer); - - } else if verifyaddress.eq(args[1].as_str()) { - - let mut fromok = true; - let mut took = true; - let from_address = EpicboxAddress::from_str_raw(&args[2]); - if from_address.is_err() { - fromok = false; - } - - - let to_address = EpicboxAddress::from_str_raw(&args[3]); - if to_address.is_err() { - took = false - } - print!("{}", (fromok && took)); - - - } else { print!("{}", false);} - -} - - -fn verify_signature_main( public_key: &str, challenge: &str, signature: &str) -> Result<()> { - let (public_key, _) = PublicKey::from_base58_check_raw(public_key, 2)?; - let signature = Signature::from_hex(signature)?; - verify_signature(challenge, &signature, &public_key) - .map_err(|_| ErrorKind::EpicboxProtocolError(EpicboxError::InvalidSignature))?; - Ok(()) -} diff --git a/epicboxlib/Cargo.lock b/epicboxlib_source/Cargo.lock similarity index 50% rename from epicboxlib/Cargo.lock rename to epicboxlib_source/Cargo.lock index 4ef2320..3b8832a 100644 --- a/epicboxlib/Cargo.lock +++ b/epicboxlib_source/Cargo.lock @@ -1,31 +1,47 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" -version = "0.19.0" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aead" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array 0.14.7", +] [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ - "memchr 2.5.0", + "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c583acf993cf4245c4acb0a2cc2ab1f9cc097de73411bb6d3647ff6af2b1013d" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -36,42 +52,76 @@ dependencies = [ ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "anstream" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ - "winapi 0.3.9", + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", ] [[package]] -name = "antidote" -version = "1.0.0" +name = "anstyle" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] -name = "arc-swap" -version = "0.3.11" +name = "anstyle-parse" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc4662175ead9cd84451d5c35070517777949a2ed84551764129cedb88384841" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] [[package]] -name = "arrayref" -version = "0.3.6" +name = "anstyle-query" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] [[package]] -name = "arrayvec" -version = "0.3.25" +name = "anstyle-wincon" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06f59fe10306bb78facd90d28c2038ad23ffaaefa85bac43c8a434cde383334f" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ - "nodrop", - "odds", + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "arc-swap" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d03449bb8ca2cc2ef70869af31463d1ae5ccc8fa3e334b307203fbf815207e" +dependencies = [ + "rustversion", ] +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.4.12" @@ -88,15 +138,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] -name = "atty" -version = "0.2.14" +name = "arrayvec" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi 0.3.9", -] +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -104,38 +155,50 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" dependencies = [ - "autocfg 1.1.0", + "autocfg 1.5.0", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "aws-lc-rs" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a88aab2464f1f25453baa7a07c84c5b7684e274054ba06817f382357f77a288" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "b45afffdee1e7c9126814751f88dddc747f41d91da16c9551a0f1e8a11e788a1" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ "addr2line", - "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", "object", "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -dependencies = [ - "byteorder 1.4.3", - "safemem", + "windows-link 0.2.1", ] [[package]] @@ -145,46 +208,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] -name = "base64ct" -version = "1.6.0" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "bigint" -version = "4.4.3" +name = "base64ct" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0e8c8a600052b52482eff2cf4d810e462fdff1f656ac1ecb6232132a1ed7def" -dependencies = [ - "byteorder 1.4.3", - "crunchy 0.1.6", -] +checksum = "0e050f626429857a27ddccb31e0aca21356bfa709c04041aefddac081a8f068a" [[package]] name = "bindgen" -version = "0.37.4" +version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b25ab82877ea8fe6ce1ce1f8ac54361f0218bad900af9eb11803994bf67c221" +checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ + "bitflags 2.10.0", "cexpr", - "cfg-if 0.1.10", "clang-sys", - "clap", - "env_logger", - "lazy_static", + "itertools", "log", - "peeking_take_while", - "proc-macro2 0.3.5", - "quote 0.5.2", + "prettyplease", + "proc-macro2 1.0.104", + "quote 1.0.35", "regex", - "which", + "rustc-hash", + "shlex", + "syn 2.0.112", ] [[package]] name = "bit-vec" -version = "0.6.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" @@ -198,6 +257,15 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +dependencies = [ + "serde_core", +] + [[package]] name = "blake2-rfc" version = "0.2.18" @@ -219,16 +287,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "block-buffer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" -dependencies = [ - "arrayref", - "byte-tools 0.2.0", -] - [[package]] name = "block-buffer" version = "0.7.3" @@ -236,18 +294,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ "block-padding", - "byte-tools 0.3.1", - "byteorder 1.4.3", + "byte-tools", + "byteorder", "generic-array 0.12.4", ] [[package]] name = "block-buffer" -version = "0.9.0" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -256,20 +314,14 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" dependencies = [ - "byte-tools 0.3.1", + "byte-tools", ] [[package]] name = "bumpalo" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" - -[[package]] -name = "byte-tools" -version = "0.2.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "byte-tools" @@ -279,15 +331,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" - -[[package]] -name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -295,22 +341,33 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" dependencies = [ - "byteorder 1.4.3", - "either", + "byteorder", "iovec", ] +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + [[package]] name = "cc" -version = "1.0.79" +version = "1.2.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] [[package]] name = "cexpr" -version = "0.2.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42aac45e9567d97474a834efdee3081b3c942b2205be932092f53354ce503d6c" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ "nom", ] @@ -328,54 +385,63 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chrono" -version = "0.4.23" +name = "chacha20" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ - "iana-time-zone", - "js-sys", - "num-integer", - "num-traits 0.2.15", - "serde", - "time", - "wasm-bindgen", - "winapi 0.3.9", + "cfg-if 1.0.0", + "cipher", + "cpufeatures", ] [[package]] -name = "clang-sys" -version = "0.23.0" +name = "chacha20poly1305" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f7c04e52c35222fffcc3a115b5daf5f7e2bfb71c13c4e2321afe1fc71859c2" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "glob", - "libc", - "libloading", + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", ] [[package]] -name = "clap" -version = "2.34.0" +name = "chrono" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim", - "textwrap", - "unicode-width", - "vec_map", + "iana-time-zone", + "js-sys", + "num-traits 0.2.19", + "serde", + "wasm-bindgen", + "windows-link 0.2.1", ] [[package]] -name = "clear_on_drop" -version = "0.2.5" +name = "cipher" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38508a63f4979f0048febc9966fadbd48e5dab31fd0ec6a3f151bbf4a74f7423" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "cc", + "crypto-common", + "inout", + "zeroize", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", ] [[package]] @@ -389,242 +455,196 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.49" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" +checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" dependencies = [ "cc", ] [[package]] -name = "codespan-reporting" -version = "0.11.1" +name = "colorchoice" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "colored" -version = "1.9.3" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" +checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" dependencies = [ - "atty", - "lazy_static", - "winapi 0.3.9", + "windows-sys 0.59.0", ] [[package]] -name = "constant_time_eq" -version = "0.1.5" +name = "const-oid" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] -name = "core-foundation-sys" -version = "0.8.3" +name = "constant_time_eq" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] -name = "cpufeatures" -version = "0.2.5" +name = "core-foundation" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ + "core-foundation-sys", "libc", ] [[package]] -name = "crc32fast" -version = "1.3.2" +name = "core-foundation" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "croaring" -version = "0.3.10" -source = "git+https://github.com/EricShimizuKarbstein/croaring-rs.git?branch=not-native-march#59e23d8d8b0cef377d6dc506a1b872b09eebba47" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" dependencies = [ - "croaring-sys", + "core-foundation-sys", "libc", ] [[package]] -name = "croaring-sys" -version = "0.3.10" -source = "git+https://github.com/EricShimizuKarbstein/croaring-rs.git?branch=not-native-march#59e23d8d8b0cef377d6dc506a1b872b09eebba47" -dependencies = [ - "bindgen", - "cc", - "libc", -] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] -name = "crossbeam-deque" -version = "0.7.4" +name = "cpufeatures" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ - "crossbeam-epoch", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "libc", ] [[package]] -name = "crossbeam-epoch" -version = "0.8.2" +name = "crc32fast" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ - "autocfg 1.1.0", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset", - "scopeguard 1.1.0", + "cfg-if 1.0.0", ] [[package]] -name = "crossbeam-queue" -version = "0.2.3" +name = "croaring" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" +checksum = "3eb54ab7f180e12d8c554ffcb692e5c6c12f94928d7fe4389f7ffba1bb7fd7aa" dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "allocator-api2", + "croaring-sys", ] [[package]] -name = "crossbeam-utils" -version = "0.7.2" +name = "croaring-sys" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +checksum = "041a364f605afdf72e2fb983b5daaed9629a1220ce7322f22a33cf47d5182e9c" dependencies = [ - "autocfg 1.1.0", - "cfg-if 0.1.10", - "lazy_static", + "cc", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.1.6" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] -name = "crunchy" -version = "0.2.2" +name = "crypto-common" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", + "typenum", +] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "curve25519-dalek" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "generic-array 0.14.6", + "cfg-if 1.0.0", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version 0.4.1", "subtle", + "zeroize", ] [[package]] -name = "ct-logs" -version = "0.4.0" +name = "curve25519-dalek-derive" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a4bf5107667e12bf6ce31a3a5066d67acc88942b6742117a41198734aaccaa" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "sct", + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", ] [[package]] -name = "curve25519-dalek" -version = "1.2.6" +name = "data-encoding" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d59fed08e452f286b251f88b2fc64a01f50a7b263aa09557ad7285d9e7fa" -dependencies = [ - "byteorder 1.4.3", - "clear_on_drop", - "digest 0.8.1", - "rand_core 0.3.1", - "subtle", -] +checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] -name = "cxx" -version = "1.0.91" +name = "der" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", + "const-oid", + "zeroize", ] [[package]] -name = "cxx-build" -version = "1.0.91" +name = "derive_more" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2 1.0.51", - "quote 1.0.23", - "scratch", - "syn 1.0.109", + "derive_more-impl", ] [[package]] -name = "cxxbridge-flags" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.91" +name = "derive_more-impl" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.109", + "proc-macro2 1.0.104", + "quote 1.0.35", + "rustc_version 0.4.1", + "syn 2.0.112", + "unicode-xid 0.2.6", ] [[package]] -name = "data-encoding" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" - -[[package]] -name = "digest" -version = "0.7.6" +name = "destructure_traitobject" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90" -dependencies = [ - "generic-array 0.9.1", -] +checksum = "3c877555693c14d2f84191cfd3ad8582790fc52b5e2274b40b59cf5f5cea25c7" [[package]] name = "digest" @@ -637,11 +657,13 @@ dependencies = [ [[package]] name = "digest" -version = "0.9.0" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "generic-array 0.14.6", + "block-buffer 0.10.4", + "crypto-common", + "subtle", ] [[package]] @@ -651,13 +673,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" dependencies = [ "libc", - "redox_users", + "redox_users 0.3.5", "winapi 0.3.9", ] [[package]] -name = "easy-jsonrpc-mw" -version = "0.5.4" +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.5.2", + "windows-sys 0.61.2", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "easy-jsonrpc-mw" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3b1a91569d50e3bba3c9febb22ef54d78c6e8a8d8dd91ae859896c8ba05f4e3" dependencies = [ @@ -674,30 +734,41 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6368dbd2c6685fb84fc6e6a4749917ddc98905793fd06341c7e11a2504f2724" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2 0.4.30", "quote 0.6.13", "syn 0.15.44", ] +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + [[package]] name = "ed25519-dalek" -version = "1.0.0-pre.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ - "clear_on_drop", "curve25519-dalek", - "failure", - "rand 0.6.5", - "sha2 0.8.2", + "ed25519", + "serde", + "sha2", + "subtle", + "zeroize", ] [[package]] name = "either" -version = "1.8.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "enum_primitive" @@ -708,247 +779,209 @@ dependencies = [ "num-traits 0.1.43", ] +[[package]] +name = "env_filter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" +dependencies = [ + "log", + "regex", +] + [[package]] name = "env_logger" -version = "0.5.13" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ - "atty", + "anstream", + "anstyle", + "env_filter", "humantime", "log", - "regex", - "termcolor", ] [[package]] name = "epic_api" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?tag=v3.3.2#e22cee1a2132f43e517dd8aed870744d7445f287" +version = "4.0.0" +source = "git+https://github.com/EpicCash/epic.git?branch=master#5f5e907a6da78407633ef8a5f04596a8e4b56730" dependencies = [ - "bigint", + "bytes 1.11.0", + "chrono", "easy-jsonrpc-mw", "epic_chain", - "epic_core 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", + "epic_core", "epic_p2p", "epic_pool", "epic_store", - "epic_util 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "failure", - "failure_derive", - "futures", - "http", + "epic_util", + "futures 0.3.31", + "http-body-util", "hyper", "hyper-rustls", "hyper-timeout", + "hyper-tls", + "hyper-util", "lazy_static", "log", + "num-bigint", + "rand 0.9.2", "regex", "ring", "rustls", + "rustls-pemfile", + "rustls-pki-types", "serde", "serde_derive", "serde_json", + "subtle", + "thiserror 2.0.17", "tokio", - "tokio-core", "tokio-rustls", - "tokio-tcp", - "url 1.7.2", + "tower", + "url", ] [[package]] name = "epic_chain" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?tag=v3.3.2#e22cee1a2132f43e517dd8aed870744d7445f287" +version = "4.0.0" +source = "git+https://github.com/EpicCash/epic.git?branch=master#5f5e907a6da78407633ef8a5f04596a8e4b56730" dependencies = [ - "bigint", "bit-vec", - "bitflags 1.3.2", - "byteorder 1.4.3", + "bitflags 2.10.0", + "byteorder", "chrono", "croaring", - "epic_core 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "epic_keychain 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", + "epic_core", + "epic_keychain", "epic_store", - "epic_util 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "failure", - "failure_derive", + "epic_util", "lazy_static", "log", "lru-cache", "regex", "serde", "serde_derive", + "thiserror 2.0.17", ] [[package]] name = "epic_core" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?tag=v3.3.2#e22cee1a2132f43e517dd8aed870744d7445f287" -dependencies = [ - "bigint", - "blake2-rfc", - "byteorder 1.4.3", - "chrono", - "croaring", - "enum_primitive", - "epic_keychain 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "epic_util 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "failure", - "failure_derive", - "keccak-hash", - "lazy_static", - "log", - "lru-cache", - "md5", - "num 0.2.1", - "num-bigint 0.2.6", - "progpow", - "rand 0.6.5", - "randomx", - "serde", - "serde_derive", - "serde_json", - "sha2 0.8.2", - "siphasher", - "uuid 0.6.5", - "zeroize", -] - -[[package]] -name = "epic_core" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?branch=master#e22cee1a2132f43e517dd8aed870744d7445f287" +version = "4.0.0" +source = "git+https://github.com/EpicCash/epic.git?branch=master#5f5e907a6da78407633ef8a5f04596a8e4b56730" dependencies = [ - "bigint", "blake2-rfc", - "byteorder 1.4.3", + "byteorder", "chrono", "croaring", "enum_primitive", - "epic_keychain 3.3.2 (git+https://github.com/EpicCash/epic?branch=master)", - "epic_util 3.3.2 (git+https://github.com/EpicCash/epic?branch=master)", - "failure", - "failure_derive", - "keccak-hash", + "epic_keychain", + "epic_util", + "keccak-hash 0.11.0", "lazy_static", "log", "lru-cache", "md5", - "num 0.2.1", - "num-bigint 0.2.6", + "num-bigint", + "num-traits 0.2.19", "progpow", - "rand 0.6.5", + "rand 0.9.2", "randomx", "serde", "serde_derive", "serde_json", - "sha2 0.8.2", + "sha2", "siphasher", - "uuid 0.6.5", - "zeroize", -] - -[[package]] -name = "epic_keychain" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?tag=v3.3.2#e22cee1a2132f43e517dd8aed870744d7445f287" -dependencies = [ - "blake2-rfc", - "byteorder 1.4.3", - "digest 0.9.0", - "epic_util 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "hmac", - "lazy_static", - "log", - "pbkdf2", - "rand 0.6.5", - "ripemd160", - "serde", - "serde_derive", - "serde_json", - "sha2 0.9.9", - "uuid 0.6.5", + "thiserror 2.0.17", + "uuid", "zeroize", ] [[package]] name = "epic_keychain" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?branch=master#e22cee1a2132f43e517dd8aed870744d7445f287" +version = "4.0.0" +source = "git+https://github.com/EpicCash/epic.git?branch=master#5f5e907a6da78407633ef8a5f04596a8e4b56730" dependencies = [ "blake2-rfc", - "byteorder 1.4.3", - "digest 0.9.0", - "epic_util 3.3.2 (git+https://github.com/EpicCash/epic?branch=master)", + "byteorder", + "digest 0.10.7", + "epic_util", "hmac", "lazy_static", "log", "pbkdf2", - "rand 0.6.5", - "ripemd160", + "rand 0.9.2", + "ripemd", "serde", "serde_derive", "serde_json", - "sha2 0.9.9", - "uuid 0.6.5", + "sha2", + "thiserror 2.0.17", + "uuid", "zeroize", ] [[package]] name = "epic_p2p" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?tag=v3.3.2#e22cee1a2132f43e517dd8aed870744d7445f287" +version = "4.0.0" +source = "git+https://github.com/EpicCash/epic.git?branch=master#5f5e907a6da78407633ef8a5f04596a8e4b56730" dependencies = [ - "bitflags 1.3.2", - "bytes", + "bitflags 2.10.0", + "blake2-rfc", + "bytes 1.11.0", "chrono", + "data-encoding", + "ed25519-dalek", "enum_primitive", "epic_chain", - "epic_core 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", + "epic_core", + "epic_keychain", "epic_store", - "epic_util 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", + "epic_util", "log", "lru-cache", "net2", - "num 0.1.42", - "rand 0.6.5", + "num", + "rand 0.9.2", + "regex", "serde", "serde_derive", + "sha3", + "sysinfo", "tempfile", + "timer", + "x25519-dalek", ] [[package]] name = "epic_pool" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?tag=v3.3.2#e22cee1a2132f43e517dd8aed870744d7445f287" +version = "4.0.0" +source = "git+https://github.com/EpicCash/epic.git?branch=master#5f5e907a6da78407633ef8a5f04596a8e4b56730" dependencies = [ "blake2-rfc", "chrono", - "epic_core 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "epic_keychain 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", + "epic_core", + "epic_keychain", "epic_store", - "epic_util 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "failure", - "failure_derive", + "epic_util", "log", - "rand 0.6.5", + "rand 0.9.2", "serde", "serde_derive", + "thiserror 2.0.17", ] [[package]] name = "epic_store" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?tag=v3.3.2#e22cee1a2132f43e517dd8aed870744d7445f287" +version = "4.0.0" +source = "git+https://github.com/EpicCash/epic.git?branch=master#5f5e907a6da78407633ef8a5f04596a8e4b56730" dependencies = [ - "byteorder 1.4.3", + "byteorder", "croaring", "env_logger", - "epic_core 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "epic_util 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "failure", - "failure_derive", + "epic_core", + "epic_util", "libc", "lmdb-zero", "log", @@ -956,43 +989,25 @@ dependencies = [ "serde", "serde_derive", "tempfile", + "thiserror 2.0.17", ] [[package]] name = "epic_util" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?tag=v3.3.2#e22cee1a2132f43e517dd8aed870744d7445f287" -dependencies = [ - "backtrace", - "base64 0.9.3", - "byteorder 1.4.3", - "grin_secp256k1zkp", - "lazy_static", - "log", - "log4rs", - "parking_lot 0.6.4", - "rand 0.6.5", - "serde", - "serde_derive", - "walkdir", - "zeroize", - "zip", -] - -[[package]] -name = "epic_util" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic?branch=master#e22cee1a2132f43e517dd8aed870744d7445f287" +version = "4.0.0" +source = "git+https://github.com/EpicCash/epic.git?branch=master#5f5e907a6da78407633ef8a5f04596a8e4b56730" dependencies = [ + "anyhow", "backtrace", - "base64 0.9.3", - "byteorder 1.4.3", + "base64 0.22.1", + "byteorder", + "chrono", "grin_secp256k1zkp", "lazy_static", "log", "log4rs", "parking_lot 0.6.4", - "rand 0.6.5", + "rand 0.9.2", "serde", "serde_derive", "walkdir", @@ -1002,57 +1017,62 @@ dependencies = [ [[package]] name = "epic_wallet_config" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic-wallet?branch=master#a323ae6c9bbe19ae173f7d080fd3915c88e6b821" +version = "4.0.0" dependencies = [ - "dirs", + "dirs 6.0.0", "epic_wallet_util", - "rand 0.5.6", + "rand 0.9.2", "serde", "serde_derive", + "thiserror 2.0.17", "toml", ] [[package]] name = "epic_wallet_libwallet" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic-wallet?branch=master#a323ae6c9bbe19ae173f7d080fd3915c88e6b821" +version = "4.0.0" dependencies = [ + "aead", "blake2-rfc", - "byteorder 1.4.3", + "byteorder", + "chacha20poly1305", "chrono", "data-encoding", + "digest 0.10.7", "ed25519-dalek", "epic_wallet_config", "epic_wallet_util", - "failure", - "failure_derive", "lazy_static", "log", - "rand 0.5.6", + "rand 0.9.2", + "regex", + "ring", "serde", "serde_derive", "serde_json", + "sha2", "sha3", "sqlite", "strum", "strum_macros", - "uuid 0.7.4", + "thiserror 2.0.17", + "tungstenite", + "uuid", ] [[package]] name = "epic_wallet_util" -version = "3.3.2" -source = "git+https://github.com/EpicCash/epic-wallet?branch=master#a323ae6c9bbe19ae173f7d080fd3915c88e6b821" +version = "4.0.0" dependencies = [ - "dirs", + "dirs 6.0.0", "epic_api", "epic_chain", - "epic_core 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "epic_keychain 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", + "epic_core", + "epic_keychain", "epic_store", - "epic_util 3.3.2 (git+https://github.com/EpicCash/epic?tag=v3.3.2)", - "rand 0.5.6", + "epic_util", + "rand 0.9.2", + "rand_core 0.9.3", "serde", "serde_derive", "toml", @@ -1060,9 +1080,10 @@ dependencies = [ [[package]] name = "epicboxlib" -version = "0.1.0" +version = "0.2.0" dependencies = [ "epicboxlib 1.0.1", + "grin_secp256k1zkp", ] [[package]] @@ -1070,41 +1091,37 @@ name = "epicboxlib" version = "1.0.1" dependencies = [ "colored", - "epic_core 3.3.2 (git+https://github.com/EpicCash/epic?branch=master)", "epic_wallet_libwallet", "failure", "grin_secp256k1zkp", "log", - "parking_lot 0.6.4", - "rand 0.5.6", + "parking_lot 0.12.5", + "rand 0.9.2", "regex", "ring", "serde", "serde_derive", "serde_json", - "sha2 0.7.1", + "sha2", + "thiserror 2.0.17", "ws", + "zeroize", ] [[package]] -name = "errno" -version = "0.2.8" +name = "equivalent" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi 0.3.9", -] +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "errno" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ - "cc", "libc", + "windows-sys 0.61.2", ] [[package]] @@ -1123,10 +1140,10 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2 1.0.104", + "quote 1.0.35", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -1137,42 +1154,60 @@ checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "fastrand" -version = "1.9.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" -version = "0.2.20" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.16", - "windows-sys 0.45.0", + "libredox", + "windows-sys 0.60.2", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" + [[package]] name = "fixed-hash" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1a683d1234507e4f3bf2736eeddf0de1dc65996dc0164d57eba0a74bcf29489" dependencies = [ - "byteorder 1.4.3", + "byteorder", "rand 0.5.6", "rustc-hex", - "static_assertions", + "static_assertions 0.2.5", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "static_assertions 1.1.0", ] [[package]] name = "flate2" -version = "1.0.25" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "miniz_oxide", @@ -1184,15 +1219,36 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ - "percent-encoding 2.2.0", + "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fuchsia-cprng" version = "0.1.1" @@ -1222,30 +1278,100 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] -name = "futures-cpupool" -version = "0.1.8" +name = "futures" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ - "futures", - "num_cpus", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] -name = "gcc" -version = "0.3.55" +name = "futures-channel" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] [[package]] -name = "generic-array" -version = "0.9.1" +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d00328cedcac5e81c683e5620ca6a30756fc23027ebf9bff405c0e8da1fbb7e" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ - "typenum", + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", ] +[[package]] +name = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" + [[package]] name = "generic-array" version = "0.12.4" @@ -1257,9 +1383,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1276,29 +1402,50 @@ dependencies = [ "wasi 0.9.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "r-efi", + "wasip2", +] + [[package]] name = "gimli" -version = "0.27.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" [[package]] name = "glob" -version = "0.2.11" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "grin_secp256k1zkp" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3af3c4c4829b3e2e7ee1d9a542833e4244912fbb887fabe44682558159b068a7" +version = "0.8.0" +source = "git+https://github.com/EpicCash/rust-secp256k1-zkp?branch=master#e5ee7524f144b9d5fbc6c8a11c0f4967d474ec40" dependencies = [ - "arrayvec 0.3.25", + "arrayvec 0.7.6", "cc", "libc", - "rand 0.5.6", - "rustc-serialize", + "rand 0.9.2", "serde", "serde_json", "zeroize", @@ -1306,20 +1453,21 @@ dependencies = [ [[package]] name = "h2" -version = "0.1.26" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ - "byteorder 1.4.3", - "bytes", + "atomic-waker", + "bytes 1.11.0", "fnv", - "futures", + "futures-core", + "futures-sink", "http", "indexmap", - "log", "slab", - "string", - "tokio-io", + "tokio", + "tokio-util", + "tracing", ] [[package]] @@ -1330,9 +1478,9 @@ checksum = "65043da274378d68241eb9a8f8f8aa54e349136f7b8e12f63e3ef44043cc30e1" [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" @@ -1344,178 +1492,298 @@ dependencies = [ ] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] -name = "hermit-abi" -version = "0.2.6" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest 0.9.0", + "digest 0.10.7", ] [[package]] name = "http" -version = "0.1.21" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ - "bytes", - "fnv", - "itoa 0.4.8", + "bytes 1.11.0", + "itoa", ] [[package]] name = "http-body" -version = "0.1.0" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes 1.11.0", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ - "bytes", - "futures", + "bytes 1.11.0", + "futures-core", "http", - "tokio-buf", + "http-body", + "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" -version = "1.3.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] +checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" [[package]] name = "hyper" -version = "0.12.36" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c843caf6296fc1f93444735205af9ed4e109a539005abb2564ae1d6fad34c52" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ - "bytes", - "futures", - "futures-cpupool", + "atomic-waker", + "bytes 1.11.0", + "futures-channel", + "futures-core", "h2", "http", "http-body", "httparse", - "iovec", - "itoa 0.4.8", - "log", - "net2", - "rustc_version", - "time", + "httpdate", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec 1.15.1", "tokio", - "tokio-buf", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", "want", ] [[package]] name = "hyper-rustls" -version = "0.14.0" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2aa6b1681795bf4da8063f718cd23145aa0c9a5143d9787b345aa60d38ee4" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "ct-logs", - "futures", "http", "hyper", + "hyper-util", + "log", "rustls", - "tokio-core", - "tokio-io", + "rustls-native-certs", + "rustls-pki-types", + "tokio", "tokio-rustls", - "tokio-tcp", - "webpki", - "webpki-roots", + "tower-service", ] [[package]] name = "hyper-timeout" -version = "0.2.0" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes 1.11.0", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ec7c8e526ed674ce148323e1f2010f76f546fcdca99a2c721e04bc7bf5b6f7" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" dependencies = [ - "futures", + "bytes 1.11.0", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", "hyper", + "libc", + "pin-project-lite", + "socket2", "tokio", - "tokio-io", - "tokio-io-timeout", - "tokio-reactor", - "tokio-service", + "tower-service", + "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", - "winapi 0.3.9", + "windows-core 0.62.2", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] -name = "idna" -version = "0.1.5" +name = "icu_collections" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec 1.15.1", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", ] [[package]] name = "idna" -version = "0.3.0" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec 1.15.1", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1529,60 +1797,70 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ - "autocfg 1.1.0", + "equivalent", "hashbrown", ] [[package]] -name = "instant" -version = "0.1.12" +name = "inout" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ - "cfg-if 1.0.0", + "generic-array 0.14.7", ] [[package]] -name = "io-lifetimes" -version = "1.0.5" +name = "iovec" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" dependencies = [ "libc", - "windows-sys 0.45.0", ] [[package]] -name = "iovec" -version = "0.1.4" +name = "is_terminal_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ - "libc", + "either", ] [[package]] name = "itoa" -version = "0.4.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] -name = "itoa" -version = "1.0.6" +name = "jobserver" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1592,7 +1870,7 @@ version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc15eef5f8b6bef5ac5f7440a957ff95d036e2f98706947741bfc93d1976db4c" dependencies = [ - "futures", + "futures 0.1.31", "log", "serde", "serde_derive", @@ -1601,9 +1879,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -1614,8 +1892,18 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69e8ee697b9aa6dcc34d7657565fa5052763a1627a5b59e4c3c0ae3ed0d70a65" dependencies = [ - "primitive-types", - "tiny-keccak", + "primitive-types 0.3.0", + "tiny-keccak 1.5.0", +] + +[[package]] +name = "keccak-hash" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e1b8590eb6148af2ea2d75f38e7d29f5ca970d5a4df456b3ef19b8b415d0264" +dependencies = [ + "primitive-types 0.13.1", + "tiny-keccak 2.0.2", ] [[package]] @@ -1630,9 +1918,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lazycell" @@ -1642,9 +1930,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.178" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "liblmdb-sys" @@ -1658,21 +1946,23 @@ dependencies = [ [[package]] name = "libloading" -version = "0.5.2" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ - "cc", - "winapi 0.3.9", + "cfg-if 1.0.0", + "windows-link 0.2.1", ] [[package]] -name = "link-cplusplus" -version = "1.0.8" +name = "libredox" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ - "cc", + "bitflags 2.10.0", + "libc", + "redox_syscall 0.7.0", ] [[package]] @@ -1683,9 +1973,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "lmdb-zero" @@ -1715,26 +2011,25 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" dependencies = [ - "scopeguard 1.1.0", + "scopeguard 1.2.0", ] [[package]] name = "lock_api" -version = "0.3.4" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "scopeguard 1.1.0", + "scopeguard 1.2.0", ] [[package]] name = "log" -version = "0.4.17" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" dependencies = [ - "cfg-if 1.0.0", - "serde", + "serde_core", ] [[package]] @@ -1745,26 +2040,31 @@ checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" [[package]] name = "log4rs" -version = "0.8.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "100052474df98158c0738a7d3f4249c99978490178b5f9f68cd835ac57adbd1b" +checksum = "3e947bb896e702c711fccc2bf02ab2abb6072910693818d1d6b07ee2b9dfd86c" dependencies = [ - "antidote", + "anyhow", "arc-swap", "chrono", + "derive_more", "flate2", "fnv", "humantime", "libc", "log", "log-mdc", + "mock_instant", + "parking_lot 0.12.5", + "rand 0.9.2", "serde", "serde-value", - "serde_derive", "serde_json", "serde_yaml", + "thiserror 2.0.17", "thread-id", - "typemap", + "typemap-ors", + "unicode-segmentation", "winapi 0.3.9", ] @@ -1777,12 +2077,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "maybe-uninit" version = "2.0.0" @@ -1791,24 +2085,15 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "md5" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bcd6433cff03a4bfc3d9834d504467db1f1cf6d0ea765d37d330249ed629d" - -[[package]] -name = "memchr" -version = "1.0.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" -dependencies = [ - "libc", -] +checksum = "ae960838283323069879657ca3de837e9f7bbb4c7bf6ea7f1b290d5e9476d2e0" [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "memmap" @@ -1821,21 +2106,19 @@ dependencies = [ ] [[package]] -name = "memoffset" -version = "0.5.6" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg 1.1.0", -] +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ - "adler", + "adler2", + "simd-adler32", ] [[package]] @@ -1857,6 +2140,17 @@ dependencies = [ "winapi 0.2.8", ] +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.61.2", +] + [[package]] name = "mio-extras" version = "2.0.6" @@ -1865,21 +2159,10 @@ checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" dependencies = [ "lazycell", "log", - "mio", + "mio 0.6.23", "slab", ] -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio", -] - [[package]] name = "miow" version = "0.2.2" @@ -1892,11 +2175,34 @@ dependencies = [ "ws2_32-sys", ] +[[package]] +name = "mock_instant" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce6dd36094cac388f119d2e9dc82dc730ef91c32a6222170d630e5414b956e6" + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe 0.1.6", + "openssl-sys", + "schannel", + "security-framework 2.11.1", + "security-framework-sys", + "tempfile", +] + [[package]] name = "net2" -version = "0.2.38" +version = "0.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" +checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" dependencies = [ "cfg-if 0.1.10", "libc", @@ -1911,177 +2217,144 @@ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "nom" -version = "3.2.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ - "memchr 1.0.2", + "memchr", + "minimal-lexical", ] [[package]] -name = "num" -version = "0.1.42" +name = "ntapi" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" +checksum = "c70f219e21142367c70c0b30c6a9e3a14d55b4d12a204d897fbec83a0363f081" dependencies = [ - "num-bigint 0.1.44", - "num-complex 0.1.43", - "num-integer", - "num-iter", - "num-rational 0.1.42", - "num-traits 0.2.15", + "winapi 0.3.9", ] [[package]] name = "num" -version = "0.2.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ - "num-bigint 0.2.6", - "num-complex 0.2.4", + "num-bigint", + "num-complex", "num-integer", "num-iter", - "num-rational 0.2.4", - "num-traits 0.2.15", -] - -[[package]] -name = "num-bigint" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" -dependencies = [ - "num-integer", - "num-traits 0.2.15", - "rand 0.4.6", - "rustc-serialize", + "num-rational", + "num-traits 0.2.19", ] [[package]] name = "num-bigint" -version = "0.2.6" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg 1.1.0", "num-integer", - "num-traits 0.2.15", -] - -[[package]] -name = "num-complex" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b288631d7878aaf59442cffd36910ea604ecd7745c36054328595114001c9656" -dependencies = [ - "num-traits 0.2.15", - "rustc-serialize", + "num-traits 0.2.19", ] [[package]] name = "num-complex" -version = "0.2.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ - "autocfg 1.1.0", - "num-traits 0.2.15", + "num-traits 0.2.19", ] [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg 1.1.0", - "num-traits 0.2.15", + "num-traits 0.2.19", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ - "autocfg 1.1.0", + "autocfg 1.5.0", "num-integer", - "num-traits 0.2.15", + "num-traits 0.2.19", ] [[package]] name = "num-rational" -version = "0.1.42" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "num-bigint 0.1.44", + "num-bigint", "num-integer", - "num-traits 0.2.15", - "rustc-serialize", + "num-traits 0.2.19", ] [[package]] -name = "num-rational" -version = "0.2.4" +name = "num-traits" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "autocfg 1.1.0", - "num-bigint 0.2.6", - "num-integer", - "num-traits 0.2.15", + "num-traits 0.2.19", ] [[package]] name = "num-traits" -version = "0.1.43" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "num-traits 0.2.15", + "autocfg 1.5.0", ] [[package]] -name = "num-traits" -version = "0.2.15" +name = "objc2-core-foundation" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "autocfg 1.1.0", + "bitflags 2.10.0", ] [[package]] -name = "num_cpus" -version = "1.15.0" +name = "objc2-io-kit" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" dependencies = [ - "hermit-abi 0.2.6", "libc", + "objc2-core-foundation", ] [[package]] name = "object" -version = "0.30.3" +version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ - "memchr 2.5.0", + "memchr", ] [[package]] -name = "odds" -version = "0.2.26" +name = "once_cell" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eae0151b9dacf24fcc170d9995e511669a082856a91f958a2fe380bfab3fb22" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] -name = "once_cell" -version = "1.17.1" +name = "once_cell_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "opaque-debug" @@ -2091,31 +2364,87 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] -name = "ordered-float" -version = "1.1.1" +name = "openssl" +version = "0.10.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" dependencies = [ - "num-traits 0.2.15", + "bitflags 2.10.0", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", ] [[package]] -name = "owning_ref" -version = "0.4.1" +name = "openssl-macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "stable_deref_trait", + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", ] [[package]] -name = "parity-codec" -version = "3.5.4" +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-probe" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f50d9b3dabb09ecd771ad0aa242ca6894994c130308ca3d7684634df8037391" + +[[package]] +name = "openssl-sys" +version = "0.9.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits 0.2.19", +] + +[[package]] +name = "owning_ref" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "parity-codec" +version = "3.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b9df1283109f542d8852cd6b30e9341acc2137481eb6157d2e62af68b0afec9" dependencies = [ @@ -2141,18 +2470,17 @@ checksum = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" dependencies = [ "lock_api 0.2.0", "parking_lot_core 0.5.0", - "rustc_version", + "rustc_version 0.2.3", ] [[package]] name = "parking_lot" -version = "0.9.0" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.6.3", - "rustc_version", + "lock_api 0.4.14", + "parking_lot_core 0.9.12", ] [[package]] @@ -2163,8 +2491,8 @@ checksum = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" dependencies = [ "libc", "rand 0.5.6", - "rustc_version", - "smallvec", + "rustc_version 0.2.3", + "smallvec 0.6.14", "winapi 0.3.9", ] @@ -2179,73 +2507,87 @@ dependencies = [ "libc", "rand 0.6.5", "redox_syscall 0.1.57", - "rustc_version", - "smallvec", + "rustc_version 0.2.3", + "smallvec 0.6.14", "winapi 0.3.9", ] [[package]] name = "parking_lot_core" -version = "0.6.3" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66b810a62be75176a80873726630147a5ca780cd33921e0b5709033e66b0a" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ - "cfg-if 0.1.10", - "cloudabi", + "cfg-if 1.0.0", "libc", - "redox_syscall 0.1.57", - "rustc_version", - "smallvec", - "winapi 0.3.9", + "redox_syscall 0.5.18", + "smallvec 1.15.1", + "windows-link 0.2.1", ] [[package]] -name = "password-hash" -version = "0.2.3" +name = "pbkdf2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e0b28ace46c5a396546bcf443bf422b57049617433d8854227352a4a9b24e7" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle", + "digest 0.10.7", + "hmac", ] [[package]] -name = "pbkdf2" -version = "0.8.0" +name = "percent-encoding" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" -dependencies = [ - "base64ct", - "crypto-mac", - "hmac", - "password-hash", - "sha2 0.9.9", -] +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] -name = "peeking_take_while" -version = "0.1.2" +name = "pin-project-lite" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] -name = "percent-encoding" -version = "1.0.1" +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "percent-encoding" -version = "2.2.0" +name = "pkcs8" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug 0.3.1", + "universal-hash", +] + +[[package]] +name = "potential_utf" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] [[package]] name = "ppv-lite86" @@ -2253,6 +2595,16 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2 1.0.104", + "syn 2.0.112", +] + [[package]] name = "primal" version = "0.2.3" @@ -2297,7 +2649,7 @@ dependencies = [ "hamming", "primal-bit", "primal-estimate", - "smallvec", + "smallvec 0.6.14", ] [[package]] @@ -2306,18 +2658,19 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2288eb2a39386c4bc817974cc413afe173010dc80e470fcb1e9a35580869f024" dependencies = [ - "fixed-hash", + "fixed-hash 0.3.2", "impl-codec", - "uint", + "uint 0.7.1", ] [[package]] -name = "proc-macro2" -version = "0.3.5" +name = "primitive-types" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4" +checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" dependencies = [ - "unicode-xid 0.1.0", + "fixed-hash 0.8.0", + "uint 0.10.0", ] [[package]] @@ -2331,9 +2684,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0" dependencies = [ "unicode-ident", ] @@ -2341,48 +2694,34 @@ dependencies = [ [[package]] name = "progpow" version = "0.1.0" -source = "git+https://github.com/EpicCash/progpow-rust.git?tag=v0.1.0#8ea40b37f7d00a2d6bc5ec3c2f332a86287fa790" +source = "git+https://github.com/EpicCash/progpow-rust?tag=v0.2.0#7a10ab826479af4d0e61de4d6cccd420e0b8ce8e" dependencies = [ - "bigint", "bindgen", - "byteorder 0.5.3", + "byteorder", "cmake", - "dirs", + "dirs 1.0.5", "filetime", "lazy_static", "libc", + "num-bigint", + "num-traits 0.2.19", "progpow_cpu", ] [[package]] name = "progpow_cpu" version = "0.1.0" -source = "git+https://github.com/EpicCash/progpow-rust.git?tag=v0.1.0#8ea40b37f7d00a2d6bc5ec3c2f332a86287fa790" +source = "git+https://github.com/EpicCash/progpow-rust?tag=v0.2.0#7a10ab826479af4d0e61de4d6cccd420e0b8ce8e" dependencies = [ - "crunchy 0.2.2", + "crunchy", "either", - "keccak-hash", + "keccak-hash 0.2.0", "log", "memmap", "parking_lot 0.8.0", "primal", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" -dependencies = [ - "proc-macro2 0.3.5", -] - [[package]] name = "quote" version = "0.6.13" @@ -2394,25 +2733,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ - "proc-macro2 1.0.51", + "proc-macro2 1.0.104", ] [[package]] -name = "rand" -version = "0.4.6" +name = "r-efi" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi 0.3.9", -] +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rand" @@ -2452,13 +2784,23 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.16", "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc 0.2.0", ] +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", +] + [[package]] name = "rand_chacha" version = "0.1.1" @@ -2479,6 +2821,16 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + [[package]] name = "rand_core" version = "0.3.1" @@ -2500,7 +2852,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.16", ] [[package]] @@ -2508,6 +2860,18 @@ name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.4", +] [[package]] name = "rand_hc" @@ -2582,15 +2946,16 @@ dependencies = [ [[package]] name = "randomx" -version = "0.1.1" -source = "git+https://github.com/EpicCash/randomx-rust.git?tag=v0.1.1#2d42b569b11a4c98954702c106c733c7578ed2b9" +version = "0.2.0" +source = "git+https://github.com/EpicCash/randomx-rust.git?tag=v0.2.0#d8cdeff53c333707da401a3e06d29b467681cfeb" dependencies = [ - "bigint", "bindgen", - "byteorder 0.5.3", + "byteorder", "cmake", "filetime", + "hex-literal", "libc", + "num-bigint", ] [[package]] @@ -2610,11 +2975,20 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.10.0", +] + +[[package]] +name = "redox_syscall" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" +dependencies = [ + "bitflags 2.10.0", ] [[package]] @@ -2623,49 +2997,72 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ - "getrandom", + "getrandom 0.1.16", "redox_syscall 0.1.57", "rust-argon2", ] +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.16", + "libredox", + "thiserror 2.0.17", +] + [[package]] name = "regex" -version = "1.7.1" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", - "memchr 2.5.0", + "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "ring" -version = "0.13.5" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", - "lazy_static", + "cfg-if 1.0.0", + "getrandom 0.2.16", "libc", "untrusted", + "windows-sys 0.52.0", ] [[package]] -name = "ripemd160" -version = "0.9.1" +name = "ripemd" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.7", ] [[package]] @@ -2677,14 +3074,20 @@ dependencies = [ "base64 0.13.1", "blake2b_simd", "constant_time_eq", - "crossbeam-utils 0.8.15", + "crossbeam-utils", ] [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustc-hash" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc-hex" @@ -2693,59 +3096,104 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] -name = "rustc-serialize" -version = "0.3.24" +name = "rustc_version" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] [[package]] name = "rustc_version" -version = "0.2.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver", + "semver 1.0.27", ] [[package]] name = "rustix" -version = "0.36.9" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.10.0", "errno", - "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.45.0", + "windows-sys 0.61.2", ] [[package]] name = "rustls" -version = "0.13.1" +version = "0.23.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b71057b31981152970d57399c25f72e27a6ee0d207a669d8304cabf44705b" +checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" dependencies = [ - "base64 0.9.3", + "aws-lc-rs", "log", + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" +dependencies = [ + "openssl-probe 0.2.0", + "rustls-pki-types", + "schannel", + "security-framework 3.5.1", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +dependencies = [ + "aws-lc-rs", "ring", - "sct", + "rustls-pki-types", "untrusted", - "webpki", ] [[package]] -name = "ryu" -version = "1.0.13" +name = "rustversion" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] -name = "safemem" -version = "0.3.3" +name = "ryu" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -2757,10 +3205,13 @@ dependencies = [ ] [[package]] -name = "scoped-tls" -version = "0.1.2" +name = "schannel" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +dependencies = [ + "windows-sys 0.61.2", +] [[package]] name = "scopeguard" @@ -2770,24 +3221,44 @@ checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "scratch" -version = "1.0.4" +name = "security-framework" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5e082f6ea090deaf0e6dd04b68360fd5cddb152af6ce8927c9d25db299f98c" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.10.0", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] [[package]] -name = "sct" -version = "0.4.0" +name = "security-framework" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb8f61f9e6eadd062a71c380043d28036304a4706b3c4dd001ff3387ed00745a" +checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" dependencies = [ - "ring", - "untrusted", + "bitflags 2.10.0", + "core-foundation 0.10.1", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +dependencies = [ + "core-foundation-sys", + "libc", ] [[package]] @@ -2799,6 +3270,12 @@ dependencies = [ "semver-parser", ] +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + [[package]] name = "semver-parser" version = "0.7.0" @@ -2807,55 +3284,75 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ + "serde_core", "serde_derive", ] [[package]] name = "serde-value" -version = "0.5.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a663f873dedc4eac1a559d4c6bc0d0b2c34dc5ac4702e105014b8281489e44f" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" dependencies = [ "ordered-float", "serde", ] +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.109", + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ - "itoa 1.0.6", + "itoa", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +dependencies = [ + "serde_core", +] + [[package]] name = "serde_yaml" -version = "0.8.26" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ "indexmap", + "itoa", "ryu", "serde", - "yaml-rust", + "unsafe-libyaml", ] [[package]] @@ -2871,69 +3368,79 @@ dependencies = [ ] [[package]] -name = "sha2" -version = "0.7.1" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "block-buffer 0.3.3", - "byte-tools 0.2.0", - "digest 0.7.6", - "fake-simd", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", ] [[package]] name = "sha2" -version = "0.8.2" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "sha3" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.7", + "keccak", ] [[package]] -name = "sha3" -version = "0.8.2" +name = "shlex" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ - "block-buffer 0.7.3", - "byte-tools 0.3.1", - "digest 0.8.1", - "keccak", - "opaque-debug 0.2.3", + "errno", + "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "simd-adler32" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" + [[package]] name = "siphasher" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" -dependencies = [ - "autocfg 1.1.0", -] +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" @@ -2945,20 +3452,45 @@ dependencies = [ ] [[package]] -name = "sqlite" -version = "0.30.4" +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1908664131c21a38e5b531344d52a196ec338af5bf44f7fa2c83d539e9561d" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" dependencies = [ "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sqlite" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f66e9c01a11936154f3910dbba732c01f8b591543bc4d6672bddee79fd9c4783" +dependencies = [ "sqlite3-sys", ] [[package]] name = "sqlite3-src" -version = "0.4.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1815a7a02c996eb8e5c64f61fcb6fd9b12e593ce265c512c5853b2513635691" +checksum = "e5b6d3c860886b0a33e69e421796a5f4a27f23597a182c2450f6d7ace5103120" dependencies = [ "cc", "pkg-config", @@ -2966,19 +3498,18 @@ dependencies = [ [[package]] name = "sqlite3-sys" -version = "0.14.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47c99824fc55360ba00caf28de0b8a0458369b832e016a64c13af0ad9fbb9ee" +checksum = "a7781d97adc13a1d5081127a9ee29afad8427f3757bd984daf814d8265267039" dependencies = [ - "libc", "sqlite3-src", ] [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "static_assertions" @@ -2987,43 +3518,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" [[package]] -name = "string" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -dependencies = [ - "bytes", -] - -[[package]] -name = "strsim" -version = "0.8.0" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strum" -version = "0.15.0" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d1c33039533f051704951680f1adfd468fd37ac46816ded0d9ee068e60f05f" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" [[package]] name = "strum_macros" -version = "0.15.0" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47cd23f5c7dee395a00fa20135e2ec0fffcdfa151c56182966d7a3261343432e" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" dependencies = [ - "heck", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "heck 0.5.0", + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", ] [[package]] name = "subtle" -version = "2.4.1" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "supercow" @@ -3048,8 +3570,19 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2 1.0.104", + "quote 1.0.35", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.112" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21f182278bf2d2bcb3c88b1b08a37df029d71ce3d3ae26168e3c653b213b99d4" +dependencies = [ + "proc-macro2 1.0.104", + "quote 1.0.35", "unicode-ident", ] @@ -3059,83 +3592,107 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2 1.0.104", + "quote 1.0.35", "syn 1.0.109", - "unicode-xid 0.2.4", + "unicode-xid 0.2.6", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", +] + +[[package]] +name = "sysinfo" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "252800745060e7b9ffb7b2badbd8b31cfa4aa2e61af879d0a3bf2a317c20217d" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows", ] [[package]] name = "tempfile" -version = "3.4.0" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" dependencies = [ - "cfg-if 1.0.0", "fastrand", - "redox_syscall 0.2.16", + "getrandom 0.3.4", + "once_cell", "rustix", - "windows-sys 0.42.0", + "windows-sys 0.61.2", ] [[package]] -name = "termcolor" -version = "1.2.0" +name = "thiserror" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "winapi-util", + "thiserror-impl 1.0.69", ] [[package]] -name = "textwrap" -version = "0.11.0" +name = "thiserror" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ - "unicode-width", + "thiserror-impl 2.0.17", ] [[package]] -name = "thiserror" -version = "1.0.38" +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.109", + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", ] [[package]] name = "thread-id" -version = "3.3.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" +checksum = "99043e46c5a15af379c06add30d9c93a6c0e8849de00d244c4a2c417da128d80" dependencies = [ "libc", - "redox_syscall 0.1.57", - "winapi 0.3.9", + "windows-sys 0.59.0", ] [[package]] -name = "time" -version = "0.1.45" +name = "timer" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +checksum = "31d42176308937165701f50638db1c31586f183f1aab416268216577aec7306b" dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "chrono", ] [[package]] @@ -3144,303 +3701,207 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" dependencies = [ - "crunchy 0.2.2", + "crunchy", ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "tiny-keccak" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" dependencies = [ - "tinyvec_macros", + "crunchy", ] [[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -dependencies = [ - "bytes", - "futures", - "mio", - "num_cpus", - "tokio-codec", - "tokio-current-thread", - "tokio-executor", - "tokio-fs", - "tokio-io", - "tokio-reactor", - "tokio-sync", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "tokio-udp", - "tokio-uds", -] - -[[package]] -name = "tokio-buf" -version = "0.1.1" +name = "tinystr" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ - "bytes", - "either", - "futures", + "displaydoc", + "zerovec", ] [[package]] -name = "tokio-codec" -version = "0.1.2" +name = "tokio" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "bytes", - "futures", - "tokio-io", + "bytes 1.11.0", + "libc", + "mio 1.1.1", + "parking_lot 0.12.5", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", ] [[package]] -name = "tokio-core" -version = "0.1.18" +name = "tokio-macros" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87b1395334443abca552f63d4f61d0486f12377c2ba8b368e523f89e828cffd4" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ - "bytes", - "futures", - "iovec", - "log", - "mio", - "scoped-tls", - "tokio", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-timer", + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", ] [[package]] -name = "tokio-current-thread" -version = "0.1.7" +name = "tokio-native-tls" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ - "futures", - "tokio-executor", + "native-tls", + "tokio", ] [[package]] -name = "tokio-executor" -version = "0.1.10" +name = "tokio-rustls" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "crossbeam-utils 0.7.2", - "futures", + "rustls", + "tokio", ] [[package]] -name = "tokio-fs" -version = "0.1.7" +name = "tokio-util" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" dependencies = [ - "futures", - "tokio-io", - "tokio-threadpool", + "bytes 1.11.0", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", ] [[package]] -name = "tokio-io" -version = "0.1.13" +name = "toml" +version = "0.9.10+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" +checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" dependencies = [ - "bytes", - "futures", - "log", + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime", + "toml_parser", + "toml_writer", + "winnow", ] [[package]] -name = "tokio-io-timeout" -version = "0.3.1" +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135ce81f15cfd7982fac684f9057a1299eebeb79e98a8a709969b9aa51123129" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ - "bytes", - "futures", - "tokio-io", - "tokio-timer", + "serde_core", ] [[package]] -name = "tokio-reactor" -version = "0.1.12" +name = "toml_parser" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ - "crossbeam-utils 0.7.2", - "futures", - "lazy_static", - "log", - "mio", - "num_cpus", - "parking_lot 0.9.0", - "slab", - "tokio-executor", - "tokio-io", - "tokio-sync", + "winnow", ] [[package]] -name = "tokio-rustls" -version = "0.7.2" +name = "toml_writer" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "208d62fa3e015426e3c64039d9d20adf054a3c9b4d9445560f1c41c75bef3eab" -dependencies = [ - "rustls", - "tokio", - "webpki", -] +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" [[package]] -name = "tokio-service" -version = "0.1.0" +name = "tower" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ - "futures", + "tower-layer", + "tower-service", ] [[package]] -name = "tokio-sync" -version = "0.1.8" +name = "tower-layer" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -dependencies = [ - "fnv", - "futures", -] +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] -name = "tokio-tcp" -version = "0.1.4" +name = "tower-service" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -dependencies = [ - "bytes", - "futures", - "iovec", - "mio", - "tokio-io", - "tokio-reactor", -] +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] -name = "tokio-threadpool" -version = "0.1.18" +name = "tracing" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ - "crossbeam-deque", - "crossbeam-queue", - "crossbeam-utils 0.7.2", - "futures", - "lazy_static", - "log", - "num_cpus", - "slab", - "tokio-executor", + "pin-project-lite", + "tracing-core", ] [[package]] -name = "tokio-timer" -version = "0.2.13" +name = "tracing-core" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ - "crossbeam-utils 0.7.2", - "futures", - "slab", - "tokio-executor", + "once_cell", ] [[package]] -name = "tokio-udp" -version = "0.1.6" +name = "try-lock" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" -dependencies = [ - "bytes", - "futures", - "log", - "mio", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "tokio-uds" -version = "0.2.7" +name = "tungstenite" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" +checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" dependencies = [ - "bytes", - "futures", - "iovec", - "libc", + "bytes 1.11.0", + "data-encoding", + "http", + "httparse", "log", - "mio", - "mio-uds", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "toml" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" -dependencies = [ - "serde", + "native-tls", + "rand 0.9.2", + "sha1", + "thiserror 2.0.17", + "utf-8", ] [[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" - -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - -[[package]] -name = "typemap" -version = "0.3.3" +name = "typemap-ors" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" +checksum = "a68c24b707f02dd18f1e4ccceb9d49f2058c2fb86384ef9972592904d7a28867" dependencies = [ - "unsafe-any", + "unsafe-any-ors", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "uint" @@ -3448,43 +3909,34 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2143cded94692b156c356508d92888acc824db5bffc0b4089732264c6fcf86d4" dependencies = [ - "byteorder 1.4.3", - "crunchy 0.2.2", + "byteorder", + "crunchy", "rustc-hex", ] [[package]] -name = "unicode-bidi" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" - -[[package]] -name = "unicode-ident" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775c11906edafc97bc378816b94585fbd9a054eabaf86fdd0ced94af449efab7" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" +name = "uint" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" dependencies = [ - "tinyvec", + "byteorder", + "crunchy", + "hex", + "static_assertions 1.1.0", ] [[package]] -name = "unicode-segmentation" -version = "1.10.1" +name = "unicode-ident" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "unicode-width" -version = "0.1.10" +name = "unicode-segmentation" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-xid" @@ -3494,99 +3946,111 @@ checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] -name = "unsafe-any" -version = "0.4.2" +name = "universal-hash" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "traitobject", + "crypto-common", + "subtle", ] [[package]] -name = "untrusted" -version = "0.6.2" +name = "unsafe-any-ors" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" +checksum = "e0a303d30665362d9680d7d91d78b23f5f899504d4f08b3c4cf08d055d87c0ad" +dependencies = [ + "destructure_traitobject", +] [[package]] -name = "url" -version = "1.7.2" +name = "unsafe-libyaml" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.3.1" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", - "idna 0.3.0", - "percent-encoding 2.2.0", + "idna", + "percent-encoding", + "serde", ] [[package]] -name = "uuid" -version = "0.6.5" +name = "utf-8" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1436e58182935dcd9ce0add9ea0b558e8a87befe01c1a301e6020aeb0876363" -dependencies = [ - "cfg-if 0.1.10", - "rand 0.4.6", - "serde", -] +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "0.7.4" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" +checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" dependencies = [ - "rand 0.6.5", - "serde", + "getrandom 0.3.4", + "js-sys", + "serde_core", + "wasm-bindgen", ] [[package]] -name = "vec_map" -version = "0.8.2" +name = "vcpkg" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", - "winapi 0.3.9", "winapi-util", ] [[package]] name = "want" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "futures", - "log", "try-lock", ] @@ -3598,91 +4062,62 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasm-bindgen" -version = "0.2.84" +name = "wasip2" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "cfg-if 1.0.0", - "wasm-bindgen-macro", + "wit-bindgen", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.84" +name = "wasm-bindgen" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" dependencies = [ - "bumpalo", - "log", + "cfg-if 1.0.0", "once_cell", - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.109", + "rustversion", + "wasm-bindgen-macro", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ - "quote 1.0.23", + "quote 1.0.35", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.109", - "wasm-bindgen-backend", + "bumpalo", + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" - -[[package]] -name = "webpki" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d7967316d8411ca3b01821ee6c332bde138ba4363becdb492f12e514daa17f" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85d1f408918fd590908a70d36b7ac388db2edc221470333e4d6e5b598e44cabf" -dependencies = [ - "untrusted", - "webpki", -] - -[[package]] -name = "which" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" -dependencies = [ - "libc", + "unicode-ident", ] [[package]] @@ -3715,11 +4150,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "winapi 0.3.9", + "windows-sys 0.61.2", ] [[package]] @@ -3728,86 +4163,336 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows-targets 0.53.5", ] [[package]] name = "windows-sys" -version = "0.45.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-targets", + "windows-link 0.2.1", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" + +[[package]] +name = "wit-bindgen" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "ws" @@ -3815,16 +4500,16 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25fe90c75f236a0a00247d5900226aea4f2d7b05ccc34da9e7a8880ff59b5848" dependencies = [ - "byteorder 1.4.3", - "bytes", + "byteorder", + "bytes 0.4.12", "httparse", "log", - "mio", + "mio 0.6.23", "mio-extras", "rand 0.7.3", "sha-1", "slab", - "url 2.3.1", + "url", ] [[package]] @@ -3838,33 +4523,112 @@ dependencies = [ ] [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "x25519-dalek" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" dependencies = [ - "linked-hash-map", + "curve25519-dalek", + "rand_core 0.6.4", + "serde", + "zeroize", +] + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", + "synstructure 0.13.2", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", + "synstructure 0.13.2", ] [[package]] name = "zeroize" -version = "1.5.7" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.109", - "synstructure", + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", +] + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2 1.0.104", + "quote 1.0.35", + "syn 2.0.112", ] [[package]] @@ -3873,7 +4637,7 @@ version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" dependencies = [ - "byteorder 1.4.3", + "byteorder", "crc32fast", - "thiserror", + "thiserror 1.0.69", ] diff --git a/epicboxlib_source/Cargo.toml b/epicboxlib_source/Cargo.toml new file mode 100644 index 0000000..e7771e7 --- /dev/null +++ b/epicboxlib_source/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "epicboxlib" +version = "0.2.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies.grin_secp256k1zkp] +git = "https://github.com/EpicCash/rust-secp256k1-zkp" +branch = "master" +#path = "../../rust-secp256k1-zkp" +version = "0.8.0" +features = ["bullet-proof-sizing"] + +[dependencies] +epicboxlib = { path = "./epicboxlib" } + +# Add this if missing: +[[bin]] +name = "epicboxlib" +path = "src/main.rs" + diff --git a/epicboxlib_source/epic-wallet b/epicboxlib_source/epic-wallet new file mode 160000 index 0000000..e938a49 --- /dev/null +++ b/epicboxlib_source/epic-wallet @@ -0,0 +1 @@ +Subproject commit e938a49af714cf7136ada797ac6268ab798838fa diff --git a/epicboxlib/epicboxlib/Cargo.toml b/epicboxlib_source/epicboxlib/Cargo.toml similarity index 50% rename from epicboxlib/epicboxlib/Cargo.toml rename to epicboxlib_source/epicboxlib/Cargo.toml index b6609a3..08cf495 100644 --- a/epicboxlib/epicboxlib/Cargo.toml +++ b/epicboxlib_source/epicboxlib/Cargo.toml @@ -6,23 +6,29 @@ description = "A library that encapsulates epicbox integration." keywords = [ "epicbox", "vault713", "epic", "mimblewimble", "rust", "crypto", "cryptocurrency", "wallet713" ] license = "Apache-2.0" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] -colored = "1.7" +thiserror = "2.0.17" +colored = "3.0.0" failure = "0.1" log = "0.4" -parking_lot = {version = "0.6"} -rand = "0.5" +parking_lot = {version = "0.12.5"} +rand = "0.9.2" regex = "1" -ring = "0.13" +ring = "0.17.14" serde = "1.0" serde_derive = "1.0" serde_json = "1.0" -sha2 = "0.7" +sha2 = "0.10.9" ws = { version="0.9.2" } +zeroize = "1.8.2" +epic_wallet_libwallet = { path = "../epic-wallet/libwallet", version = "4.0.0" } -grin_secp256k1zkp = { version = "0.7.4", features = ["bullet-proof-sizing"]} +[dependencies.grin_secp256k1zkp] +git = "https://github.com/EpicCash/rust-secp256k1-zkp" +branch = "master" +#path = "../../rust-secp256k1-zkp" +version = "0.8.0" +features = ["bullet-proof-sizing"] -epic_core = { git = "https://github.com/EpicCash/epic", branch = "master" } -epic_wallet_libwallet = { git = "https://github.com/EpicCash/epic-wallet" , branch = "master" } diff --git a/epicboxlib/epicboxlib/src/client/close_reason.rs b/epicboxlib_source/epicboxlib/src/client/close_reason.rs similarity index 100% rename from epicboxlib/epicboxlib/src/client/close_reason.rs rename to epicboxlib_source/epicboxlib/src/client/close_reason.rs diff --git a/epicboxlib/epicboxlib/src/client/epicbox_publisher.rs b/epicboxlib_source/epicboxlib/src/client/epicbox_publisher.rs similarity index 73% rename from epicboxlib/epicboxlib/src/client/epicbox_publisher.rs rename to epicboxlib_source/epicboxlib/src/client/epicbox_publisher.rs index 96889e2..0dc0cb8 100644 --- a/epicboxlib/epicboxlib/src/client/epicbox_publisher.rs +++ b/epicboxlib_source/epicboxlib/src/client/epicbox_publisher.rs @@ -1,6 +1,6 @@ -use crate::error::Result; +use crate::error::ResultSingle; use crate::types::{EpicboxAddress, Slate}; pub trait EpicboxPublisher { - fn post_slate(&self, slate: &Slate, to: &EpicboxAddress) -> Result<()>; + fn post_slate(&self, slate: &Slate, to: &EpicboxAddress) -> ResultSingle<()>; } diff --git a/epicboxlib/epicboxlib/src/client/epicbox_subscriber.rs b/epicboxlib_source/epicboxlib/src/client/epicbox_subscriber.rs similarity index 51% rename from epicboxlib/epicboxlib/src/client/epicbox_subscriber.rs rename to epicboxlib_source/epicboxlib/src/client/epicbox_subscriber.rs index 731f415..3146ac4 100644 --- a/epicboxlib/epicboxlib/src/client/epicbox_subscriber.rs +++ b/epicboxlib_source/epicboxlib/src/client/epicbox_subscriber.rs @@ -1,8 +1,8 @@ -use crate::error::Result; +use crate::error::ResultSingle; use crate::client::EpicboxSubscriptionHandler; pub trait EpicboxSubscriber { - fn subscribe(&mut self, handler: Box) -> Result<()>; + fn subscribe(&mut self, handler: Box) -> ResultSingle<()>; fn unsubscribe(&self); fn is_running(&self) -> bool; } diff --git a/epicboxlib/epicboxlib/src/client/epicbox_subscription_handler.rs b/epicboxlib_source/epicboxlib/src/client/epicbox_subscription_handler.rs similarity index 100% rename from epicboxlib/epicboxlib/src/client/epicbox_subscription_handler.rs rename to epicboxlib_source/epicboxlib/src/client/epicbox_subscription_handler.rs diff --git a/epicboxlib/epicboxlib/src/client/mod.rs b/epicboxlib_source/epicboxlib/src/client/mod.rs similarity index 100% rename from epicboxlib/epicboxlib/src/client/mod.rs rename to epicboxlib_source/epicboxlib/src/client/mod.rs diff --git a/epicboxlib_source/epicboxlib/src/error.rs b/epicboxlib_source/epicboxlib/src/error.rs new file mode 100644 index 0000000..1f6babb --- /dev/null +++ b/epicboxlib_source/epicboxlib/src/error.rs @@ -0,0 +1,42 @@ +use crate::types::EpicboxError; + +pub type ResultSingle = std::result::Result; + +#[derive(Clone, thiserror::Error, PartialEq, Debug)] +pub enum Error { + #[error("Generic Error: {}", 0)] + GenericError(String), + #[error("Secp error")] + SecpError(secp256k1zkp::Error), + #[error("Base58 Error: invalid character!")] + InvalidBase58Character(char, usize), + #[error("Base58 Error: invalid length!")] + InvalidBase58Length, + #[error("Base58 Error: invalid checksum!")] + InvalidBase58Checksum, + #[error("Base58 Error: invalid network!")] + InvalidBase58Version, + #[error("Base58 Error: invalid key!")] + InvalidBase58Key, + #[error("Could not parse number from string!")] + NumberParsingError, + #[error("Could not parse `{}` to a epicbox address!", 0)] + EpicboxAddressParsingError(String), + #[error("Encryption Error: unable to encrypt message")] + Encryption, + #[error("Decryption Error: unable to decrypt message")] + Decryption, + #[error("VerifyProof Error: unable to verify proof")] + VerifyProof, + #[error("Websocket Error: epicbox websocket terminated unexpectedly!")] + EpicboxWebsocketAbnormalTermination, + #[error("Protocol Error: epicbox protocol error `{}`", 0)] + EpicboxProtocolError(EpicboxError), +} + +impl From for Error { + fn from(error: secp256k1zkp::Error) -> Error { + Error::SecpError(error) + } +} + diff --git a/epicboxlib/epicboxlib/src/lib.rs b/epicboxlib_source/epicboxlib/src/lib.rs similarity index 91% rename from epicboxlib/epicboxlib/src/lib.rs rename to epicboxlib_source/epicboxlib/src/lib.rs index 69eccf5..bf3a67c 100644 --- a/epicboxlib/epicboxlib/src/lib.rs +++ b/epicboxlib_source/epicboxlib/src/lib.rs @@ -1,6 +1,5 @@ extern crate colored; extern crate failure; -#[macro_use] extern crate log; extern crate parking_lot; extern crate regex; @@ -12,7 +11,6 @@ extern crate serde_json; extern crate sha2; extern crate ws; -extern crate epic_core; pub mod client; pub mod error; diff --git a/epicboxlib/epicboxlib/src/types/epicbox_address.rs b/epicboxlib_source/epicboxlib/src/types/epicbox_address.rs similarity index 89% rename from epicboxlib/epicboxlib/src/types/epicbox_address.rs rename to epicboxlib_source/epicboxlib/src/types/epicbox_address.rs index fba5ae6..065342f 100644 --- a/epicboxlib/epicboxlib/src/types/epicbox_address.rs +++ b/epicboxlib_source/epicboxlib/src/types/epicbox_address.rs @@ -1,7 +1,7 @@ use regex::Regex; use std::fmt::{self, Display}; -use crate::error::{ErrorKind, Result}; +use crate::error::{Error, ResultSingle}; use crate::utils::crypto::Base58; use crate::utils::is_mainnet; use crate::utils::secp::PublicKey; @@ -20,7 +20,7 @@ pub fn version_bytes() -> Vec { } } -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] +#[derive(Serialize, Deserialize, Default, Debug, Clone, PartialEq)] pub struct EpicboxAddress { pub public_key: String, pub domain: String, @@ -52,11 +52,11 @@ impl EpicboxAddress { } } - pub fn from_str(s: &str) -> Result { + pub fn from_str(s: &str) -> ResultSingle { let re = Regex::new(EPICBOX_ADDRESS_REGEX).unwrap(); let captures = re.captures(s); if captures.is_none() { - Err(ErrorKind::EpicboxAddressParsingError(s.to_string()))?; + Err(Error::EpicboxAddressParsingError(s.to_string()))?; } let captures = captures.unwrap(); @@ -71,11 +71,11 @@ impl EpicboxAddress { Ok(EpicboxAddress::new(public_key, domain, port)) } - pub fn from_str_raw(s: &str) -> Result { + pub fn from_str_raw(s: &str) -> ResultSingle { let re = Regex::new(EPICBOX_ADDRESS_REGEX).unwrap(); let captures = re.captures(s); if captures.is_none() { - Err(ErrorKind::EpicboxAddressParsingError(s.to_string()))?; + Err(Error::EpicboxAddressParsingError(s.to_string()))?; } let captures = captures.unwrap(); @@ -95,7 +95,7 @@ impl EpicboxAddress { )) } - pub fn public_key(&self) -> Result { + pub fn public_key(&self) -> ResultSingle { PublicKey::from_base58_check(&self.public_key, version_bytes()) } diff --git a/epicboxlib_source/epicboxlib/src/types/epicbox_message.rs b/epicboxlib_source/epicboxlib/src/types/epicbox_message.rs new file mode 100644 index 0000000..9bac6fa --- /dev/null +++ b/epicboxlib_source/epicboxlib/src/types/epicbox_message.rs @@ -0,0 +1,119 @@ +use rand::random; +use ring::{aead, pbkdf2}; +use std::num::NonZeroU32; + +use crate::error::{Error, ResultSingle}; +use crate::utils::{from_hex, to_hex}; +use crate::utils::secp::{Secp256k1, PublicKey, SecretKey}; +use crate::types::EpicboxAddress; + +#[derive(Debug, Serialize, Deserialize)] +pub struct EpicboxMessage { + #[serde(default)] + pub destination: Option, + encrypted_message: String, + salt: String, + nonce: String, +} + +impl EpicboxMessage { + pub fn new( + message: String, + destination: &EpicboxAddress, + receiver_public_key: &PublicKey, + secret_key: &SecretKey, + ) -> ResultSingle { + let secp = Secp256k1::new(); + let mut common_secret = receiver_public_key.clone(); + common_secret + .mul_assign(&secp, secret_key) + .map_err(|_| Error::Encryption)?; + let common_secret_ser = common_secret.serialize_vec(&secp, true); + let common_secret_slice = &common_secret_ser[1..33]; + + let salt: [u8; 8] = random(); + let nonce: [u8; 12] = random(); + let mut key = [0; 32]; + + pbkdf2::derive( + ring::pbkdf2::PBKDF2_HMAC_SHA512, + NonZeroU32::new(100).unwrap(), + &salt, + common_secret_slice, + &mut key, + ); + + let mut enc_bytes = message.as_bytes().to_vec(); + + let unbound_key = aead::UnboundKey::new(&aead::CHACHA20_POLY1305, &key).unwrap(); + let sealing_key: aead::LessSafeKey = aead::LessSafeKey::new(unbound_key); + let aad = aead::Aad::from(&[]); + let res = sealing_key.seal_in_place_append_tag( + aead::Nonce::assume_unique_for_key(nonce), + aad, + &mut enc_bytes, + ); + if let Err(_) = res { + return Err(Error::Encryption)?; + } + Ok(EpicboxMessage { + destination: Some(destination.clone()), + encrypted_message: to_hex(enc_bytes), + salt: to_hex(salt.to_vec()), + nonce: to_hex(nonce.to_vec()), + }) + } + + pub fn key(&self, sender_public_key: &PublicKey, secret_key: &SecretKey) -> ResultSingle<[u8; 32]> { + let salt = from_hex(self.salt.clone()).map_err(|_| Error::Decryption)?; + + let secp = Secp256k1::new(); + let mut common_secret = sender_public_key.clone(); + common_secret + .mul_assign(&secp, secret_key) + .map_err(|_| Error::Decryption)?; + let common_secret_ser = common_secret.serialize_vec(&secp, true); + let common_secret_slice = &common_secret_ser[1..33]; + + let mut key = [0; 32]; + + let len = std::num::NonZeroU32::new(100).unwrap(); + + pbkdf2::derive( + pbkdf2::PBKDF2_HMAC_SHA512, + len, + &salt, + common_secret_slice, + &mut key, + ); + + Ok(key) + } + + pub fn decrypt_with_key(&self, key: &[u8; 32]) -> ResultSingle { + let mut encrypted_message = + from_hex(self.encrypted_message.clone()).map_err(|_| Error::Decryption)?; + let nonce = from_hex(self.nonce.clone()).map_err(|_| Error::Decryption)?; + + let mut n = [0u8; 12]; + n.copy_from_slice(&nonce[0..12]); + + let unbound_key = aead::UnboundKey::new(&aead::CHACHA20_POLY1305, key).unwrap(); + let opening_key: aead::LessSafeKey = aead::LessSafeKey::new(unbound_key); + let aad = aead::Aad::from(&[]); + let res = opening_key.open_in_place( + aead::Nonce::assume_unique_for_key(n), + aad, + &mut encrypted_message, + ); + + if let Err(_) = res { + return Err(Error::Encryption)?; + } + for _ in 0..aead::AES_256_GCM.tag_len() { + encrypted_message.pop(); + } + + String::from_utf8(encrypted_message.to_vec()).map_err(|_| Error::Decryption.into()) + } +} diff --git a/epicboxlib/epicboxlib/src/types/epicbox_request.rs b/epicboxlib_source/epicboxlib/src/types/epicbox_request.rs similarity index 100% rename from epicboxlib/epicboxlib/src/types/epicbox_request.rs rename to epicboxlib_source/epicboxlib/src/types/epicbox_request.rs diff --git a/epicboxlib/epicboxlib/src/types/epicbox_response.rs b/epicboxlib_source/epicboxlib/src/types/epicbox_response.rs similarity index 100% rename from epicboxlib/epicboxlib/src/types/epicbox_response.rs rename to epicboxlib_source/epicboxlib/src/types/epicbox_response.rs diff --git a/epicboxlib/epicboxlib/src/types/mod.rs b/epicboxlib_source/epicboxlib/src/types/mod.rs similarity index 92% rename from epicboxlib/epicboxlib/src/types/mod.rs rename to epicboxlib_source/epicboxlib/src/types/mod.rs index 8bddd23..e48dd4c 100644 --- a/epicboxlib/epicboxlib/src/types/mod.rs +++ b/epicboxlib_source/epicboxlib/src/types/mod.rs @@ -4,12 +4,12 @@ mod epicbox_request; mod epicbox_response; mod tx_proof; -//pub use epic_wallet::libwallet::slate::Slate; -pub use epic_wallet_libwallet::slate::Slate; + pub use parking_lot::{Mutex, MutexGuard}; pub use std::sync::Arc; pub use self::epicbox_address::{EpicboxAddress, EPICBOX_ADDRESS_VERSION_MAINNET, EPICBOX_ADDRESS_VERSION_TESTNET, version_bytes}; +pub use epic_wallet_libwallet::slate::Slate; pub use self::epicbox_message::EpicboxMessage; pub use self::epicbox_request::EpicboxRequest; pub use self::epicbox_response::{EpicboxError, EpicboxResponse}; diff --git a/epicboxlib/epicboxlib/src/types/tx_proof.rs b/epicboxlib_source/epicboxlib/src/types/tx_proof.rs similarity index 100% rename from epicboxlib/epicboxlib/src/types/tx_proof.rs rename to epicboxlib_source/epicboxlib/src/types/tx_proof.rs diff --git a/epicboxlib/epicboxlib/src/utils/base58.rs b/epicboxlib_source/epicboxlib/src/utils/base58.rs similarity index 85% rename from epicboxlib/epicboxlib/src/utils/base58.rs rename to epicboxlib_source/epicboxlib/src/utils/base58.rs index 1598a0d..6eae7c9 100644 --- a/epicboxlib/epicboxlib/src/utils/base58.rs +++ b/epicboxlib_source/epicboxlib/src/utils/base58.rs @@ -1,4 +1,4 @@ -use crate::error::{ErrorKind, Result}; +use crate::error::{Error, ResultSingle}; use sha2::{Digest, Sha256}; const ALPHABET: &'static [u8] = b"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; @@ -22,8 +22,8 @@ pub trait ToBase58 { /// A trait for converting base58 encoded values. pub trait FromBase58 { /// Convert a value of `self`, interpreted as base58 encoded data, into an owned vector of bytes, returning a vector. - fn from_base58(&self) -> Result>; - fn from_base58_check(&self, version_bytes: usize) -> Result<(Vec, Vec)>; + fn from_base58(&self) -> ResultSingle>; + fn from_base58_check(&self, version_bytes: usize) -> ResultSingle<(Vec, Vec)>; } impl ToBase58 for [u8] { @@ -71,14 +71,14 @@ impl ToBase58 for [u8] { fn to_base58_check(&self, version: Vec) -> String { let mut payload: Vec = version.iter().chain(self.iter()).map(|x| *x).collect(); - let mut checksum = double_sha256(&payload); + let checksum = double_sha256(&payload); payload.append(&mut checksum[..4].to_vec()); payload.to_base58() } } impl FromBase58 for str { - fn from_base58(&self) -> Result> { + fn from_base58(&self) -> ResultSingle> { let mut bin = [0u8; 132]; let mut out = [0u32; (132 + 3) / 4]; let bytesleft = (bin.len() % 4) as u8; @@ -94,12 +94,12 @@ impl FromBase58 for str { while i < self.len() { if (b58[i] & 0x80) != 0 { // High-bit set on invalid digit - Err(ErrorKind::InvalidBase58Character(b58[i] as char, i))?; + Err(Error::InvalidBase58Character(b58[i] as char, i))?; } if B58_DIGITS_MAP[b58[i] as usize] == -1 { // // Invalid base58 digit - Err(ErrorKind::InvalidBase58Character(b58[i] as char, i))?; + Err(Error::InvalidBase58Character(b58[i] as char, i))?; } let mut c = B58_DIGITS_MAP[b58[i] as usize] as u64; @@ -113,12 +113,12 @@ impl FromBase58 for str { if c != 0 { // Output number too big (carry to the next int32) - Err(ErrorKind::InvalidBase58Length)?; + Err(Error::InvalidBase58Length)?; } if (out[0] & zeromask) != 0 { // Output number too big (last int32 filled too far) - Err(ErrorKind::InvalidBase58Length)?; + Err(Error::InvalidBase58Length)?; } i += 1; @@ -153,16 +153,16 @@ impl FromBase58 for str { Ok(bin[leading_zeros - zcount..].to_vec()) } - fn from_base58_check(&self, version_bytes: usize) -> Result<(Vec, Vec)> { + fn from_base58_check(&self, version_bytes: usize) -> ResultSingle<(Vec, Vec)> { let mut payload: Vec = self.from_base58()?; if payload.len() < 5 { - Err(ErrorKind::InvalidBase58Checksum)?; + Err(Error::InvalidBase58Checksum)?; } let checksum_index = payload.len() - 4; let provided_checksum = payload.split_off(checksum_index); let checksum = double_sha256(&payload)[..4].to_vec(); if checksum != provided_checksum { - Err(ErrorKind::InvalidBase58Checksum)?; + Err(Error::InvalidBase58Checksum)?; } Ok(( payload[..version_bytes].to_vec(), @@ -173,10 +173,10 @@ impl FromBase58 for str { fn double_sha256(payload: &[u8]) -> Vec { let mut hasher = Sha256::new(); - hasher.input(&payload); - let hash = hasher.result(); + hasher.update(&payload); + let hash = hasher.finalize_reset(); let mut hasher = Sha256::new(); - hasher.input(&hash); - let hash = hasher.result(); + hasher.update(&hash); + let hash = hasher.finalize(); hash.to_vec() } diff --git a/epicboxlib/epicboxlib/src/utils/crypto.rs b/epicboxlib_source/epicboxlib/src/utils/crypto.rs similarity index 67% rename from epicboxlib/epicboxlib/src/utils/crypto.rs rename to epicboxlib_source/epicboxlib/src/utils/crypto.rs index 1363fab..3f29aa2 100644 --- a/epicboxlib/epicboxlib/src/utils/crypto.rs +++ b/epicboxlib_source/epicboxlib/src/utils/crypto.rs @@ -1,21 +1,21 @@ use sha2::{Digest, Sha256}; -use crate::error::{ErrorKind, Result}; +use crate::error::{Error, ResultSingle}; use super::base58::{FromBase58, ToBase58}; use super::secp::{Message, Secp256k1, Signature, Commitment, PublicKey, SecretKey}; use super::{from_hex, to_hex}; pub trait Hex { - fn from_hex(str: &str) -> Result; + fn from_hex(str: &str) -> ResultSingle; fn to_hex(&self) -> String; } pub trait Base58 { - fn from_base58(str: &str) -> Result; + fn from_base58(str: &str) -> ResultSingle; fn to_base58(&self) -> String; - fn from_base58_check(str: &str, version_bytes: Vec) -> Result; - fn from_base58_check_raw(str: &str, version_bytes: usize) -> Result<(T, Vec)>; + fn from_base58_check(str: &str, version_bytes: Vec) -> ResultSingle; + fn from_base58_check_raw(str: &str, version_bytes: usize) -> ResultSingle<(T, Vec)>; fn to_base58_check(&self, version: Vec) -> String; } @@ -26,10 +26,10 @@ fn serialize_public_key(public_key: &PublicKey) -> Vec { } impl Hex for PublicKey { - fn from_hex(str: &str) -> Result { + fn from_hex(str: &str) -> ResultSingle { let secp = Secp256k1::new(); let hex = from_hex(str.to_string())?; - PublicKey::from_slice(&secp, &hex).map_err(|_| ErrorKind::InvalidBase58Key.into()) + PublicKey::from_slice(&secp, &hex).map_err(|_| Error::InvalidBase58Key.into()) } fn to_hex(&self) -> String { @@ -38,31 +38,31 @@ impl Hex for PublicKey { } impl Base58 for PublicKey { - fn from_base58(str: &str) -> Result { + fn from_base58(str: &str) -> ResultSingle { let secp = Secp256k1::new(); let str = str::from_base58(str)?; - PublicKey::from_slice(&secp, &str).map_err(|_| ErrorKind::InvalidBase58Key.into()) + PublicKey::from_slice(&secp, &str).map_err(|_| Error::InvalidBase58Key.into()) } fn to_base58(&self) -> String { serialize_public_key(self).to_base58() } - fn from_base58_check_raw(str: &str, version_bytes: usize) -> Result<(PublicKey, Vec)> { + fn from_base58_check_raw(str: &str, version_bytes: usize) -> ResultSingle<(PublicKey, Vec)> { let secp = Secp256k1::new(); let (version_bytes, key_bytes) = str::from_base58_check(str, version_bytes)?; - let public_key = PublicKey::from_slice(&secp, &key_bytes).map_err(|_| ErrorKind::InvalidBase58Key)?; + let public_key = PublicKey::from_slice(&secp, &key_bytes).map_err(|_| Error::InvalidBase58Key)?; Ok((public_key, version_bytes)) } - fn from_base58_check(str: &str, version_expect: Vec) -> Result { + fn from_base58_check(str: &str, version_expect: Vec) -> ResultSingle { let secp = Secp256k1::new(); let n_version = version_expect.len(); let (version_actual, key_bytes) = str::from_base58_check(str, n_version)?; if version_actual != version_expect { - return Err(ErrorKind::InvalidBase58Version.into()); + return Err(Error::InvalidBase58Version.into()); } - PublicKey::from_slice(&secp, &key_bytes).map_err(|_| ErrorKind::InvalidBase58Key.into()) + PublicKey::from_slice(&secp, &key_bytes).map_err(|_| Error::InvalidBase58Key.into()) } fn to_base58_check(&self, version: Vec) -> String { @@ -71,10 +71,10 @@ impl Base58 for PublicKey { } impl Hex for Signature { - fn from_hex(str: &str) -> Result { + fn from_hex(str: &str) -> ResultSingle { let secp = Secp256k1::new(); let hex = from_hex(str.to_string())?; - Signature::from_der(&secp, &hex).map_err(|_| ErrorKind::SecpError.into()) + Signature::from_der(&secp, &hex).map_err(|e| Error::SecpError(e)) } fn to_hex(&self) -> String { @@ -85,10 +85,10 @@ impl Hex for Signature { } impl Hex for SecretKey { - fn from_hex(str: &str) -> Result { + fn from_hex(str: &str) -> ResultSingle { let secp = Secp256k1::new(); let data = from_hex(str.to_string())?; - SecretKey::from_slice(&secp, &data).map_err(|_| ErrorKind::SecpError.into()) + SecretKey::from_slice(&secp, &data).map_err(|e| Error::SecpError(e)) } fn to_hex(&self) -> String { @@ -97,7 +97,7 @@ impl Hex for SecretKey { } impl Hex for Commitment { - fn from_hex(str: &str) -> Result { + fn from_hex(str: &str) -> ResultSingle { let data = from_hex(str.to_string())?; Ok(Commitment::from_vec(data)) } @@ -107,29 +107,29 @@ impl Hex for Commitment { } } -pub fn public_key_from_secret_key(secret_key: &SecretKey) -> Result { +pub fn public_key_from_secret_key(secret_key: &SecretKey) -> ResultSingle { let secp = Secp256k1::new(); - PublicKey::from_secret_key(&secp, secret_key).map_err(|_| ErrorKind::SecpError.into()) + PublicKey::from_secret_key(&secp, secret_key).map_err(|e| Error::SecpError(e)) } -pub fn sign_challenge(challenge: &str, secret_key: &SecretKey) -> Result { +pub fn sign_challenge(challenge: &str, secret_key: &SecretKey) -> ResultSingle { let mut hasher = Sha256::new(); - hasher.input(challenge.as_bytes()); - let message = Message::from_slice(hasher.result().as_slice())?; + hasher.update(challenge.as_bytes()); + let message = Message::from_slice(hasher.finalize_reset().as_slice())?; let secp = Secp256k1::new(); secp.sign(&message, secret_key) - .map_err(|_| ErrorKind::SecpError.into()) + .map_err(|e| Error::SecpError(e)) } pub fn verify_signature( challenge: &str, signature: &Signature, public_key: &PublicKey, -) -> Result<()> { +) -> ResultSingle<()> { let mut hasher = Sha256::new(); - hasher.input(challenge.as_bytes()); - let message = Message::from_slice(hasher.result().as_slice())?; + hasher.update(challenge.as_bytes()); + let message = Message::from_slice(hasher.finalize().as_slice())?; let secp = Secp256k1::new(); secp.verify(&message, signature, public_key) - .map_err(|_| ErrorKind::SecpError.into()) + .map_err(|e| Error::SecpError(e)) } diff --git a/epicboxlib/epicboxlib/src/utils/mod.rs b/epicboxlib_source/epicboxlib/src/utils/mod.rs similarity index 62% rename from epicboxlib/epicboxlib/src/utils/mod.rs rename to epicboxlib_source/epicboxlib/src/utils/mod.rs index c21a04a..ecf5b25 100644 --- a/epicboxlib/epicboxlib/src/utils/mod.rs +++ b/epicboxlib_source/epicboxlib/src/utils/mod.rs @@ -1,7 +1,11 @@ + +/// Temporary stub for network selection. Returns true for mainnet. +pub fn is_mainnet() -> bool { + true // Change as needed for your environment +} use std::fmt::Write; -use crate::error::{Result, ErrorKind}; +use crate::error::{Error, ResultSingle}; -pub use epic_core::global::is_mainnet; pub mod base58; pub mod crypto; @@ -17,9 +21,9 @@ pub fn to_hex(bytes: Vec) -> String { } /// Decode a hex string into bytes. -pub fn from_hex(hex_str: String) -> Result> { +pub fn from_hex(hex_str: String) -> ResultSingle> { if hex_str.len() % 2 == 1 { - Err(ErrorKind::NumberParsingError)?; + Err(Error::NumberParsingError)?; } let hex_trim = if &hex_str[..2] == "0x" { hex_str[2..].to_owned() @@ -28,8 +32,8 @@ pub fn from_hex(hex_str: String) -> Result> { }; let vec = split_n(&hex_trim.trim()[..], 2) .iter() - .map(|b| u8::from_str_radix(b, 16).map_err(|_| ErrorKind::NumberParsingError.into())) - .collect::>>()?; + .map(|b| u8::from_str_radix(b, 16).map_err(|_| Error::NumberParsingError.into())) + .collect::>>()?; Ok(vec) } diff --git a/epicboxlib/epicboxlib/src/utils/secp.rs b/epicboxlib_source/epicboxlib/src/utils/secp.rs similarity index 100% rename from epicboxlib/epicboxlib/src/utils/secp.rs rename to epicboxlib_source/epicboxlib/src/utils/secp.rs diff --git a/epicboxlib_source/src/main.rs b/epicboxlib_source/src/main.rs new file mode 100644 index 0000000..ef2df4d --- /dev/null +++ b/epicboxlib_source/src/main.rs @@ -0,0 +1,46 @@ +use epicboxlib::error::{Error, ResultSingle}; +use epicboxlib::types::{EpicboxAddress, EpicboxError}; +use epicboxlib::utils::crypto::{verify_signature, Base58, Hex}; +use epicboxlib::utils::secp::{PublicKey, Signature}; + +use std::env; + +fn main() { + let args: Vec = env::args().collect(); + + let verifysignature: &str = "verifysignature"; + let verifyaddress: &str = "verifyaddress"; + + if verifysignature.eq(args[1].as_str()) { + let answer = + match verify_signature_main(args[2].as_str(), args[3].as_str(), args[4].as_str()) { + Ok(_answer) => true, + Err(_e) => false, + }; + + print!("{}", answer); + } else if verifyaddress.eq(args[1].as_str()) { + let mut fromok = true; + let mut took = true; + let from_address = EpicboxAddress::from_str_raw(&args[2]); + if from_address.is_err() { + fromok = false; + } + + let to_address = EpicboxAddress::from_str_raw(&args[3]); + if to_address.is_err() { + took = false + } + print!("{}", (fromok && took)); + } else { + print!("{}", false); + } +} + +fn verify_signature_main(public_key: &str, challenge: &str, signature: &str) -> ResultSingle<()> { + let (public_key, _) = PublicKey::from_base58_check_raw(public_key, 2)?; + let signature = Signature::from_hex(signature)?; + verify_signature(challenge, &signature, &public_key) + .map_err(|_| Error::EpicboxProtocolError(EpicboxError::InvalidSignature))?; + Ok(()) +} diff --git a/epicboxlib_source/target/CACHEDIR.TAG b/epicboxlib_source/target/CACHEDIR.TAG new file mode 100644 index 0000000..20d7c31 --- /dev/null +++ b/epicboxlib_source/target/CACHEDIR.TAG @@ -0,0 +1,3 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by cargo. +# For information about cache directory tags see https://bford.info/cachedir/ diff --git a/mongo-init.js b/mongo-init.js new file mode 100644 index 0000000..662f645 --- /dev/null +++ b/mongo-init.js @@ -0,0 +1,13 @@ +db = db.getSiblingDB('epicbox'); + +db.createUser({ + user: "epicbox", + pwd: "epicboxpass", + roles: [ + { role: "readWrite", db: "epicbox" } + ] +}); + +db.slates.createIndex({queue:1, made:1, createdat: 1}); +db.slates.createIndex({messageid:1, made:1}); +db.slates.createIndex({ "createdat": 1 }, {expireAfterSeconds: 604800 }); diff --git a/nginx/nginx.conf.template b/nginx/nginx.conf.template new file mode 100644 index 0000000..be2dadc --- /dev/null +++ b/nginx/nginx.conf.template @@ -0,0 +1,24 @@ +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + +events { + worker_connections 1024; +} + +http { + upstream epicbox_backend { + ip_hash; + server epicbox1:3423 max_fails=3 fail_timeout=10s; + server epicbox2:3423 max_fails=3 fail_timeout=10s; + } + + server { + listen 80; + server_name _; + return 301 https://$host$request_uri; + } + +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..ebfa2cc --- /dev/null +++ b/package-lock.json @@ -0,0 +1,355 @@ +{ + "name": "epicboxnodejs", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "epicboxnodejs", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "mongodb": "^5.1.0", + "uid2": "^1.0.0", + "ws": "^8.12.1" + } + }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.1.tgz", + "integrity": "sha512-t7c5K033joZZMspnHg/gWPE4kandgc2OxE74aYOtGKfgB9VPuVJPix0H6fhmm2erj5PBJ21mqcx34lpIGtUCsQ==", + "optional": true, + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, + "node_modules/@types/node": { + "version": "20.10.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz", + "integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/webidl-conversions": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" + }, + "node_modules/@types/whatwg-url": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", + "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "dependencies": { + "@types/node": "*", + "@types/webidl-conversions": "*" + } + }, + "node_modules/bson": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz", + "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==", + "engines": { + "node": ">=14.20.1" + } + }, + "node_modules/ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "node_modules/mongodb": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.2.tgz", + "integrity": "sha512-H60HecKO4Bc+7dhOv4sJlgvenK4fQNqqUIlXxZYQNbfEWSALGAwGoyJd/0Qwk4TttFXUOHJ2ZJQe/52ScaUwtQ==", + "dependencies": { + "bson": "^5.5.0", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" + }, + "engines": { + "node": ">=14.20.1" + }, + "optionalDependencies": { + "@mongodb-js/saslprep": "^1.1.0" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.0.0", + "kerberos": "^1.0.0 || ^2.0.0", + "mongodb-client-encryption": ">=2.3.0 <3", + "snappy": "^7.2.2" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + } + } + }, + "node_modules/mongodb-connection-string-url": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", + "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", + "dependencies": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^11.0.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "optional": true, + "dependencies": { + "memory-pager": "^1.0.2" + } + }, + "node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/uid2": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uid2/-/uid2-1.0.0.tgz", + "integrity": "sha512-+I6aJUv63YAcY9n4mQreLUt0d4lvwkkopDNmpomkAUz0fAkEMV9pRWxN0EjhW1YfRhcuyHg2v3mwddCDW1+LFQ==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + }, + "dependencies": { + "@mongodb-js/saslprep": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.1.tgz", + "integrity": "sha512-t7c5K033joZZMspnHg/gWPE4kandgc2OxE74aYOtGKfgB9VPuVJPix0H6fhmm2erj5PBJ21mqcx34lpIGtUCsQ==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, + "@types/node": { + "version": "20.10.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz", + "integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==", + "requires": { + "undici-types": "~5.26.4" + } + }, + "@types/webidl-conversions": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" + }, + "@types/whatwg-url": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", + "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "requires": { + "@types/node": "*", + "@types/webidl-conversions": "*" + } + }, + "bson": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz", + "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==" + }, + "ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "mongodb": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.2.tgz", + "integrity": "sha512-H60HecKO4Bc+7dhOv4sJlgvenK4fQNqqUIlXxZYQNbfEWSALGAwGoyJd/0Qwk4TttFXUOHJ2ZJQe/52ScaUwtQ==", + "requires": { + "@mongodb-js/saslprep": "^1.1.0", + "bson": "^5.5.0", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" + } + }, + "mongodb-connection-string-url": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", + "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", + "requires": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^11.0.0" + } + }, + "punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" + }, + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" + }, + "socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "requires": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + } + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, + "tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "requires": { + "punycode": "^2.1.1" + } + }, + "uid2": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uid2/-/uid2-1.0.0.tgz", + "integrity": "sha512-+I6aJUv63YAcY9n4mQreLUt0d4lvwkkopDNmpomkAUz0fAkEMV9pRWxN0EjhW1YfRhcuyHg2v3mwddCDW1+LFQ==" + }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" + }, + "whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "requires": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + } + }, + "ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "requires": {} + } + } +} diff --git a/package.json b/package.json index cc59cc2..6792a1f 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,9 @@ "name": "epicboxnodejs", "version": "1.0.0", "description": "", - "main": "app.js", + "main": "app_mongo.js", "scripts": { + "start": "node app_mongo.js", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "",