Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Bitski #25

Closed
Tracked by #13
manuelbarbas opened this issue Nov 19, 2023 · 1 comment
Closed
Tracked by #13

Using Bitski #25

manuelbarbas opened this issue Nov 19, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@manuelbarbas
Copy link
Collaborator

manuelbarbas commented Nov 19, 2023

Bitski is a non-custodial OAuth-based Web3 wallet SDK. The Bitski SDK allows you to integrate your dApp with SKALE.

For more information and support, see https://docs.bitski.com/

Install the NPM Packages

npm install --save web3 bitski

Implementation Example

import { Bitski } from 'bitski';
import Web3 from 'web3';


// Your setup information
const endpoint = 'https://your.skale.endpoint'; // your SKALE Chain endpoint
const skaleChainId = 123456                     // chainId of your SKALE Chain
const testAPIKey = 'your_client_id';
const callbackUrl = 'https://your.app/oath-callback.html';

const bitski = new Bitski(
    testAPIKey,
    callbackUrl
);

const network = {
    rpcUrl: endpoint,
    chainId: skaleChainId,
}

// Setting network
const provider = bitski.getProvider({ network });
let web3 = new Web3(provider);

function loginUser() {
  bitski.signIn().then(() => {
    console.log("sign in successful");
  });
}
@manuelbarbas
Copy link
Collaborator Author

What is: Wallet
Language: Javascript, Typescript
Target: Web

@manuelbarbas manuelbarbas added the documentation Improvements or additions to documentation label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant