Para with Solana Web3.js
Learn how to integrate Para with Solana using the Solana Web3.js library to sign transactions and interact with the Solana blockchain.
Solana Web3.js is the official Solana JavaScript API for interacting with the Solana network. This guide will show you how to integrate Paraβs wallet and signing capabilities with Solana using our integration package.
Prerequisites
To use Para, you need an API key. This key authenticates your requests to Para services and is essential for integration. Before integrating Para with your application, ensure you have:
- Completed Para authentication setup in your application (see one of our Setup Guides)
- A valid Para API key
- An RPC endpoint for your desired network
Need an API key? Visit the Developer Portal to create API keys, manage billing, teams, and more.
Installation
Choose your preferred package manager to install the required dependencies:
Setting Up the Signer
Initialize the Para Solana signer:
Transaction Signing
Signing Transactions
Sending Transactions
Additional Methods
The ParaSolanaWeb3Signer
provides several additional methods and properties:
signBytes(bytes: Buffer)
: Sign arbitrary bytes directlysignVersionedTransaction(transaction: VersionedTransaction)
: Sign a versioned transactionaddress
: Get the wallet address as a stringsender
: Get the wallet public key as asolana.PublicKey
object
Server-Side Signing
Paraβs signers can also be used on the server-side using pregen wallets or an active client side session. To learn more about using para on the server, check out these guides:
Examples
If youβd like to learn more about how to use the ParaSolanaWeb3Signer
for different transaction types, check out this example in our Examples Hub: