How to use bitski - 2 common examples

To help you get started, we’ve selected a few bitski examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github skalenetwork / skale-demo / make-a-cake / src / reducers / web3 / getWeb3.js View on Github external
export let getWeb3 = new Promise(function(resolve, reject) {
  //add SKALE
  var web3SKALE = new Web3(process.env.SKALE_CHAIN);

  //add Bitski
  const bitski = new Bitski(process.env.BITSKI_ID, 'http://localhost:3001/callback.html');

  //add Portis
  const mySKALEChain = {
    nodeUrl: process.env.SKALE_CHAIN,
    chainId: 4,
    nodeProtocol: 'rpc',
  };
  const portis = new Portis(process.env.PORTIS_ID, mySKALEChain);

  //used for MetaMask
  let web3 = window.web3;
  web3 = new Web3(web3.currentProvider);

  //fix sendAsync issue
  web3.currentProvider.sendAsync = 
    web3.currentProvider.send;
github 0xcert / framework / packages / 0xcert-ethereum-bitski-frontend-provider / src / core / provider.ts View on Github external
public constructor(options: BitskiProviderOptions) {
    super(options);

    this._options = options;
    this._client = this;
    if (this.isSupported()) {
      const bitski = require('bitski');
      this._bitski = new bitski.Bitski(options.clientId, options.redirectUrl);
      const bitskiOptions = {};
      if (typeof options.network === 'undefined') {
        bitskiOptions['networkName'] = 'mainnet';
      } else if (typeof options.network === 'string') {
        bitskiOptions['networkName'] = options.network;
      } else {
        bitskiOptions['network'] = options.network;
      }

      this._provider = this._bitski.getProvider(bitskiOptions);
    }
  }

bitski

Bitski Javascript SDK

MIT
Latest version published 10 months ago

Package Health Score

65 / 100
Full package analysis

Popular bitski functions

Similar packages