Skip to main content

Overview

Solana transactions returned by the Yield.xyz API can be signed using the official Solana SDK or the Anchor framework. Below you’ll find examples for both approaches.

@solana/web3.js

@solana/web3.js is the official JavaScript SDK for interacting with the Solana blockchain.

Installation

Signing a Transaction

Use "confirmed" commitment for a good balance between speed and reliability. Switch to "finalized" when you need maximum certainty.