Skip to content

Commit 2bd500d

Browse files
committed
feat: self-hosted deployment guide (#83)
1 parent db12d1b commit 2bd500d

2 files changed

Lines changed: 172 additions & 16 deletions

File tree

docs.json

Lines changed: 66 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,45 @@
1515
"search": {
1616
"analytics": true,
1717
"synonyms": [
18-
["stealth", "unlinkable"],
19-
["meta-address", "metaaddress", "meta address"],
20-
["Soroban", "Stellar smart contract"],
21-
["friendbot", "testnet faucet"],
22-
["XLM", "lumen"],
23-
["Freighter", "Stellar wallet"]
18+
[
19+
"stealth",
20+
"unlinkable"
21+
],
22+
[
23+
"meta-address",
24+
"metaaddress",
25+
"meta address"
26+
],
27+
[
28+
"Soroban",
29+
"Stellar smart contract"
30+
],
31+
[
32+
"friendbot",
33+
"testnet faucet"
34+
],
35+
[
36+
"XLM",
37+
"lumen"
38+
],
39+
[
40+
"Freighter",
41+
"Stellar wallet"
42+
]
2443
],
2544
"boosts": [
26-
{ "page": "getting-started", "weight": 3 },
27-
{ "group": "Guides", "weight": 2 },
28-
{ "group": "API Reference", "weight": 1 }
45+
{
46+
"page": "getting-started",
47+
"weight": 3
48+
},
49+
{
50+
"group": "Guides",
51+
"weight": 2
52+
},
53+
{
54+
"group": "API Reference",
55+
"weight": 1
56+
}
2957
]
3058
},
3159
"font": {
@@ -76,7 +104,11 @@
76104
"groups": [
77105
{
78106
"group": "Overview",
79-
"pages": ["introduction", "getting-started", "roadmap"]
107+
"pages": [
108+
"introduction",
109+
"getting-started",
110+
"roadmap"
111+
]
80112
},
81113
{
82114
"group": "Architecture",
@@ -89,7 +121,13 @@
89121
},
90122
{
91123
"group": "Contracts",
92-
"pages": ["contracts/evm", "contracts/stellar", "contracts/solana", "contracts/ckb", "reference/stellar-event-schemas"]
124+
"pages": [
125+
"contracts/evm",
126+
"contracts/stellar",
127+
"contracts/solana",
128+
"contracts/ckb",
129+
"reference/stellar-event-schemas"
130+
]
93131
}
94132
]
95133
},
@@ -98,11 +136,19 @@
98136
"groups": [
99137
{
100138
"group": "SDK",
101-
"pages": ["sdk/overview", "sdk/agent-client"]
139+
"pages": [
140+
"sdk/overview",
141+
"sdk/agent-client"
142+
]
102143
},
103144
{
104145
"group": "Chain Primitives",
105-
"pages": ["sdk/chains/evm", "sdk/chains/stellar", "sdk/chains/solana", "sdk/chains/ckb"]
146+
"pages": [
147+
"sdk/chains/evm",
148+
"sdk/chains/stellar",
149+
"sdk/chains/solana",
150+
"sdk/chains/ckb"
151+
]
106152
}
107153
]
108154
},
@@ -127,7 +173,7 @@
127173
"pages": [
128174
"guides/stellar-mainnet-deployment",
129175
"guides/stellar-payment-links",
130-
"guides/stellar-payment-links",
176+
"guides/stellar-payment-links",
131177
"guides/stellar-multisig-withdrawal",
132178
"guides/stellar-offline-signing",
133179
"guides/stellar-tx-simulation",
@@ -137,7 +183,8 @@
137183
"guides/spectre-stellar-cookbook",
138184
"guides/stellar-federation",
139185
"guides/stellar-custom-assets",
140-
"guides/wraith-names-stellar"
186+
"guides/wraith-names-stellar",
187+
"guides/ops/self-hosted-deployment"
141188
]
142189
}
143190
]
@@ -147,7 +194,10 @@
147194
"groups": [
148195
{
149196
"group": "API Reference",
150-
"pages": ["api-reference/endpoints", "api-reference/types"]
197+
"pages": [
198+
"api-reference/endpoints",
199+
"api-reference/types"
200+
]
151201
}
152202
]
153203
}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
title: 'Self‑Hosted Deployment'
3+
sidebarTitle: 'Self‑Hosted Deployment'
4+
description: 'Deploy the Wraith protocol on your own Stellar network (Futurenet)'
5+
---
6+
7+
This guide walks you through a full self‑hosted deployment of the Wraith
8+
protocol on Futurenet. By the end, you’ll have all four core contracts
9+
deployed, wired, and verified — ready for your own applications.
10+
11+
## Prerequisites
12+
13+
Tool Version Check
14+
Rust ≥ 1.78 rustc --version
15+
wasm32 target any `rustup target list --installed`
16+
stellar‑cli ≥ 22.0.1 stellar --version
17+
Funded Stellar keypair – stellar account show <address> --network futurenet
18+
19+
Install the wasm target if missing:
20+
21+
```bash
22+
rustup target add wasm32-unknown-unknown
23+
24+
## 1. Set Up a Futurenet Identity
25+
Generate a new keypair and fund it via friendbot:
26+
stellar keys generate wraith-deployer --network futurenet
27+
28+
curl "[https://friendbot-futurenet.stellar.org/?addr=$(stellar](https://friendbot-futurenet.stellar.org/?addr=$(stellar) keys address wraith-deployer)"
29+
30+
Verify the balance:
31+
stellar account show $(stellar keys address wraith-deployer) --network futurenet
32+
33+
You should see at least 10 XLM to cover deployment costs.
34+
## 2. Dry‑Run Walkthrough
35+
A dry‑run prints every command that would be executed without spending funds.
36+
Use it to audit the sequence.
37+
Clone the contracts repo and enter the Stellar directory:
38+
git clone [https://github.com/wraith-protocol/contracts.git](https://github.com/wraith-protocol/contracts.git)
39+
cd contracts/stellar
40+
41+
Run the dry‑run:
42+
./deploy.sh futurenet wraith-deployer --dry-run
43+
44+
Expected output:
45+
🚀 Deploying Wraith Protocol to futurenet using wraith-deployer...
46+
[DRY-RUN] Will execute: cargo build --target wasm32-unknown-unknown --release
47+
[DRY-RUN] Will execute: stellar contract optimize on all contracts
48+
[DRY-RUN] Will deploy: stealth-announcer
49+
[DRY-RUN] Will deploy: stealth-registry
50+
[DRY-RUN] Will deploy: stealth-sender
51+
[DRY-RUN] Will invoke: stealth-sender init
52+
[DRY-RUN] Will deploy: wraith-names
53+
[DRY-RUN] Will write manifest to deployments/futurenet.json
54+
55+
If this exits cleanly, the deployment plan is valid.
56+
## 3. Full Futurenet Deployment
57+
From the contracts/stellar directory, run the same command without --dry-run:
58+
./deploy.sh futurenet wraith-deployer
59+
60+
The script will:
61+
· Build all contracts (cargo build --target wasm32-unknown-unknown --release)
62+
· Optimize WASM files with stellar contract optimize
63+
· Deploy each contract in dependency order
64+
· Wire contracts by calling init on stealth-sender with the announcer ID
65+
· Write a deployment manifest to stellar/deployments/futurenet.json
66+
· Verify each deployed contract responds to a read call
67+
You’ll see output ending with:
68+
🎉 Deployment Complete!
69+
--------------------------------------
70+
Announcer: CAAA...
71+
Registry: CBBB...
72+
Sender: CCCC...
73+
Names: CDDD...
74+
--------------------------------------
75+
76+
## 4. Wiring Contracts (Already Done)
77+
The deploy script automatically wires the contracts. Specifically, it calls:
78+
soroban contract invoke \
79+
--id <SENDER_ID> \
80+
--source wraith-deployer \
81+
--network futurenet \
82+
-- init --admin <DEPLOYER_ADDRESS> --announcer <ANNOUNCER_ID>
83+
84+
No additional wiring steps are required for a self‑hosted instance.
85+
## 5. Publishing Contract IDs
86+
The deployment manifest at stellar/deployments/futurenet.json contains all
87+
contract IDs and is the canonical record of your deployment.
88+
Share this file with any consumer application. Its structure:
89+
{
90+
"network": "futurenet",
91+
"contracts": {
92+
"stealthAnnouncer": "CAAA...",
93+
"stealthRegistry": "CBBB...",
94+
"stealthSender": "CCCC...",
95+
"wraithNames": "CDDD..."
96+
}
97+
}
98+
99+
## Verification
100+
Open each contract on Stellar Expert:
101+
[https://futurenet.stellar.expert/explorer/futurenet/contract/](https://futurenet.stellar.expert/explorer/futurenet/contract/)<CONTRACT_ID>
102+
103+
You should see ledger entries confirming the deployment.
104+
Your self‑hosted Wraith instance is now live. You can register names,
105+
announce stealth meta‑addresses, and send private payments against these contracts.
106+

0 commit comments

Comments
 (0)