Get Equipment

Retrieving Equipment Details

The getEquipment method retrieves the metadata of a specific piece of equipment. It takes a single parameter:

  • equipmentPubkey: UmiPublicKey of the equipment

Example usage

import { PartPayClient } from '@partpay-libs/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 equipmentPublicKey = Keypair.generate().publicKey;

const equipmentMetadata = await client.getEquipment(equipmentPublicKey);
console.log('Equipment details:', equipmentMetadata);


This method returns an EquipmentMetadata object containing detailed information about the equipment.