Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@bosonprotocol/ethers-sdk

Package Overview
Dependencies
65
Maintainers
3
Versions
476
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @bosonprotocol/ethers-sdk

Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.


Version published
Weekly downloads
422
decreased by-3.65%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

@bosonprotocol/ethers-sdk

JS lib that exports EthersAdapter (implementation of Web3LibAdapter) and contract abstractions targeting ethers.

Install

npm i @bosonprotocol/ethers-sdk ethers

# OR

yarn add @bosonprotocol/ethers-sdk ethers

Usage

EthersAdapter

This adapter is intended to be passed as an constructor argument to @bosonprotocol/core-sdk.

import { CoreSDK } from "@bosonprotocol/core-sdk";
import { EthersAdapter } from "@bosonprotocol/ethers-sdk";
import { ethers } from "ethers";

// injected web3 provider
const web3Provider = new ethers.providers.Web3Provider(window.ethereum);

const ethersAdapter = new EthersAdapter(web3Provider);
const coreSDK = new CoreSDK({
  web3Lib: ethersAdapter
  // ...other args
});

Contract abstractions

We provide fully typed, auto-generated contract abstractions using TypeChain, which targets ethers.

import { contracts } from "@bosonprotocol/ethers-sdk";

const bosonOfferHandler = contracts.IBosonOfferHandler__factory.connect(
  contractAddress,
  ethersSignerOrProvider
);

FAQs

Last updated on 11 Jun 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc