commit caac5529f95bf7478408e050d781ad49012b537e parent b41f3de181385f107dc7fc9ed22930dcf6d687ce Author: Christian Grothoff <grothoff@gnunet.org> Date: Thu, 24 Apr 2025 15:42:28 +0200 add missing /contracts endpoint specification Diffstat:
| M | core/api-exchange.rst | | | 29 | ++++++++++++++++++++++++++++- |
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/core/api-exchange.rst b/core/api-exchange.rst @@ -4700,7 +4700,6 @@ Wallet-to-wallet transfers } - .. http:delete:: /purses/$PURSE_PUB Delete a purse that is unmerged and not yet expired. Refunds any money that @@ -4935,6 +4934,34 @@ Wallet-to-wallet transfers } +.. http:get:: /contracts/$CONTRACT_PUB + + Obtain P2P contract associated with the given contract public key. + + **Response:** + + :http:statuscode:`200 Ok`: + The contract is being returned using a `ExchangeContractResponse`. + :http:statuscode:`404 Not found`: + The contract is unknown. + This response comes with a standard `ErrorDetail` response. + + **Details:** + + .. ts:def:: ExchangeContractResponse + + interface ExchangeContractResponse { + + // Public key of the purse into which payments must be + // made for this contract. + purse_pub: PursePublicKey; + + // Signature over the contract + econtract_sig: PurseContractSignature; + + // Encrypted contract. + econtract: EncryptedContract; + } .. http:post:: /purses/$PURSE_PUB/deposit