Socket
Book a DemoInstallSign in
Socket

votifier-x

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

votifier-x

Votifier implementation in TypeScript. Including standalone server and client.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
0
Created
Source

VotifierX

npm

A simple Votifier implementation in TypeScript. Including standalone server and client of Votifier v2 protocol.

Installation

npm install votifier-x

Usage

Server

import { VotifierServer } from 'votifier-x';

const server = new VotifierServer({
  port: 8192, // optional, default is 8192
  tokenPath: 'path/to/tokens.json', // optional, default is 'tokens.json'
});
server.start();

server.on('vote', (vote) => {
  console.log(`Received vote from ${vote.username} at ${vote.address}`);
});

Client

import { VotifierClient } from 'votifier-x';

const client = new VotifierClient({
  host: '0.0.0.0',
  port: 8192,
  token: 'your-token',
  serviceName: 'your-service-name',
});

await client.sendVote({
  username: 'username',
  address: 'address',
});

Acknowledgements

Keywords

minecraft

FAQs

Package last updated on 19 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts