Skip to main content
Sign arbitrary bytes to prove ownership of a Stellar address without submitting a transaction. This is useful for authentication and off-chain verification.

Sign Bytes

Use the ParaStellarSigner class API to sign arbitrary bytes directly:
import { ParaStellarSigner } from "@getpara/stellar-sdk-v14-integration";
import { Networks } from "@stellar/stellar-sdk";
import { useClient } from "@getpara/react-native-wallet";

function SignMessage() {
  const para = useClient();

  const signMessage = async () => {
    if (!para) return;

    const signer = new ParaStellarSigner(para, Networks.PUBLIC);

    const message = "Hello, Stellar!";
    const messageBytes = Buffer.from(new TextEncoder().encode(message));

    const signature = await signer.signBytes(messageBytes);

    console.log("Message:", message);
    console.log("Signature:", signature.toString("hex"));
    console.log("Signer:", signer.address);
  };

  return <button onClick={signMessage}>Sign Message</button>;
}
Stellar does not have a standardized message signing format like EIP-191 on Ethereum. The signBytes method signs raw bytes using Ed25519. Both parties must agree on how to encode and hash the message before signing.

Next Steps