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

@nftx/api

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nftx/api

This package contains methods for fetching various data via the nftx API

  • 1.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-40%
Maintainers
2
Weekly downloads
 
Created
Source

@nftx/api

This package contains methods for fetching various data via the nftx API

Usage

import { fetchVaults, fetchVaultBuyPrice } from '@nftx/api';

const vaults = await fetchVaults();
const price = await fetchVaultBuyPrice({ vaultId: 0, tokenIds: ['1'] });

Many of the api responses are intended to be used with other @nftx libraries:

import { createPublicClient, createWalletClient } from 'viem';
import { fetchVaultBuyQuote } from '@nftx/api';
import { buy } from '@nftx/trade';

const quote = await fetchVaultBuyQuote({
  vaultId: 0,
  tokenIds: ['1'],
  userAddress,
});

const provider = createPublicClient();
const signer = createWalletClient();

const transaction = await buy({ quote, provider, signer });

FAQs

Package last updated on 12 Dec 2023

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