Jump to content

Search the Community

Showing results for tags 'nodejs'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • BlockForums Announcements
    • Denarius Announcements
    • Kronos Wallet Announcements
    • The Crypto News Feed
  • Cryptocurrency Discussions
    • Cryptocurrencies
    • Altcoin Announcements
    • General Discussion
    • Tutorials & Help
  • Denarius Discussions
    • General Discussion
    • Tutorials & Help
    • Marketing & PR
    • Development
    • Mining & Staking
    • Trading & Exchanges
    • Marketplace
  • Programming & Design
    • Development QA
    • Design QA
  • Gaming
    • Bot Downloads & Discussion
    • Gaming Discussion
  • Classifieds
    • Buy Sell and Trade
  • Other Discussions
    • Element 115
    • The Lounge
    • Hardware & IoT
    • Tutorials & Guides
    • Domains & Hosting

Product Groups

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


BTC Address

Found 5 results

  1. A basic example of a Discord.js bot that can autoupdate every 5 seconds based on an API using fetch. Install nodejs and some packages. Linux x64 or ARM, example below is 64-bit. wget https://nodejs.org/dist/v16.0.0/node-v16.0.0-linux-x64.tar.xz tar xvf node-v16.0.0-linux-x64.tar.xz cd node-v16.0.0-linux-x64/ sudo cp -R bin/* /usr/bin/ sudo cp -R lib/* /usr/lib/ npm install discord.js npm install node-fetch blockheight.js https://gist.github.com/buzzkillb/63a66f27ff65c6dd880a6c3eae740602 //npm install discord.js node-fetch //get blockheight from Chainz CryptoID and update Bots Name as Blockheight const Discord = require('discord.js'); const fetch = require('node-fetch'); const config = require("./config.json"); var chainzApi = "https://chainz.cryptoid.info/d/api.dws?q=getblockcount" const client = new Discord.Client(); client.on('ready', async () => { client.user.setActivity('denarius.io'); const GUILD_ID = client.guilds.cache.map(guild => guild.id); const guild = await client.guilds.fetch(GUILD_ID); console.log('Bot is connected...'); setInterval(async function(){ fetch(chainzApi) .then(function (response) { // Get a JSON object from the response // This is a weird quirk of Fetch return response.json(); }).then(function (data) { // Log the data to the console, block height console.log(data); var blockHeight = "Height: " + data guild.me.setNickname(blockHeight); }) }, 5000); }); client.login(config.BOT_TOKEN); config.json { "BOT_TOKEN": "DISCORDGENERATEDTOKENGOESHERE" } How to add the bot to a server and get your BOT_TOKEN Authorizing Discord User Visit https://discord.com/developers/applications and create 'New Application'. Set a bot name like BlockHead On the page that follows, set the account name and save. Then click Bot Create a Bot account and Save. Click 'Copy' on the Token; this is the API Key you use in the bot script Visit the OAuth2 tab. Under Scopes, select 'bot' The resulting URL is what you (or anyone) use to add your bot instance to a server.
  2. KRONOS Kronos (Originally Denarius Pi - dPi) is a AIO interface/wallet for Denarius. Kronos was originally built with the intention of running it and installing it on Raspberry Pi Ubuntu systems, but now can be used mostly for all Linux distros. It is recommended to have at least 2GB of RAM to install and run Kronos (It also runs a Denarius node). Please go to the last page of this thread for updated information. Kronos has progressed massively overtime and this information can be out-of-date and deprecated. Features: Send and Receive D Denarius Addresses with P2PK and P2PKH scripthashed balances Import and Export Private Keys View Transactions Terminal (Access your terminal for advanced use or restarting your Denarius node manually) Generate Minikeys Convert Minkeys Encrypted Local LevelDB 24 Word Seed Phrases Block Explorer (View Addresses, Transactions, and Blocks) Stake your Denarius Monitor your configured FortunaStakes Verify Denarius Messages Sign Denarius Messages Backup Wallet Send Raw Transactions View Current OS Enviroment Statistics like CPU and Memory Usage Runs on local network by default, so great for running on a local Pi or Linux box and then accessing it from your phone or other computer, can also run it locally if viewing with a monitor on a Pi or Linux box. More Coming Soon How to Install: Run one of these commands depending on your flavor of Linux! wget -qO- https://raw.githubusercontent.com/carsenk/kronos/master/installkronos.sh | bash or curl -o- https://raw.githubusercontent.com/carsenk/kronos/master/installkronos.sh | bash Github: https://github.com/carsenk/kronos Screenshot of Kronos: Screenshots when this all started (dPi): More information and list of features will be coming soon! Stay tuned! It will be a one liner install script to run.
  3. Currently looking for a version of NodeJS compiled natively on Apple M1 (Apple Silicon) aka ARMv8 for macOS Seems all current and past NodeJS builds including current nightlies do not contain any Darwin ARM binaries yet. I may attempt to compile v12.18.3 for Darwin ARM if no release soon...Read below for updates....NodeJS v15 compiled successfully on macOS Big Sur 11.0.1 - Kernel 20.1.0 - Darwin ARM64 M1 Chip
  4. How to easily swap or change endianness in Javascript, NodeJS, etc. with one simple function! changeEndianness() const changeEndianness = (string) => { const result = []; let len = string.length - 2; while (len >= 0) { result.push(string.substr(len, 2)); len -= 2; } return result.join(''); } You can then use this function with any string to convert its endianness Example of using function: var yourstringvar = 'Your string goes here to swap endianness'; var newendian = changeEndianness(yourstringvar); console.log('Your newly swapped endian string', newendian);
  5. Denarius [DNR] NodeJS Web Wallet https://github.com/carsenk/denariusnodewallet Live Demo: Currently unavailable Denarius Node Wallet - A NodeJS/MongoDB powered denariusd Web Wallet. Send and Receive Funds, Create new addresses, View Transactions, Edit your account, and more! Swap between your DNR Balance in USD and BTC prices calculated from http://coinmarketcap.com/currencies/denarius-dnr/ 2FA Authentication is included as well as QR Codes for addresses and 2FA! Table of Contents Features Prerequisites Getting Started Denarius Daemon Setup License Features Send and Receive DNR Wallet Addresses, Create new ones View all transactions Two Factor Authentication Mobile Ready Responsive Design Local Authentication using Email and Password OAuth 1.0a Authentication via Twitter OAuth 2.0 Authentication via Facebook, Google, GitHub Flash notifications MVC Project Structure Node.js clusters support Sass stylesheets (auto-compiled via middleware) Bootstrap 3 + Theme Contact Form (powered by Mailgun, Sendgrid or Mandrill) User Account Management Gravatar Profile Details Change Password Forgot Password Reset Password Link multiple OAuth strategies to one account Delete Account 2FA (MFA) Enable/Disable CSRF protection XSS protection -More features will be coming! Prerequisites denariusd MongoDB Node.js 6.0+ Command Line Tools (Optional)  Mac OS X: Xcode (or OS X 10.9+: xcode-select --install)  Windows: Visual Studio  Ubuntu /  Linux Mint: sudo apt-get install build-essential  Fedora: sudo dnf groupinstall "Development Tools"  OpenSUSE: sudo zypper install --type pattern devel_basis Getting Started The easiest way to get started is to clone the repository: # Get the latest snapshot git clone --depth=1 https://github.com/carsenk/denariusnodewallet.git denariuswallet # Change directory cd denariuswallet # Install NPM dependencies npm install # Or, if you prefer to use `yarn` instead of `npm` yarn install # Then simply start your app node app.js # Or, if you are using nodemon nodemon app.js  Note: I highly recommend installing Nodemon. It watches for any changes in your node.js app and automatically restarts the server. Once installed, instead of node app.js use nodemon app.js. It will save you a lot of time in the long run, because you won't need to manually restart the server each time you make a small change in code. To install, run sudo npm install -g nodemon. Denarius Daemon Setup You must have a Denarius daemon running on a local server or remote server (highly recommend using SSL) Your configuration options should be set within your .env file, you can check the .env.example for examples In your denarius.conf file (The Denariusd/QT configuration file) add the following to allow use of the web wallet. enableaccounts=1 staking=0 server=1 rpcuser=yourusername rpcpassword=yourpassword  License The MIT License (MIT) Copyright (c) 2017 Carsen Klock Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
×
×
  • Create New...