Para supports Stellar blockchain interactions through the . Use our integration package to sign Stellar transactions with Para’s MPC wallets.
Installation
If using @stellar/stellar-sdk and the @getpara/react-sdk you can use our hook to access the Stellar signer without any additional setup.
npm install @getpara/stellar-sdk-v14-integration @stellar/stellar-sdk --save-exact
Library Setup
Hook-based (React)
Direct Usage (Non-React)
import { useStellarSigner } from "@getpara/react-sdk/stellar";
import { Horizon, Networks } from "@stellar/stellar-sdk";
const HORIZON_URL = "https://horizon.stellar.org";
export function useParaStellar() {
const { stellarSigner, isLoading } = useStellarSigner({
networkPassphrase: Networks.PUBLIC,
});
const server = new Horizon.Server(HORIZON_URL);
return { server, signer: stellarSigner, isLoading };
}
import { createParaStellarSigner } from "@getpara/stellar-sdk-v14-integration";
import { Horizon, Networks } from "@stellar/stellar-sdk";
import { para } from "./para";
const server = new Horizon.Server("https://horizon.stellar.org");
const signer = createParaStellarSigner({
para,
networkPassphrase: Networks.PUBLIC,
});
console.log("Stellar address:", signer.address);
To use the Stellar testnet, replace Networks.PUBLIC with Networks.TESTNET and use the testnet Horizon URL: https://horizon-testnet.stellar.org. You can fund testnet accounts using Stellar’s Friendbot.
Next Steps