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

@nfteyez/sol-rayz

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nfteyez/sol-rayz

These packages created to simplify the process of parsing NFTs on Solana.

  • 0.7.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
498
decreased by-1.39%
Maintainers
2
Weekly downloads
 
Created
Source

@nfteyez/sol-rayz

These packages created to simplify the process of parsing NFTs on Solana.

Can be used for basic things like fetch all NFTs for specific wallet. Designed to be used in browser or Node.JS env.

Install

You need install @solana/web3.js in your project, since it is used as peer dependency.

npm i @solana/web3.js
npm i @nfteyez/sol-rayz

How to use

getParsedNftAccountsByOwner - return parsed list of NFTs (SPL Tokens) for given wallet public address. Each item in array have all data specified on the blockchain. The NFT metadata stored separately, you need to pick uri property for each token and fetch data youself.

import {
  getParsedNftAccountsByOwner
} from "@nfteyez/sol-rayz";

const tokenList = await getParsedNftAccountsByOwner({
  /**
   * Wallet public address
   */
  publicAddress: StringPublicKey;
  /**
   * Optionally provide your own connection object.
   * Otherwise createConnectionConfig() will be used
   */
  connection?: Connection;
  /**
   * Remove possible rust's empty string symbols `\x00` from the values,
   * which is very common issue.
   * Default is true
   */
  sanitize?: boolean;
  /**
   * TODO: Add description within README and link here
   * Default is false - slow method
   * true - is fast method
   */
  strictNftStandard?: boolean;
  /**
   * Convert all PublicKey objects to string versions.
   * Default is true
   */
  stringifyPubKeys?: boolean;
  /**
   * Sort tokens by Update Authority (read by Collection)
   * Default is true
   */
  sort?: boolean;
});

createConnectionConfig - method for creating a "connection" with Solana, have two params: clusterApi and commitment.

isValidSolanaAddress - check if provided string is valid Solana address.

import { isValidSolanaAddress } from "@nfteyez/sol-rayz";

const isValidAddress: boolean = isValidSolanaAddress((walletPublicKey: string));

getParsedAccountByMint - return parsed account for given mint address.

import { getParsedAccountByMint } from '@nfteyez/sol-rayz';

const parsedAccountByMint: ParsedAccountInfo = getParsedAccountByMintgetParsedAccountByMint({
  /**
   * Mint address
   */
  mintAddress: StringPublicKey;
  /**
   * Optionally provide your own connection object.
   * Otherwise createConnectionConfig() will be used
   */
  connection?: Connection;
});

getParsedNftAccountsByUpdateAuthority - return parsed list of NFTs (SPL Tokens) for given update authority. Each item in array have all data specified on the blockchain. The NFT metadata stored separately, you need to pick uri property for each token and fetch data youself.

import { getParsedNftAccountsByUpdateAuthority } from '@nfteyez/sol-rayz';

const parsedAccountByMint = getParsedNftAccountsByUpdateAuthority({
  /**
   * Update authority address
   */
  updateAuthority: StringPublicKey;
  /**
   * Optionally provide your own connection object.
   * Otherwise createConnectionConfig() will be used
   */
  connection?: Connection;
});

FAQs

Package last updated on 24 Nov 2021

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