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

@pythnetwork/client

Package Overview
Dependencies
Maintainers
4
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pythnetwork/client - npm Package Compare versions

Comparing version 2.22.0 to 2.22.1

4

lib/anchor/coder/instructions.js

@@ -96,5 +96,5 @@ "use strict";

var key = _a[_i];
offset += buffer.subarray(offset).writeUInt8(key.length);
offset += buffer.subarray(offset).writeUInt8(buffer_1.Buffer.byteLength(key));
offset += buffer.subarray(offset).write(key);
offset += buffer.subarray(offset).writeUInt8(ix.productMetadata[key].length);
offset += buffer.subarray(offset).writeUInt8(buffer_1.Buffer.byteLength(ix.productMetadata[key]));
offset += buffer.subarray(offset).write(ix.productMetadata[key]);

@@ -101,0 +101,0 @@ }

{
"name": "@pythnetwork/client",
"version": "2.22.0",
"version": "2.22.1",
"description": "Client for consuming Pyth price data",

@@ -5,0 +5,0 @@ "homepage": "https://pyth.network",

# @pythnetwork/client
## A library for reading on-chain Pyth oracle data
## A library for reading Pyth accounts on Pythnet
[Pyth](https://pyth.network/) is building a way to deliver a decentralized, cross-chain market of verifiable data from high-quality nodes to any smart contract, anywhere.
This library reads on-chain Pyth data from [@solana/web3.js](https://www.npmjs.com/package/@solana/web3.js) and returns JavaScript-friendly objects.
This library reads Pythnet (Pyth's app-specific SVM blockchain) data using [@solana/web3.js](https://www.npmjs.com/package/@solana/web3.js) and returns JavaScript-friendly objects.
> ⚠️ **Important Warning**: For most use cases, it is recommended and more user-friendly to use Pyth's off-chain API ([Hermes](https://hermes.pyth.network/docs/)) via the [@pythnetwork/hermes-client](https://www.npmjs.com/package/@pythnetwork/hermes-client) package to get the most up-to-date Pyth prices. Using `@pythnetwork/client` requires a Pythnet RPC connection and exposes many low-level details.
## Installation

@@ -32,3 +34,3 @@

```typescript
const pythConnection = new PythConnection(solanaWeb3Connection, getPythProgramKeyForCluster(solanaClusterName))
const pythConnection = new PythConnection(pythnetWeb3Connection, getPythProgramKeyForCluster(pythnetClusterName))
pythConnection.onPriceChange((product, price) => {

@@ -35,0 +37,0 @@ // sample output:

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