You’re viewing the 2.0 (LTS) docs. View the current 3.0 version of this page.
Installation
Library Setup
- Hook (React)
- Direct Usage
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Install and configure the Stellar SDK for use with Para SDK in React Native
npm install @getpara/stellar-sdk-v14-integration @stellar/stellar-sdk --save-exact
yarn add @getpara/stellar-sdk-v14-integration @stellar/stellar-sdk --exact
pnpm add @getpara/stellar-sdk-v14-integration @stellar/stellar-sdk --save-exact
bun add @getpara/stellar-sdk-v14-integration @stellar/stellar-sdk --exact
import { useParaStellarSigner } from "@getpara/react-native-wallet/stellar";
import { Horizon, Networks } from "@stellar/stellar-sdk";
import { Text } from "react-native";
const server = new Horizon.Server("https://horizon.stellar.org");
function StellarExample() {
const { stellarSigner, isLoading } = useParaStellarSigner({
networkPassphrase: Networks.PUBLIC,
});
if (isLoading) return <Text>Loading...</Text>;
console.log("Stellar address:", stellarSigner?.address);
return <Text>Address: {stellarSigner?.address}</Text>;
}
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);
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.