New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@switchboard-xyz/evm.js

Package Overview
Dependencies
Maintainers
6
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@switchboard-xyz/evm.js

API wrapper for intergating with the Switchboard program on our EVM implementation

  • 3.12.36
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-88.24%
Maintainers
6
Weekly downloads
 
Created
Source

Switchboard Logo

@switchboard-xyz/evm.js

A Typescript client to interact with Switchboard on EVM based chains.

NPM Badge

Install

npm i --save @switchboard-xyz/evm.js

Usage

Directory

Load Switchboard Contract and Switchboard Push Receiver Contract Functions

import ethers from "ethers";
import {
  getSwitchboard,
  getSwitchboardPushReceiver,
  getSwitchboardPushReceiverFeeds,
} from "@switchboard-xyz/evm.js";

const signer = new ethers.Wallet(privateKey);

// get switchboard contract functions
const switchboardProgram = await getSwitchboard(
  process.env.SWITCHBOARD_ADDRESS, // Switchboard contract address (from environment)
  signer // Signer instance
);

// get switchboard feeds contract functions
const switchboardPushReceiver = await getSwitchboardPushReceiver(
  process.env.SWITCHBOARD_PUSH_ADDRESS,
  signer
);

// log all feeds
const allFeeds = await getSwitchboardPushReceiverFeeds(switchboardPushReceiver);
console.log(allFeeds); // Feed[];

FAQs

Package last updated on 14 Nov 2023

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