Get started with web3-arkane-provider CDN

MIT licensed

Library enables Ethereum dApps to use Arkanes privacy-preserving authentication and signing solutions.

Tags:
  • ethereum
  • hd
  • wallet
  • mnemonic
  • provider
  • arkane
  • truffle

Stable version

Copied!

How to start using web3-arkane-provider CDN


// Include required libraries
const Web3 = require('web3');
const Web3ArkaneProvider = require('web3-arkane-provider');

// Initialize Web3 with the provided CDN link
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); // Replace with your local Ethereum node URL

// Initialize Web3ArkaneProvider with the CDN link
const arkaneProvider = new Web3ArkaneProvider(web3, "https://cdn.cdnhub.io/web3-arkane-provider/0.23.0/web3-arkane-provider.min.js");

// Set the Web3 provider to use Arkane
web3.setProvider(arkaneProvider);

// Use Web3 with Arkane for signing transactions
const account = "0xYourAccountAddress"; // Replace with your Ethereum account address
const privateKey = "0xYourPrivateKey"; // Replace with your Ethereum private key
const transactionData = { /* transaction data */ };

const signedTransaction = await arkaneProvider.sendTransaction(account, privateKey, transactionData);

console.log("Signed transaction:", signedTransaction.transactionHash);
Copied!
Copied!

All versions