npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dashtools

v1.0.7

Published

Library for interacting with Geometry Dash servers

Downloads

280

Readme

DashTools

Node.js library for interacting with Geometry Dash servers. Every single endpoint is implemented, but currently not tested very well.

This library is a work in progress. In the future it will also include tools for level string creation and save file reading/writing.

Support for versions below 2.2 is very limited at the moment. Support for GDPSes is provided, but certain GDPSes also may not work out of the box.

How to use

Example (getting the first page of auto levels):

import * as gd from "dashtools";

// Only the first 3 are required for most endpoints, however some need the username and/or UDID too
const client = new gd.GDClient(new gd.GDAccount(playerID, accountID, password, username, udid));

client.getLevels({
    difficulties: [gd.constants.DIFFICULTIES.AUTO]
}, (data) => {
    console.log(data.levels)
})

Documentation

GDAccount

This class represents a logged into GD account.

new gd.GDAccount(playerID, accountID, password, username, udid);

All parameters can be left blank if you don't wish to log in. The username and udid fields are not required for most endpoints.

playerID - Your player/user ID. You can find this ID on GDBrowser.

accountID - Your account ID. You can find this ID on GDBrowser.

password - Your account password.

username - Your username.

udid - Your UDID. This can be found in your save file.

GDClient

This class represents a GD server client.

new gd.GDClient(new gd.GDAccount(playerID, accountID, password, username, udid), serverURL, );

constants

This object contains all the constants.

DEFAULT_ENDPOINTS

Default values for every endpoint.

export const DEFAULT_ENDPOINTS = {
    "getLevels": "getGJLevels21.php",
    "getDailyLevel": "getGJDailyLevel.php",
    "getMapPacks": "getGJMapPacks21.php",
    "getGauntlets": "getGJGauntlets21.php",
    "downloadLevel": "downloadGJLevel22.php",
    "reportLevel": "reportGJLevel.php",
    "getUsers": "getGJUsers20.php",
    "getUserInfo": "getGJUserInfo20.php",
    "getAccountComments": "getGJAccountComments20.php",
    "getComments": "getGJComments21.php",
    "registerAccount": "accounts/registerGJAccount.php",
    "loginAccount": "accounts/loginGJAccount.php",
    "getCommentHistory": "getGJCommentHistory.php",
    "getSongInfo": "getGJSongInfo.php",
    "updateUserScore": "updateGJUserScore22.php",
    "getRewards": "getGJRewards.php",
    "requestModAccess": "requestUserAccess.php",
    "getLeaderboards": "getGJScores20.php",
    "deleteLevel": "deleteGJLevelUser20.php",
    "uploadAccountComment": "uploadGJAccComment20.php",
    "deleteAccountComment": "deleteGJAccComment20.php",
    "uploadComment": "uploadGJComment21.php",
    "deleteComment": "deleteGJComment20.php",
    "getTopArtists": "getGJTopArtists.php",
    "getLists": "getGJLevelLists.php",
    "likeItem": "likeGJItem211.php",
    "rateLevel": "rateGJStars211.php",
    "rateDemon": "rateGJDemon21.php",
    "updateDescription": "updateGJDesc20.php",
    "uploadLevel": "uploadGJLevel21.php",
    "deleteLevel": "deleteGJLevelUser20.php",
    "getUserList": "getGJUserList20.php",
    "loadSaveData": "accounts/syncGJAccountNew.php",
    "updateAccountSettings": "updateGJAccSettings20.php",
    "getMessages": "getGJMessages20.php",
    "readMessage": "downloadGJMessage20.php",
    "sendMessage": "uploadGJMessage20.php",
    "deleteMessage": "deleteGJMessages20.php",
    "blockUser": "blockGJUser20.php",
    "unblockUser": "unblockGJUser20.php",
    "deleteFriendRequests": "deleteGJFriendRequests20.php",
    "sendFriendRequest": "uploadFriendRequest20.php",
    "getFriendRequests": "getGJFriendRequests20.php",
    "readFriendRequest": "readGJFriendRequest20.php",
    "acceptFriendRequest": "acceptGJFriendRequest20.php",
    "removeFriend": "removeGJFriend20.php",
    "uploadList": "uploadGJLevelList.php",
    "deleteList": "deleteGJLevelList.php",
    "getAccountURL": "getAccountURL.php",
    "getLevelLeaderboards": "getGJLevelScores211.php",
    "getPlatformerLevelLeaderboards": "getGJLevelScoresPlat.php",
    "backupSaveData": "backupGJAccountNew.php",
    "getContentURL": "getCustomContentURL.php",
    "musicLibraryVersion": "music/musiclibrary_version_02.txt",
    "musicLibraryVersionOld": "music/musiclibrary_version.txt",
    "sfxLibraryVersion": "sfx/sfxlibrary_version.txt",
    "musicLibrary": "music/musiclibrary_02.dat",
    "musicLibraryOld": "music/musiclibrary.dat",
    "sfxLibrary": "sfx/sfxlibrary.dat",
    "getChallenges": "getGJChallenges.php"
}

DEFAULT_HEADERS_21

Default request headers for 2.1.

export const DEFAULT_HEADERS_21 = {
    "User-Agent": "",
    "Accept": "*/*",
    "Content-Type": "application/x-www-form-urlencoded"
}

DEFAULT_HEADERS_22

Default request headers for 2.2.

export const DEFAULT_HEADERS_22 = {
    "User-Agent": "",
    "Accept": "*/*",
    "Content-Type": "application/x-www-form-urlencoded",
    "Cookie": "gd=1;",
    "Host": "www.boomlings.com"
}

DEFAULT_ACCOUNT_URL

Default URL for account management endpoints.

https://www.robtopgames.org/database

DEFAULT_CONTENT_URL

Default URL for the Music & SFX libraries.

https://geometrydashfiles.b-cdn.net

DEFAULT_SERVER

Default URL for most endpoints.

https://www.boomlings.com/database

DEFAULT_SERVER_21

Default URL for most endpoints (2.1).

http://www.boomlings.com/database

DIFFICULTIES

All possible difficulty values for levels and lists.

AUTO = -1
NA = 0
EASY = 1
NORMAL = 2
HARD = 3
HARDER = 4
INSANE = 5
EASY_DEMON = 6
MEDIUM_DEMON = 7
HARD_DEMON = 8
INSANE_DEMON = 9
EXTREME_DEMON = 10

ENDPOINTS_2_100

Default endpoints for 2.100.

ENDPOINTS_2_113

Default endpoints for 2.113.

ENDPOINTS_2_205

Default endpoints for 2.205.

HEX_CHARACTERS

Character set for hexadecimal values.

"abcdef1234567890".split("")

ICON_TYPES

All icon types.

CUBE = 0
ICON = 0
SHIP = 1
BALL = 2
BIRD = 3
UFO = 3
WAVE = 4
DART = 4
ROBOT = 5
SPIDER = 6
SWING = 7
SWINGCOPTER = 7
JETPACK = 8

ITEMS

All possible chest reward items.

FIRE = 1
ICE = 2
POISON = 3
SHADOW = 4
LAVA = 5
KEY = 6
EARTH = 10
BLOOD = 11
METAL = 12
LIGHT = 13
SOUL = 14

KEYS

All XOR keys used throughout Geometry Dash.

export const KEYS = {
    SAVE_DATA: "\x0B",
    MESSAGES: "14251",
    VAULT_CODES: "19283",
    CHALLENGES: "19847",
    LEVEL_PASSWORD: "26364",
    COMMENT: "29481",
    ACCOUNT_PASSWORD: "37526",
    LEVEL_LEADERBOARD: "39673",
    LEVEL: "41274",
    LOAD_DATA: "48291",
    RATE: "58281",
    CHEST_REWARDS: "59182",
    STAT_SUBMISSION: "85271"
}

LENGTHS

All possible level lengths.

TINY = 0
SHORT = 1
MEDIUM = 2
LONG = 3
XL = 4
PLATFORMER = 5

LISTS_HASH

The hash that is always returned by the getGJLevelLists endpoint (as of 2.206).

"f5da5823d94bbe7208dd83a30ff427c7d88fdb99"

RS_CHARACTERS

Character set for RS (random string) values.

"QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890".split("")

SALTS

All salts used in various SHA1 operations.

LEVEL = "xI25fpAapCQg"
COMMENT = "xPT6iUrtws0J"
GJP2 = "mI29fmAnxgTs"
STAT_SUBMISSION = "xI35fsAapCRg"
LIKE_OR_RATE = "ysg6pUrtjn0J"
LEVEL_LEADERBOARDS = "yPg6pUrtWn0J"
REWARDS = "pC26fpYaQCtg"
CHALLENGES = "oC36fpYaPtdg"

SECRETS

All values for the secret parameter, which is sent in almost every request.

COMMON = "Wmfd2893gb7"
ACCOUNT = "Wmfv3899gc9"
DELETE = "Wmfv2898gc9"
MOD = "Wmfp3879gc3"
ADMIN = "Wmfx2878gb9"

SCORES

Possible leaderboard types for getLeaderboards.

TOP = "top"
RELATIVE = "relative"
FRIENDS = "friends"
CREATORS = "creators"

VERSIONS

Various version values.

export const VERSIONS = {
    gameVersion: 22,
    binaryVersion: 42
}
export const VERSIONS_2_205 = {
    gameVersion: 22,
    binaryVersion: 41
}
export const VERSIONS_2_204 = {
    gameVersion: 22,
    binaryVersion: 40
}
export const VERSIONS_2_200 = {
    gameVersion: 22,
    binaryVersion: 37
}
export const VERSIONS_2_113 = {
    gameVersion: 21,
    binaryVersion: 35
}
export const VERSIONS_2_111 = {
    gameVersion: 21,
    binaryVersion: 34
}
export const VERSIONS_2_100 = {
    gameVersion: 21,
    binaryVersion: 33
}
export const VERSIONS_2_011 = {
    gameVersion: 20,
    binaryVersion: 29
}
export const VERSIONS_2_000 = {
    gameVersion: 20,
    binaryVersion: 27
}
export const VERSIONS_1_930 = {
    gameVersion: 19,
    binaryVersion: 25
}

utils

Various utility functions for Geometry Dash.

getRandomNumber(min, max)

Returns a random number between min and max.

gjp(password)

Encodes a string as a GJP. (outdated as of 2.2)

gjp2(password)

Encrypts a string with GJP2 encryption.

md5(string, digestType = "hex")

Returns the MD5 hash for the string.

md5Buffer(string)

Returns the MD5 hash for the string as a Buffer.

robTopSplit(string, separator)

Splits a string on every second instance of the separator, and then the split strings get converted into a Map, where the first value is the key, and the second is the value.

robTopSplitDict(string, separator)

Same as robTopSplit, but generates an Object.

sha1(string, digestType = "hex")

Returns the SHA-1 hash for the string.

xor(string, key)

XOR's the string using the key.