Heads up

You will need to request access to use a whitelabel wallet. Please email us at sales@bitski.com if you are interested.

Use our API

You’ll probably want to create a new Ethereum address each time one of your users signs up. That way, you can assign that address to the user and then can start transferring assets to their new account.

To do that, your backend needs to:

  • Get an access token
  • Make a POST request to /v1/accounts using that access token.

Get an Access Token

First, you’ll use your credential id and secret to request an access token using OAuth. (Most platforms have a library that can handle this step for you.) Your token has a relatively short lifespan, so you should store the expiration date and request a new one when it expires. In order to sign transactions, you must request the scope eth_sign.

Get a New Ethereum Address

Once you have an access token, you can go ahead and start creating accounts. Each time you create an account you will get an Ethereum address to use. You can then use that address to sign transactions.

POST /v1/accounts HTTP/2
Host: https://api.bitski.com
Content-Type: application/json
Authorization: Bearer YOUR ACCESS TOKEN
X-API-Key: YOUR CLIENT ID

HTTP/2 200 OK
Content-Type: application/json
{
 "ethereumAddress": "0xb60e8dd61c5d32be8058bb8eb970870f07233155"
}

You are now ready to send JSON RPC requests.

Integrate with the Bitski SDKs

You can also use our SDKs with the wallet. Here’s an example application that will generate 3 wallets using bitski-node.

JavaScript
// Need to set these before we get started
// export CLIENT_ID=<YOUR CLIENT ID>
// export CREDENTIAL_ID=<YOUR CREDENTIAL ID>
// export CREDENTIAL_SECRET=<YOUR CREDENTIAL SECRET>
// Also need to install a few packages
// npm install bitski-node
// npm install node-fetch
// This will spit out something like this which is a valid CSV
//
// address
// 0x0390dece47f0e43ada3f86fb90decc7606de6a11
// 0x0bd31b20dfa4790d34f60edd5a0033505578bfaa
// 0xe666cc3d4f804e0d0302406d629fd24c2709a7ae

const Bitski = require("bitski-node");
const fetch = require("node-fetch");
const NUMBER_OF_ACCOUNTS_TO_GENERATE = 3;

getAccounts(NUMBER_OF_ACCOUNTS_TO_GENERATE).then((accounts) => {
  console.log("address");
  accounts.forEach((account) => {
    console.log(account.ethereumAddress);
  });
});

async function getAccounts(count) {
  const options = {
    credentials: {
      id: process.env.CREDENTIAL_ID,
      secret: process.env.CREDENTIAL_SECRET,
    },
    disableBlockTracking: true,
  };
  const bitskiProvider = Bitski.getProvider(process.env.CLIENT_ID, options);
  const accessToken = await bitskiProvider.tokenProvider.getAccessToken();
  var accounts = [];
  for (let index = 0; index < count; index++) {
    const accountResult = await fetch("https://api.bitski.com/v1/accounts", {
      method: "POST",
      headers: {
        authorization: `Bearer ${accessToken}`,
        "X-API-Key": process.env.CLIENT_ID,
      },
    });
    const account = await accountResult.json();
    accounts.push(account);
  }
  return accounts;
}