Litecraft Node.js yggdrasil
A Node.js client for doing requests to yggdrasil, the Mojang authentication system, used for Minecraft and Scrolls.
Usage
$ npm install litecraft-yggdrasil
Client
//initvar ygg = //Optional settings object host: 'https://authserver.mojang.com' //Optional custom host. No trailing slash.; //Authenticate a userygg; //Refresh an accessTokenygg; //Validate an accessTokenygg; //Invalidate all accessTokensygg
Server
var yggserver = ; //Join a server (clientside)yggserver; //Join a server (serverside)yggserver;
With ES6 Named Exports
/** * Import Client or Server from 'yggdrasil/es6'. * Note that the library is stateless when imported this way vs the CommonJS way. */ // Use it like you normally would. ygg yggServ;
Further Reading
- Authentication protocol documentation
- node-minecraft-protocol, a Minecraft client and server in Node.js
- prismarine-yggdrasil, another yggdrasil client that node-yggdrasil replaced (issue links: prismarine-yggdrasil #2, node-minecraft-protocol #117).