Skip to content

Commit febd82c

Browse files
authored
Merge branch 'main' into feat/indexer-lag-alert
2 parents 8f0574f + c8453e5 commit febd82c

25 files changed

Lines changed: 2142 additions & 30 deletions

.env.example

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ JWT_SECRET=your-super-secret-jwt-key-change-this
55
JWT_EXPIRES_IN=7d
66
BCRYPT_ROUNDS=10
77
LOG_LEVEL=debug
8+
89
# Comma-separated list of allowed frontend origins. Use "*" to allow any origin (not recommended for production).
910
CORS_ORIGIN=http://localhost:3000,http://localhost:5173
11+
1012
RATE_LIMIT_WINDOW_MS=900000
1113
RATE_LIMIT_MAX_REQUESTS=100
1214

1315
# ─── Stellar / Soroban ─────────────────────────────────────────────────────────
1416
# Soroban RPC endpoint.
1517
# Testnet : https://soroban-testnet.stellar.org
16-
# Mainnet : https://soroban-mainnet.stellar.org (or a custom Horizon/RPC node)
18+
# Mainnet : https://soroban-mainnet.stellar.org (or a custom Horizon/RPC node)
1719
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
1820

1921
# Network passphrase — must match SOROBAN_RPC_URL.
@@ -46,4 +48,4 @@ INDEXER_LAG_WEBHOOK_URL=
4648
ESCROW_CONTRACT_ID=
4749

4850
# Event topic emitted by the escrow contract when funds are locked. Default: escrow_funded
49-
ESCROW_FUNDED_EVENT_TOPIC=escrow_funded
51+
ESCROW_FUNDED_EVENT_TOPIC=escrow_funded

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,20 @@ The backend serves as the central hub connecting the frontend, database, and blo
124124
- `POST /shipments` - Create a shipment record.
125125
- `GET /shipments` - Get shipment details.
126126

127+
### Escrow
128+
129+
- `GET /api/v1/escrow/delivery/:id` - Fetch the escrow record (locking state, amount, asset,
130+
contract id, on-chain transaction hashes) associated with a delivery. `:id` accepts either the
131+
delivery `_id` or its business `deliveryId`.
132+
133+
### Transactions
134+
135+
- `POST /api/v1/transactions/escrow-lock` - Build the unsigned, simulation-prepared Soroban XDR
136+
that locks a delivery's escrow amount. Accepts `{ deliveryId, payerAddress }`; the amount and
137+
contract target are resolved server-side from MongoDB and the deployment configuration. The
138+
returned base64 envelope is signed and submitted by the client wallet — the backend never holds
139+
secret keys.
140+
127141
### Uploads
128142

129143
- `POST /uploads` - Upload proof of delivery or documents.

0 commit comments

Comments
 (0)