Skip to content

Commit bca97a3

Browse files
document entire HTTP request/response
1 parent b070708 commit bca97a3

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

CHIPs/chip-0039.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,18 @@ Fee services should:
115115
6. Service returns complete spend bundle to client
116116
7. Client can verify and submit the transaction
117117

118-
### Example Spend Bundle Modification
118+
### HTTP Request/Response Examples
119+
120+
#### Request
121+
122+
```http
123+
POST /api/fees HTTP/1.1
124+
Content-Type: application/json
119125
120-
```
121-
# Original spend bundle:
122126
{
123-
"coin_spends": [
127+
"network": "mainnet",
128+
"spendBundle": {
129+
"coin_spends": [
124130
{
125131
"coin": {
126132
"parent_coin_info": "0x...",
@@ -134,9 +140,20 @@ Fee services should:
134140
"aggregated_signature": "0x..."
135141
}
136142
137-
# After fee service:
143+
},
144+
"submit": false
145+
}
146+
```
147+
148+
#### Success Response
149+
150+
```http
151+
HTTP/1.1 200 OK
152+
Content-Type: application/json
153+
138154
{
139-
"coin_spends": [
155+
"spendBundle": {
156+
"coin_spends": [
140157
# Original spend
141158
{
142159
"coin": {
@@ -159,6 +176,9 @@ Fee services should:
159176
}
160177
],
161178
"aggregated_signature": "0x..." # Updated to include fee spend
179+
},
180+
"fees": 100000,
181+
"submitted": false
162182
}
163183
```
164184

0 commit comments

Comments
 (0)