bloxflipapi

1.1.1 • Public • Published

BloxFlipAPI - Interact with bloxflip

By using BloxFlipAPI you can interact with the Bloxflip Api and also create a fake bloxflip predictor. You can interact with game modes like Mines, Towers and Plinko, as well as generate "predictions" for mines and towers.

Installing

npm i bloxflipapi

Built With

Contributing

To contribute to this project please contact mage on discord.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Documentation

bloxflipapi.verify(token) | Check if the token provided is valid

const bloxflipapi = require('bloxflipapi')

async function myfunction(token) {
    let result = await bloxflipapi.verify(token)

    console.log(result)
}

myfunction('your token')

//The booleans true or false will appear in the console

bloxflipapi.balance(token) | Check the balance of a token

const bloxflipapi = require('bloxflipapi')

async function myfunction(token) {
    let result = await bloxflipapi.balance(token)

    console.log(result)
}

myfunction('your token')

//A number will appear which will be the tokens current balance

bloxflipapi.createMine(token, bet, mines) | Create a mines game on bloxflip

const bloxflipapi = require('bloxflipapi')

async function myfunction(token) {
    let result = await bloxflipapi.createMine(token, 5, 1)
    //create a game with bet amount 5 and mine amount 1

    console.log(result)
}

myfunction('your token')

//This is an example result you might recieve

//{
//  round_id: 'string',
//  client_seed: 'string',
//  nonce: number,
//  bet: number,
//  mines: number,
//  game_exploded: boolean,
//  game_started: 'string',
//  game_active: boolean,
//  user_id: number,
//  clicked_loactions: array
//}

//{
//  round_id: '21256fb6-94e2-4994-88a2-e163ce1dd8c3',
//  client_seed: '69420',
//  nonce: 4631,
//  bet: 5,
//  mines: 1,
//  game_exploded: false,
//  game_started: '01/11/2022, 21:05:50',
//  game_active: true,
//  user_id: 277268681,
//  clicked_loactions: []
//}

bloxflipapi.touchMine(token, position) | Touch a mines game on bloxflip

const bloxflipapi = require('bloxflipapi')

async function myfunction(token) {
    let result = await bloxflipapi.touchMine(token, 0)
    //Touch the first square on the mines gameboard

    console.log(result)
}

myfunction('your token')

//This is an example result you might recieve

//  { multiplier: number, game_exploded: boolean }

//{ multiplier: 0.9895833333333335, game_exploded: false }

//Or if you click a bomb then you will get a different result
//{
//  client_seed: 'string',
//  server_seed: 'string',
//  round_id: 'string',
//  nonce: number,
//  bet: number,
//  mines: number,
//  mine_locations: array,
//  touched_locations: array,
//  game_started: 'string',
//  user_id: number,
//  game_exploded: boolean
//}

//{
//  client_seed: '69420',
//  server_seed: '4c9117f83a1cb98514192e19c780c7606bfd4311548b816729f0c1178d6a93c44fcf0617ba3a8897a0b6eca95d2c3f467a0211e37c451aa61ee00de1885a1cce5de79af74be6e4738ec0249845f890059d283ce6ae3a9674e6c9091482b9129d2e776314e7fec3b476b4a89fc8a06cddd2327f1e9d7f3b9131c7a3129f4e5847f0022ff5c5d2f3938981ba67b58bdcbf5ca2e4a527c32365ba71c5eb446cd1917a8b67d1751d2de02120c755396b1a3f95172efae02a05a79d54d350f8256d2b0990b996a68038ed979416561ceda96a92b84437dceb3d72361402dd1dfb1d2a65becd5a742ece514ebe9a4d5//6cba5851c9bf7c9b985a3ca65e574aeef81db24',
//  round_id: '5b83119e-de9d-471a-af5b-f1c2877a44d3',
//  nonce: 4642,
//  bet: 5,
//  mines: 24,
//  mine_locations: [
//     0,  2,  3,  4,  5,  6,  7,  8,
//     9, 10, 11, 12, 13, 14, 15, 16,
//    17, 18, 19, 20, 21, 22, 23, 24
//  ],
//  touched_locations: [],
//  game_started: '01/11/2022, 21:52:16',
//  user_id: 277268681,
//  game_exploded: true
//}

bloxflipapi.endMine(token) | Ends a mines game on bloxflip

const bloxflipapi = require('bloxflipapi')

async function myfunction(token) {
    let result = await bloxflipapi.endMine(token)
    //End a mines game

    console.log(result)
}

myfunction('your token')

//This is an example result you might recieve

//{
//  client_seed: 'string',
//  server_seed: 'string',
//  round_id: 'string',
//  nonce: number,
//  bet: number,
//  mines: number,
//  mine_locations: array,
//  touched_locations: array,
//  game_started: 'string',
//  user_id: number,
//  multiplier: number,
//  won_amount: number
//}

//{
//  client_seed: '69420',
//  server_seed: '6327a75522d3ad1e03b90a77046f56e0565e4fc00c8d35656e6e432ab81d62bfa0410268832a163cba95f6b65546d1a6896b078381f8497471bdbf8f9efef232f9f687068f4e650d585281752aae018e8ebe4fa9061d4e4869cea23236a4bec8ccf4795a06c12449f2193be6d96e58a2ef3e84eb92eacaa886ad0761905f99f2f5710adeac4744c5a47418f6af2ff49d49a12fb2a26b4a993a1392fbd96d11b6418223b23b3482b1951cb08fddb824a668d1aab317b2c096bca970817df0250a6f45aed19876838922a901837f05f55f3b00d699d583d075921421cb359132f0528df516269069acaa6d5d6c8//48b8519bae084feaade2bf9cb1f66d9b4221b94',
//  round_id: '1e3cc810-2f56-4326-b02f-f39feb13e5b7',
//  nonce: 4641,
//  bet: 5,
//  mines: 1,
//  mine_locations: [ 11 ],
//  touched_locations: [ 0 ],
//  game_started: '01/11/2022, 21:50:59',
//  user_id: 277268681,
//  multiplier: 0.9895833333333335,
//  won_amount: 4.947916666666668
//}

bloxflipapi.createTower(token, bet, difficulty) | Create a towers game on bloxflip

const bloxflipapi = require('bloxflipapi')

async function myfunction(token) {
    let result = await bloxflipapi.createTower(token, 5, 'easy')
    //create a game with bet amount 5 and difficulty easy

    console.log(result)
}

myfunction('your token')

//This is an example result you might recieve

//{
//  round_id: 'string',
//  client_seed: 'string',
//  server_hash: 'string',
//  nonce: number,
//  bet: number,
//  difficulty: 'string',
//  game_exploded: boolean,
//  game_started: 'string',
//  game_active: boolean,
//  user_id: 277268681,
//  completed_levels: []
//}

//{
//  round_id: '21256fb6-94e2-4994-88a2-e163ce1dd8c3',
//  client_seed: '69420',
//  nonce: 4631,
//  bet: 5,
//  mines: 1,
//  game_exploded: false,
//  game_started: '01/11/2022, 21:05:50',
//  game_active: true,
//  user_id: 277268681,
//  clicked_loactions: []
//}

bloxflipapi.touchTower(token, tile, level) | Touch a towers game on bloxflip

const bloxflipapi = require('bloxflipapi')

async function myfunction(token) {
    let result = await bloxflipapi.touchTower(token, 0, 0)
    //Touch the first tile on the towers gameboard

    console.log(result)
}

myfunction('your token')

//This is an example result you might recieve

//  { completed_levels: array, game_exploded: boolean }

//{ completed_levels: [ 0 ], game_exploded: false }

//Or if you click a bomb then you will get a different result
//{
//  client_seed: 'string',
//  server_seed: 'string',
//  round_id: 'string',
//  nonce: number,
//  bet: number,
//  difficulty: 'string',
//  tower_locations: array,
//  touched_locations: array,
//  game_started: 'string',
//  user_id: number,
//  game_exploded: boolean
//}

//{
//  client_seed: '69420',
//  server_seed: '865811f1714e64e745374e8f85012bc4071d6129367d43c6da0732aeaf875d62c88e7401280dbf594b2b3f122ca130a5f5f22a367d5fac2a209f05b5338a94aa21f01bc071b7c4628742ea9e7746b91a79218a35bc20d5c6b23e276b46eaa19bcabca38c478dc1f111e630b5795fd53c3b98a4e637a5eb8d43e83c482dc0432f2a0fd830bc9e866c9dff874172117c7b01d6940d3e76113cdd6b38073d0509ed245786993533dd5f678c18ca6e5fac39701cdf81511de8e5b66486567bc84fba05de8160b195bebf6aa6af3ebfdf4c9ce59e7aa24d6ea985f27786e987bdbac6b877f731ef886b64bb40b6f7d//c981330d9e0c4ea5d2eda63989f21862593b47c',
//  round_id: 'cca4f2a7-ad45-4a16-9671-8e0bc8b8619d',
//  nonce: 4655,
//  bet: 5,
//  difficulty: 'hard',
//  tower_locations: [
//    [ 1, 0, 1 ],
//    [ 1, 0, 1 ],
//    [ 1, 0, 1 ],
//    [ 1, 1, 0 ],
//    [ 1, 1, 0 ],
//    [ 1, 1, 0 ],
//    [ 1, 1, 0 ],
//    [ 1, 1, 0 ]
//  ],
//  touched_locations: [],
//  game_started: '02/11/2022, 18:46:00',
//  user_id: 277268681,
//  game_exploded: true
//}

bloxflipapi.endTower(token) | Ends a tower game on bloxflip

const bloxflipapi = require('bloxflipapi')

async function myfunction(token) {
    let result = await bloxflipapi.endTower(token)
    //End a towers game

    console.log(result)
}

myfunction('your token')

//This is an example result you might recieve

//{
//  client_seed: 'string',
//  server_seed: 'string',
//  round_id: 'string',
//  nonce: number,
//  bet: number,
//  difficulty: 'string',
//  tower_locations: array,
//  touched_locations: array,
// game_started: 'string',
//  user_id: number,
//  multiplier: number,
//  won_amount: number
//}

//{
//  client_seed: '69420',
//  server_seed: '5a4b79f5e18a0b1e58a94719ceb1c17b7d4936ba7a82f7ea675abd4ddbb9a8d4472853a20f5faa430225b14c9fcdd1377fe6bcea579157552c8fca4e2a9cf2ae8a2e22d32c928a424c2aff40df28b1f03278c46ad36b3b3d1672f134b35bb30c4ba3aa29204df1095eecc5e87470572afcafc0ce443841a9165c4c3fdcabc4ce7c286856555ba939a7e198d56b368ef9df8c1a621aa558888334c4158f71f8d639f53267283690c31af03659607630af5d87f560d531709c36ad3c0eb98473ef98bac6df1c37c649a824e6e6f1579c472fa5d0b86836bbc2ffa494dda6d37a119c730eed8d1378690ca84acc9//57daed3a24dcaa25a4f4753e7678b6f86894538',
//  round_id: 'a425822c-585f-457b-b849-06b4b2bd6fa4',
//  nonce: 4654,
//  bet: 5,
//  difficulty: 'hard',
//  tower_locations: [
//    [ 0, 1, 1 ],
//    [ 1, 0, 1 ],
//    [ 1, 0, 1 ],
//    [ 0, 1, 1 ],
//    [ 1, 0, 1 ],
//    [ 1, 0, 1 ],
//    [ 0, 1, 1 ],
//    [ 0, 1, 1 ]
//  ],
//  touched_locations: [ 0 ],
// game_started: '02/11/2022, 18:45:52',
//  user_id: 277268681,
//  multiplier: 2.85,
//  won_amount: 14.25
//}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    3
    • latest

Version History

Package Sidebar

Install

npm i bloxflipapi

Weekly Downloads

3

Version

1.1.1

License

MIT

Unpacked Size

34.7 kB

Total Files

4

Last publish

Collaborators

  • mage1