Privy Server Wallets

⏱️ 3 min read

Overview

This guide points to a reference repository that shows you how to integrate DeFindex vaults using Privy server wallets enabling fully automated, server-side deposits, withdrawals, and cross-chain bridging with zero user interaction.

The pattern relies on Privy's Authorization Key (TEE-backed) to sign Stellar transactions from your backend, making it ideal for custodial products, bots, and programmatic yield strategies.

Repository

defindex-io/privy-defindex-guide

What the Repository Covers

Topic
Description

Privy setup

App ID, TEE activation, Authorization Key generation

Stellar wallet

Creation, XLM funding via Friendbot, USDC trustline

EVM wallet

Base EVM wallet with sendTransaction

Deposit

Full signing flow: XDR → hash → rawSign → broadcast

Withdraw

Withdraw by amount or by shares (% redemption)

Bridge

Base USDC → Stellar → Defindex vault via Sodax

Gotchas

9 documented edge cases with root causes and fixes

Architecture at a Glance

All vault operations follow the same signing loop:

  1. Authenticated POST to Defindex API → receive unsigned XDR

  2. Parse XDR → hash it

  3. privy.rawSign(walletId, { hash }) → Ed25519 signature

  4. Attach DecoratedSignature to the envelope

  5. POST signed XDR to /send

Quick Start

Prerequisites

  • Privy app with TEE enabled and an Authorization Key configured

  • Defindex API key — request access on Discord

Additional Resources

Last updated