Get Vendor

Retrieving Vendor Data

The getVendor method retrieves data about a specific vendor. It takes a single parameter:

  • vendorPubkey: UmiPublicKey of the vendor

Example usage

import { PartPayClient } from '@partpay/sdk';
import { Keypair } from '@solana/web3.js';

// The Solana RPC endpoint for communicating with the mainnet/devnet network.
const endpoint = const endpoint = 'https://api.devnet.solana.com'; 
// The secret (private) key for signing transactions.
const secretKey = Keypair.generate().secretKey; 
// Initializes a PartPayClient using the specified Solana RPC endpoint and secret key for authentication.
const client = PartPayClient.createWithUmi(endpoint, secretKey); 

const vendorPublicKey = Keypair.generate().publicKey;

const vendorData = await client.getVendor(vendorPublicKey);
console.log('Vendor data:', vendorData);



This method returns a VendorData object containing information about the vendor.