Skip to content

Commit 6017d9b

Browse files
heymideOluRemiFour
andauthored
feat(docs): auto-generate Stellar contract reference (#48)
Co-authored-by: OluRemiFour <lekanayoola04@gmail.com>
1 parent fd94519 commit 6017d9b

3 files changed

Lines changed: 497 additions & 15 deletions

File tree

contracts/stellar.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ pub fn batch_send(
132132
```
133133

134134
The `send` function:
135+
135136
1. Transfers `amount` of `token` from `caller` to `stealth_address`
136137
2. Calls the announcer contract to emit an event
137138

@@ -200,6 +201,18 @@ const resolved = await namesContract.call("resolve", "alice");
200201

201202
---
202203

204+
{/* stellar-reference:start */}
205+
206+
<!-- This section is generated by scripts/generate-stellar-reference.ts. Do not edit by hand. -->
207+
208+
## Generated contract reference
209+
210+
Set `STELLAR_BINDINGS_DIR` to the generated TypeScript bindings directory, then run `npm run generate:stellar-reference` to refresh this section.
211+
212+
{/* stellar-reference:end */}
213+
214+
---
215+
203216
## Deployment
204217

205218
### Build

package.json

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
{
2-
"name": "@wraith-protocol/docs",
3-
"private": true,
42
"type": "module",
53
"scripts": {
6-
"check:snippets": "tsx scripts/check-snippets.ts",
7-
"check:stellar-testnet": "tsx scripts/check-stellar-testnet-snippets.ts",
8-
"test": "npm run check:snippets"
9-
},
10-
"dependencies": {
11-
"@solana/web3.js": "^1.95.0",
12-
"@stellar/stellar-sdk": "^13.1.0",
13-
"@wraith-protocol/sdk": "^1.4.5"
14-
},
15-
"devDependencies": {
16-
"@types/node": "^22.10.2",
17-
"tsx": "^4.19.2",
18-
"typescript": "^5.7.2"
4+
"generate:stellar-reference": "node scripts/generate-stellar-reference.ts",
5+
"check:stellar-reference": "node scripts/generate-stellar-reference.ts --check --allow-missing",
6+
"mint:validate": "mint validate",
7+
"mint:broken-links": "mint broken-links"
198
}
209
}

0 commit comments

Comments
 (0)