2.5.10 • Published 1 month ago

salamoonder v2.5.10

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Salamoonder API Wrapper

Usage

import Salamoonder, { TwitchIntegrity } from "salamoonder";
const api = new Salamoonder(process.env.SALAMOONDER_API_KEY);

try {
  api.generateIntegrity().then((response: TwitchIntegrity) => {
    console.log(response.token);
  });
} catch (error) {
  console.log(error);
}

Disclaimer

By default you are supporting me through the usage of my app id. This can be disabled by simply adding false as a second parameter when initiating the salamoonder class.

const api = new Salamoonder(process.env.SALAMOONDER_API_KEY, false);

API Calls

getBalance()

Example

api.getBalance().then((bal: number) => {
  console.log(bal);
});

Returns

number;

solveCaptcha()

Solves a kasada captcha for a given site.

Parameters

  • site: Site to solve the captcha for

Example (for Twitch)

api.solveCaptcha(TaskPjsFile.TWITCH).then((response: getTaskResult) => {
  console.log(response);
});

Returns

{
  errorId: number;
  solution: {
    type: string;
    "user-agent": string;
    "x-kpsdk-cd": string;
    "x-kpsdk-cr": string;
    "x-kpsdk-ct": string;
    "x-kpsdk-r": string;
    "x-kpsdk-st": string;
  };
  status: "ready" | "pending";
}

registerTwitchAccount()

Registers a new Twitch account.

Parameters

  • email: Email address for the account

Example

api.registerTwitchAccount("test@test.tk").then((response: getTaskResult) => {
  console.log(response);
});

Returns

{
  errorId: number;
  solution: {
    type: string;
    access_token: string;
    password: string;
    username: string;
  }
  status: "ready" | "pending";
}

checkTwitchIntegrity()

Checks the integrity of a Integrity Token.

Parameters

  • token: Integrity Token to check

Example

api.checkTwitchIntegrity("token").then((response: getTaskResult) => {
  console.log(response);
});

Returns

{
  errorId: number;
  solution: {
    type: string;
    client_id: string;
    client_ip: string;
    device_id: string;
    exp: string;
    iat: string;
    is_bad_bot: string;
    iss: string;
    nbf: string;
    user_id: string;
  }
  status: "ready" | "pending";
}

scrapeTwitch()

Scrapes Twitch for meta data

Example

api.scrapeTwitch().then((response: TwitchScraperSolution) => {
  console.log(response);
});

Returns

{
  errorId: number;
  solution: {
    biography: string;
    profile_picture: string;
    username: string;
  }
  status: "ready" | "pending";
}

generateIntegrity()

Generates an Integrity token.
Both Salamoonder versions require a proxy with the format user:password@host:port

Generation methods

API_Public

Generation via Salamoonder, with token

API_Local

Generation via Salamoonder, no token

Self

Generation locally, optionally token & proxy

Passport

Generate Passport Integrity Tokens, optionally proxy

Parameters

  • type: Generation Method
  • data: Data for each method

Example

api
  .generateIntegrity(IntegrityGenerateType.API_PUBLIC, {
    proxy: "test:123@test:3000",
    access_token: "jneapaw1pr0ob83fievedqpi1jqzb4",
  })
  .then((response: TwitchIntegrity) => {
    console.log(response);
  });

Returns

{
  clientId: string;
  token: string;
  sessionId?: string;
  userAgent: string;
  deviceId: string;
}
2.5.10

1 month ago

2.5.9

1 month ago

2.5.8

1 month ago

2.5.7

2 months ago

2.5.6

2 months ago

2.5.5

2 months ago

2.5.4

3 months ago

2.5.3

3 months ago

2.5.0

4 months ago

2.5.2

4 months ago

2.5.1

4 months ago

2.4.1

4 months ago

2.4.0

4 months ago

2.3.0

4 months ago

1.2.0

5 months ago

1.1.4

7 months ago

1.1.3

7 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.1

11 months ago

1.0.0

11 months ago