Coder Social home page Coder Social logo

bryangottschalk / kaspa-wallet-notifications Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 2.0 65 KB

TypeScript NodeJS application to query the Kaspa blockchain's public REST server and notify the designated wallet holder that their balance has changed via Discord text channel notifications

TypeScript 100.00%
cryptocurrency kaspa mining nodejs typescript

kaspa-wallet-notifications's Introduction

kaspa-wallet-notifications

TypeScript NodeJS application to query the Kaspa blockchain's public REST server and notify the designated wallet holder that their balance has changed via Discord text channel notifications

Software requirements

Make sure NodeJS and the Yarn package manager are installed on your machine.

https://nodejs.org/en/
https://classic.yarnpkg.com/lang/en/docs/install

Discord requirements

  • Your own Discord server
  • A text channel created within your server for your bot to write to (you will need the ID from this which you can get from turning on the developer setting in Discord then right clicking the channel)
  • A Discord application and bot created at https://discord.com/developers/applications - I called mine kaspa-wallet-notifications

Setup

Create a .env file and copy/paste the contents of .env.sample into it to get started. The intention is for you to populate KASPA_WALLET_ADDRESS, DISCORD_BOT_TOKEN, and DISCORD_CHANNEL_ID with your own values.

DISCORD_BOT_TOKEN is the token from your application at https://discord.com/developers/applications -> your app -> in the Bot tab.

image

DISCORD_CHANNEL_ID requires right clicking the text channel you intend to use your bot and copying the ID.

Starting the Application

yarn install to install dependencies
yarn dev to run the server

If all of the .env file parameters are populated correctly, you should see logs related to your KAS balance in your console.
If a transaction occurs that changes your balance, your Discord channel should receive a message saying so. If that amount matches the current block reward, the app will assume you've solo mined a block and will give that detail.

image

image

kaspa-wallet-notifications's People

Contributors

bryangottschalk avatar

Watchers

 avatar

kaspa-wallet-notifications's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.