Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@generalprotocols/price-oracle

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@generalprotocols/price-oracle

Library for creating, parsing, signing and verifying PriceOracle messages.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
65
decreased by-58.6%
Maintainers
1
Weekly downloads
 
Created
Source

pipeline status coverage report

PriceOracle Libraries

Library for creation, parsing, signing and verifying oracle price messages according to the PriceOracle Specification.

Installation

Install the library via NPM:

# npm install @generalprotocols/price-oracle

Usage

Include the library into your project:

// Load the PriceOracle library.
const PriceOracle = require('@generalprotocols/price-oracle');

Use the provided functions:

// Create an oracle price message from parts.
let message = PriceOracle.createMessage(price, blockHeight, blockHash, sequence, timestamp);

// Parse an oracle price message into parts.
let messageParts = PriceOracle.parseMessage(message);

// Sign an oracle price message.
let signature = PriceOracle.signMessage(message, privateKeyWIF);

// Verify an oracle price message signature.
let validity = PriceOracle.verifyMessageSignature(message, signature,publicKeyBuffer);

FAQs

Package last updated on 30 Apr 2020

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