From de69c44b9f9779c2bb503f53e7d8459399d883b3 Mon Sep 17 00:00:00 2001 From: Johannes Lund Date: Tue, 16 Jul 2024 16:18:02 +0200 Subject: [PATCH 1/3] Document recent changes to the `transactions-balance` `inputs` field --- specifications/api/swagger.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/specifications/api/swagger.yaml b/specifications/api/swagger.yaml index 5938aec8c7a..cc87b59e6d4 100644 --- a/specifications/api/swagger.yaml +++ b/specifications/api/swagger.yaml @@ -4060,7 +4060,12 @@ components: properties: transaction: *serialisedTransactionEncoded inputs: - description: A list of additional transaction inputs foreign to the wallet. + description: | + No longer required, except if the supplied `transaction` contains inputs not in the `cardano-node` UTxO. + + Balancing a transaction requires knowing the full outputs (`amount`, `assets`, ...) of the inputs (`id`, `ix`) in the `transaction` binary. + The wallet will now automatically try to resolve inputs using the `cardano-node` UTxO. This `inputs` field is kept for backwards compatibility + and for cases where the inputs don't yet exist in the `cardano-node` UTxO. type: array items: type: object From ca625ad1644fc31a0d9a4b08dbe92746c11feec2 Mon Sep 17 00:00:00 2001 From: Johannes Lund Date: Tue, 16 Jul 2024 16:18:33 +0200 Subject: [PATCH 2/3] Clarify semantics of the `transactions-balance` `redeemers` field --- specifications/api/swagger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/api/swagger.yaml b/specifications/api/swagger.yaml index cc87b59e6d4..d505ddc6730 100644 --- a/specifications/api/swagger.yaml +++ b/specifications/api/swagger.yaml @@ -4085,7 +4085,7 @@ components: datum: *datum assets: *walletAssets redeemers: - description: A list of redeemers data with their purpose. + description: A list of redeemers data with their purpose. The redeemers in the `transaction` binary will be overwritten by this value. type: array items: *ApiRedeemer encoding: From 77685a7825717648f4e215f869e9bf028c90a1ca Mon Sep 17 00:00:00 2001 From: Johannes Lund Date: Tue, 16 Jul 2024 16:50:49 +0200 Subject: [PATCH 3/3] Rework the `inputs` documentation --- specifications/api/swagger.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/specifications/api/swagger.yaml b/specifications/api/swagger.yaml index d505ddc6730..cff0a6bedf4 100644 --- a/specifications/api/swagger.yaml +++ b/specifications/api/swagger.yaml @@ -4061,11 +4061,9 @@ components: transaction: *serialisedTransactionEncoded inputs: description: | - No longer required, except if the supplied `transaction` contains inputs not in the `cardano-node` UTxO. + Mapping from inputs (`id`, `ix`) in the supplied `transaction` binary to outputs (`amount`, `assets`, ...). It is not required to include inputs present in the `cardano-node` UTxO, as `cardano-wallet` will automatically query for them. - Balancing a transaction requires knowing the full outputs (`amount`, `assets`, ...) of the inputs (`id`, `ix`) in the `transaction` binary. - The wallet will now automatically try to resolve inputs using the `cardano-node` UTxO. This `inputs` field is kept for backwards compatibility - and for cases where the inputs don't yet exist in the `cardano-node` UTxO. + In other words, this field can be left empty unless the supplied `transaction` contains inputs referring to pending transactions. type: array items: type: object