diff --git a/docs.json b/docs.json index 6050cc4..18ce9e7 100644 --- a/docs.json +++ b/docs.json @@ -112,8 +112,6 @@ { "group": "Guides", "pages": [ - "guides/stellar-quickstart", - "guides/stellar-quickstart.es", "guides/stealth-payments", "guides/single-chain-agent", "guides/multichain-agent", @@ -121,20 +119,7 @@ "guides/privacy-best-practices", "guides/stellar-fees", "guides/stellar-troubleshooting", - "guides/spectre-stellar-cookbook", - "guides/integrations/react-native" - ] - }, - { - "group": "Stellar", - "pages": [ - "guides/stellar/stellar-quickstart" - ] - }, - { - "group": "Integrations", - "pages": [ - "guides/integrations/soroswap" + "guides/spectre-stellar-cookbook" ] }, { @@ -148,12 +133,9 @@ "guides/stellar-explorer-recipes", "guides/stellar-federation", "guides/stellar-custom-assets", - "guides/wraith-names-stellar" + "guides/wraith-names-stellar", + "guides/ops/self-hosted-deployment" ] - }, - { - "group": "Integrations", - "pages": ["guides/integrations/reflector"] } ] }, diff --git a/guides/ops/self-hosted-deployment.mdx b/guides/ops/self-hosted-deployment.mdx new file mode 100644 index 0000000..b98556f --- /dev/null +++ b/guides/ops/self-hosted-deployment.mdx @@ -0,0 +1,143 @@ +--- +title: 'Self‑Hosted Deployment' +sidebarTitle: 'Self‑Hosted Deployment' +description: 'Deploy the Wraith protocol on your own Stellar network (Futurenet)' +--- + +This guide walks you through a full self‑hosted deployment of the Wraith +protocol on **Futurenet**. By the end, you’ll have all four core contracts +deployed, wired, and verified — ready for your own applications. + +## Prerequisites + +- **Rust** ≥ 1.78 (`rustc --version`) +- **wasm32 target** installed (`rustup target list --installed | grep wasm32-unknown-unknown`) +- **stellar‑cli** ≥ 22.0.1 (`stellar --version`) +- **Funded Stellar keypair** on Futurenet (`stellar account show
--network futurenet`) + +Install the wasm target if missing: +```bash +rustup target add wasm32-unknown-unknown +``` + +## 1. Set Up a Futurenet Identity + +Generate a new keypair and fund it via friendbot: + +```bash +stellar keys generate wraith-deployer --network futurenet + +curl "https://friendbot-futurenet.stellar.org/?addr=$(stellar keys address wraith-deployer)" +``` + +Verify the balance: +```bash +stellar account show $(stellar keys address wraith-deployer) --network futurenet +``` +You should see at least 10 XLM to cover deployment costs. + +## 2. Dry‑Run Walkthrough + +A dry‑run prints every command that *would* be executed without spending funds. +Use it to audit the sequence. + +Clone the contracts repo and enter the Stellar directory: + +```bash +git clone https://github.com/wraith-protocol/contracts.git +cd contracts/stellar +``` + +Run the dry‑run: + +```bash +./deploy.sh futurenet wraith-deployer --dry-run +``` + +Expected output: +``` +🚀 Deploying Wraith Protocol to futurenet using wraith-deployer... +[DRY-RUN] Will execute: cargo build --target wasm32-unknown-unknown --release +[DRY-RUN] Will execute: stellar contract optimize on all contracts +[DRY-RUN] Will deploy: stealth-announcer +[DRY-RUN] Will deploy: stealth-registry +[DRY-RUN] Will deploy: stealth-sender +[DRY-RUN] Will invoke: stealth-sender init +[DRY-RUN] Will deploy: wraith-names +[DRY-RUN] Will write manifest to deployments/futurenet.json +``` + +If this exits cleanly, the deployment plan is valid. + +## 3. Full Futurenet Deployment + +From the `contracts/stellar` directory, run the same command **without** `--dry-run`: + +```bash +./deploy.sh futurenet wraith-deployer +``` + +The script will: +- Build all contracts (`cargo build --target wasm32-unknown-unknown --release`) +- Optimize WASM files with `stellar contract optimize` +- Deploy each contract in dependency order +- **Wire contracts** by calling `init` on `stealth-sender` with the announcer ID +- Write a deployment manifest to `stellar/deployments/futurenet.json` +- Verify each deployed contract responds to a read call + +You’ll see output ending with: +``` +🎉 Deployment Complete! +-------------------------------------- +Announcer: CAAA... +Registry: CBBB... +Sender: CCCC... +Names: CDDD... +-------------------------------------- +``` + +## 4. Wiring Contracts (Already Done) + +The deploy script automatically wires the contracts. Specifically, it calls: + +```bash +soroban contract invoke \ + --id