From bca97a382bb9945df67450a88383c7c4093f0896 Mon Sep 17 00:00:00 2001 From: Freddie Coleman Date: Tue, 17 Dec 2024 14:58:21 +0400 Subject: [PATCH] document entire HTTP request/response --- CHIPs/chip-0039.md | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/CHIPs/chip-0039.md b/CHIPs/chip-0039.md index ecf3b74e..9be3c32d 100644 --- a/CHIPs/chip-0039.md +++ b/CHIPs/chip-0039.md @@ -115,12 +115,18 @@ Fee services should: 6. Service returns complete spend bundle to client 7. Client can verify and submit the transaction -### Example Spend Bundle Modification +### HTTP Request/Response Examples + +#### Request + +```http +POST /api/fees HTTP/1.1 +Content-Type: application/json -``` -# Original spend bundle: { - "coin_spends": [ + "network": "mainnet", + "spendBundle": { + "coin_spends": [ { "coin": { "parent_coin_info": "0x...", @@ -134,9 +140,20 @@ Fee services should: "aggregated_signature": "0x..." } -# After fee service: + }, + "submit": false +} +``` + +#### Success Response + +```http +HTTP/1.1 200 OK +Content-Type: application/json + { - "coin_spends": [ + "spendBundle": { + "coin_spends": [ # Original spend { "coin": { @@ -159,6 +176,9 @@ Fee services should: } ], "aggregated_signature": "0x..." # Updated to include fee spend + }, + "fees": 100000, + "submitted": false } ```