Getting Started

Installation

yarn add @jazdid/jaz-did-sdk

Example

import { ethers } from 'ethers';
import { Services, evm } from '@jazdid/jaz-did-sdk';

const network = {
    56: {
      name: 'BSC Mainnet',
      rpc: 'https://****',
    },
    97: {
      name: 'BSC Testnet',
      rpc: 'https://****',
    },
    1: {
      name: 'ETH',
      rpc: 'https://****',
    }
}
async function getConnection() {

  const provider = new ethers.providers.JsonRpcProvider(rpcUrl, chainId);
  const wallet = new ethers.Wallet(privateKey, provider);

  return {
    provider: wallet,
    connection: {
      account: await wallet.getAddress(),
      chainId: await wallet.getChainId(),
    },
  };
};

async function main() {
  Sdk.init({ serverUrl, openpfpUrl, network: rpcList, provider });
}


Configuration

Last updated