![coverage report](https://gitlab.com/GeneralProtocols/priceoracle/library/badges/development/coverage.svg)
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:
const PriceOracle = require('@generalprotocols/price-oracle');
Use the provided functions:
let message = PriceOracle.createMessage(price, blockHeight, blockHash, sequence, timestamp);
let messageParts = PriceOracle.parseMessage(message);
let signature = PriceOracle.signMessage(message, privateKeyWIF);
let validity = PriceOracle.verifyMessageSignature(message, signature,publicKeyBuffer);