Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@b3dotfun/p2pswap

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@b3dotfun/p2pswap

SDK for P2P Asset Swap Protocol

npmnpm
Version
0.0.1
Version published
Weekly downloads
17
-37.04%
Maintainers
0
Weekly downloads
 
Created
Source

NFT Swap SDK

A TypeScript SDK for interacting with the P2P NFT Swap Protocol.

Installation

npm install @your-org/swap-sdk
# or
yarn add @your-org/swap-sdk

Usage

import { createPublicClient, createWalletClient, http } from 'viem';
import { mainnet } from 'viem/chains';
import { SwapSDK } from '@your-org/swap-sdk';

// Initialize clients
const publicClient = createPublicClient({
  chain: mainnet,
  transport: http()
});

const walletClient = createWalletClient({
  chain: mainnet,
  transport: http()
});

// Initialize the SDK
const sdk = new SwapSDK({
  contractAddress: '0x...',
  publicClient,
  walletClient
});

// Example: Get total listings
const totalListings = await sdk.getTotalListings();

Keywords

p2p

FAQs

Package last updated on 25 Dec 2024

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