Giter VIP home page Giter VIP logo

helius-sdk's People

Contributors

0xichigo avatar atharmohammad avatar beeman avatar chrishagedorn avatar d-reader-josip avatar dougefresh avatar ethyi avatar japif avatar josip-volarevic avatar koenrijpstra avatar mertimus avatar nicolaspennie avatar owenventer avatar qudo-code avatar solhosty avatar tahsintunan avatar tidelaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

helius-sdk's Issues

Error creating webhook

Since version 1.2.2 creating a webhook using the createWebhook gives the following error:

Error: invalid API path: /v0/webhooks

Add method for parsed transactions endpoint

Hey! It would be awesome if the SDK has a method for the /v0/transactions (parsed transactions) endpoint. The endpoint's response is pretty complex, if you're trying to write type-safe code you would need to manually write the types for the response (or use a type generator).

Potential issue when trying to listen to PDA addresses

Will these 2 lines of code throw an error if the user wants to listen to PDA addresses, since PDA addresses are not on the curve (I believe)?

(address) => !PublicKey.isOnCurve(address)

(address) => !PublicKey.isOnCurve(address)

This should be checked. I'll give my best to do it early next week.
Posting this issue as a reminder to myself and to increase awareness to you guys for potential errors which these lines might cause.

Add typescript type for transactionTypes while creating webhook

  • Current typescript type for Webhook:

image

- We should add a typescript type (TransactionTypes) which is an array of all types Helius support at the moment mentioned here https://docs.helius.xyz/reference/transaction-types and assign it to transactionTypes instead of using string[] for better developer experience.

Vulnerability Report - Axios in helius-sdk Dependency Chain

Summary:
I believe I have identified a security vulnerability in the helius-sdk package and its dependencies. The issue relates to the version of Axios being used in the package's dependency chain, which is susceptible to a Cross-Site Request Forgery (CSRF) vulnerability (severity: moderate). This vulnerability can potentially expose applications to security risks.

Steps to Reproduce:
Install the helius-sdk package using the command: npm install helius-sdk
Check the npm audit report using: npm audit

Observed Behavior:
The npm audit report identifies the following vulnerabilities:

Axios (0.8.1 - 1.5.1): Moderate severity CSRF vulnerability. Advisory Link
aptos (<= 1.13.3): Depends on vulnerable Axios versions.
@irys/sdk: Depends on vulnerable versions of aptos.
helius-sdk (>= 1.0.16): Depends on vulnerable versions of @irys/sdk.

Expected Behavior:
The helius-sdk package should use an updated version of Axios that does not have known security vulnerabilities.

Impact:
The identified vulnerabilities may expose applications to potential security threats and could lead to unauthorized actions, data breaches, or other security issues.

Additional Information:
The vulnerability report indicates that updating Axios to a secure version is a possible solution, but it may result in a breaking change ([email protected]).

Steps Taken:
I've made sure my node and npm are fully updated.

Environment:
Node.js version: 20.11.0
npm version: 10.2.4

Additional Notes:
This is the first GitHub issue I've reported. There could be a misunderstanding on my part. Also this vulnerability may not even affect anything about the functionality of the library. I'm testing out the Helius SDK and thought I would report it. Thank you.

Helius client with secure url as well as api key

Currently, Helius client can be only initialized by apiKey for backend services.

I think it would be better to have it available for frontend and it needs to be initialized with secure url as well.

requestAirdrop throws a StructError from superstruct

Steps to reproduce

const endpoint = "https://rpc-devnet.helius.xyz/?api-key=<API_KEY>" // insert API key
const connection = new Connection(endpoint, 'confirmed');
const signature = await connection.requestAirdrop(
  new PublicKey('<WALLET_ADDRESS>'), // insert some wallet address
  1000000000, // 1 Solana
);

// Things broke down at this point but in case they start working it's nice to wait for transaction confirmation
const blockhashWithExpiryBlockHeight = await connection.getLatestBlockhash();
await connection.confirmTransaction(
  {
    signature: sign,
    ...blockhashWithExpiryBlockHeight,
  },
  'confirmed',
);

image

Issue happens in the create and validate functions from the superstruct package

/**
 * Create a value with the coercion logic of struct and validate it.
 */

export function create<T, S>(
  value: unknown,
  struct: Struct<T, S>,
  message?: string
): T {
  const result = validate(value, struct, { coerce: true, message })

  if (result[0]) {
    throw result[0]
  } else {
    return result[1]
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.