Socket
Socket
Sign inDemoInstall

@bosonprotocol/ethers-sdk

Package Overview
Dependencies
Maintainers
10
Versions
488
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bosonprotocol/ethers-sdk

> TODO: description


Version published
Weekly downloads
473
decreased by-43.69%
Maintainers
10
Weekly downloads
 
Created
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

Package last updated on 25 Apr 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc