Skip to main content
Para supports Stellar blockchain interactions through the . Use our integration package to sign Stellar transactions with Para’s MPC wallets.

Installation

npm install @getpara/stellar-sdk-v14-integration @stellar/stellar-sdk --save-exact

Library Setup

hooks/useParaStellar.ts
import { useMemo } from 'react';
import { useClient, useAccount } from '@getpara/react-native-wallet';
import { createParaStellarSigner } from '@getpara/stellar-sdk-v14-integration';
import { Horizon, Networks } from '@stellar/stellar-sdk';

const HORIZON_URL = "https://horizon.stellar.org";

export function useParaStellar() {
  const para = useClient();
  const { isConnected } = useAccount();

  const signer = useMemo(() => {
    if (!para || !isConnected) return null;
    return createParaStellarSigner({
      para,
      networkPassphrase: Networks.PUBLIC,
    });
  }, [para, isConnected]);

  const server = new Horizon.Server(HORIZON_URL);

  return { server, signer, isLoading: !para };
}
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