summaryrefslogtreecommitdiff
path: root/core/api-common.rst
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-06-22 19:34:47 +0200
committerChristian Grothoff <christian@grothoff.org>2021-06-22 19:34:47 +0200
commit555a18f735324a0d7829262529124b029098340d (patch)
treeaeaa5d6aef29c280209dea44d3141e7bce54c3d6 /core/api-common.rst
parent1c356f81ea3051aa443e61e951aace709e90d25d (diff)
parentf47314fe9460324d5bf331d0dc71d5358c6d8e08 (diff)
downloaddocs-555a18f735324a0d7829262529124b029098340d.tar.gz
docs-555a18f735324a0d7829262529124b029098340d.tar.bz2
docs-555a18f735324a0d7829262529124b029098340d.zip
Merge branch 'dd13'
Diffstat (limited to 'core/api-common.rst')
-rw-r--r--core/api-common.rst454
1 files changed, 438 insertions, 16 deletions
diff --git a/core/api-common.rst b/core/api-common.rst
index 19f6bf55..9c23b905 100644
--- a/core/api-common.rst
+++ b/core/api-common.rst
@@ -64,6 +64,8 @@ handle the error as if an internal error (500) had been returned.
changed, the client MUST follow the link to the new location. If possible,
the client SHOULD remember the new URL for the reserve for future
requests.
+ :http:statuscode:`400 Bad request`:
+ One of the arguments to the request is missing or malformed.
:http:statuscode:`500 Internal server error`:
This always indicates some serious internal operational error of the exchange,
such as a program bug, database problems, etc., and must not be used for
@@ -75,10 +77,7 @@ handle the error as if an internal error (500) had been returned.
although the auditor API for this is not yet specified. However, as internal
server errors are always reported to the exchange operator, a good operator
should naturally be able to address them in a timely fashion, especially
- within 24h. When generating an internal server error, the exchange responds with
- a JSON object containing the following fields: FIXME: What are the fields?
- :http:statuscode:`400 Bad request`:
- One of the arguments to the request is missing or malformed.
+ within 24h.
Unless specified otherwise, all error status codes (4xx and 5xx) have a message
body with an `ErrorDetail` JSON object.
@@ -500,6 +499,13 @@ uses 512-bit hash codes (64 bytes).
uint8_t hash[64]; // usually SHA-512
};
+.. _TALER_EcdhEphemeralPublicKeyP:
+.. sourcecode:: c
+
+ struct TALER_EcdhEphemeralPublicKeyP {
+ uint8_t ecdh_pub[32];
+ };
+
.. _reserve-pub:
.. sourcecode:: c
@@ -584,6 +590,13 @@ uses 512-bit hash codes (64 bytes).
uint32_t value[4];
};
+.. _WadId:
+.. sourcecode:: c
+
+ struct TALER_WadId wad_id {
+ uint32_t value[6];
+ };
+
.. _eddsa-coin-pub:
.. sourcecode:: c
@@ -706,11 +719,6 @@ within the
struct TALER_MerchantPublicKeyP merchant;
};
-.. _TALER_RefreshCommitmentP:
-.. sourcecode:: c
-
- // FIXME: put definition here
-
.. _TALER_RefreshMeltCoinAffirmationPS:
.. sourcecode:: c
@@ -753,6 +761,9 @@ within the
struct TALER_ExchangePublicKeyP signkey_pub;
};
+.. _TALER_ExchangeKeySetPS:
+.. sourcecode:: c
+
struct TALER_ExchangeKeySetPS {
/**
* purpose.purpose = TALER_SIGNATURE_EXCHANGE_KEY_SET
@@ -793,7 +804,6 @@ within the
struct GNUNET_HashCode h_wire_details;
};
-
.. _TALER_MasterWireFeePS:
.. sourcecode:: c
@@ -814,7 +824,7 @@ within the
struct TALER_DepositTrackPS {
/**
- * purpose.purpose = TALER_SIGNATURE_MASTER_SEPA_DETAILS || TALER_SIGNATURE_MASTER_TEST_DETAILS
+ * purpose.purpose = TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION
*/
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
struct GNUNET_HashCode h_contract_terms;
@@ -834,7 +844,6 @@ within the
struct TALER_AmountNBO deposit_fee;
};
-
.. _TALER_WireDepositDataPS:
.. _TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE_DEPOSIT:
.. sourcecode:: c
@@ -917,12 +926,31 @@ within the
.. _TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND:
.. sourcecode:: c
- // FIXME: put definition here
+ struct TALER_RefundConfirmationPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_HashCode h_contract_terms;
+ struct TALER_CoinSpendPublicKeyP coin_pub;
+ struct TALER_MerchantPublicKeyP merchant;
+ uint64_t rtransaction_id;
+ struct TALER_AmountNBO refund_amount;
+ };
.. _TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION:
.. sourcecode:: c
- // FIXME: put definition here
+ struct TALER_DepositTrackPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_HashCode h_contract_terms;
+ struct GNUNET_HashCode h_wire;
+ struct TALER_MerchantPublicKeyP merchant;
+ struct TALER_CoinSpendPublicKeyP coin_pub;
+ };
.. _TALER_RefundRequestPS:
.. sourcecode:: c
@@ -940,6 +968,9 @@ within the
struct TALER_AmountNBO refund_fee;
};
+.. _TALER_MerchantRefundConfirmationPS:
+.. sourcecode:: c
+
struct TALER_MerchantRefundConfirmationPS {
/**
* purpose.purpose = TALER_SIGNATURE_MERCHANT_REFUND_OK
@@ -969,7 +1000,6 @@ within the
.. sourcecode:: c
struct TALER_RecoupRefreshConfirmationPS {
-
/**
* purpose.purpose = TALER_SIGNATURE_EXCHANGE_CONFIRM_RECOUP_REFRESH
*/
@@ -985,7 +1015,7 @@ within the
struct TALER_RecoupConfirmationPS {
/**
- * purpose.purpose = TALER_SIGNATURE_EXCHANGE_CONFIRM_RECOUP
+ * purpose.purpose = TALER_SIGNATURE_EXCHANGE_CONFIRM_RECOUP
*/
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
struct GNUNET_TIME_AbsoluteNBO timestamp;
@@ -995,6 +1025,33 @@ within the
};
+.. _TALER_DenominationUnknownAffirmationPS:
+.. sourcecode:: c
+
+ struct TALER_DenominationUnknownAffirmationPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_EXCHANGE_AFFIRM_DENOM_UNKNOWN
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO timestamp;
+ struct GNUNET_HashCode h_denom_pub;
+ };
+
+
+.. _TALER_DenominationExpiredAffirmationPS:
+.. sourcecode:: c
+
+ struct TALER_DenominationExpiredAffirmationPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_EXCHANGE_GENERIC_DENOMINATIN_EXPIRED
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO timestamp;
+ char operation[8];
+ struct GNUNET_HashCode h_denom_pub;
+ };
+
+
.. _TALER_ReserveCloseConfirmationPS:
.. sourcecode:: c
@@ -1022,3 +1079,368 @@ within the
struct TALER_TransferPublicKeyP transfer_pub;
struct GNUNET_HashCode coin_envelope_hash;
};
+
+
+
+
+.. _TALER_ReserveStatusRequestSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_ReserveStatusRequestSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_RESERVE_STATUS_REQUEST
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO request_timestamp;
+ };
+
+
+.. _TALER_ReserveHistoryRequestSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_ReserveHistoryRequestSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_RESERVE_HISTORY_REQUEST
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_AmountNBO history_fee;
+ struct GNUNET_TIME_AbsoluteNBO request_timestamp;
+ };
+
+
+.. _TALER_PurseStatusRequestSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_PurseStatusRequestSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_PURSE_STATUS_REQUEST
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ };
+
+
+.. _TALER_PurseStatusResponseSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_PurseStatusResponseSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_PURSE_STATUS_RESPONSE
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_AmountNBO total_purse_amount;
+ struct TALER_AmountNBO total_deposit_amount;
+ struct TALER_AmountNBO max_deposit_fees;
+ struct GNUNET_TIME_AbsoluteNBO purse_expiration;
+ struct GNUNET_TIME_AbsoluteNBO status_timestamp;
+ struct GNUNET_HashCode h_contract_terms;
+ };
+
+
+.. _TALER_ReserveCloseRequestSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_ReserveCloseRequestSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_RESERVE_CLOSE
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ };
+
+.. _TALER_RefreshCommitmentP:
+.. sourcecode:: c
+
+ struct TALER_RefreshCommitmentP {
+ struct GNUNET_HashCode session_hash;
+ };
+
+
+.. _TALER_PurseRequestSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_PurseRequestSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_PURSE_REQUEST
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO purse_expiration;
+ struct TALER_AmountNBO merge_value_after_fees;
+ struct GNUNET_HashCode h_contract_terms;
+ };
+
+
+.. _TALER_PurseDepositSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_PurseDepositSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_PURSE_DEPOSIT
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_AmountNBO coin_contribution;
+ struct GNUNET_TIME_AbsoluteNBO purse_expiration;
+ struct TALER_PursePublicKey purse_pub;
+ struct GNUNET_HashCode h_contract_terms;
+ };
+
+
+.. _TALER_PurseDepositConfirmedSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_PurseDepositConfirmedSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_PURSE_DEPOSIT_CONFIRMED
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_AmountNBO total_purse_amount;
+ struct TALER_AmountNBO total_deposit_fees;
+ struct TALER_PursePublicKey purse_pub;
+ struct GNUNET_TIME_AbsoluteNBO purse_expiration;
+ struct GNUNET_HashCode h_contract_terms;
+ };
+
+.. _TALER_PurseMergeSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_PurseMergeSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_PURSE_MERGE
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_ReservePublicKey reserve_pub;
+ struct GNUNET_TIME_AbsoluteNBO merge_timestamp;
+ struct GNUNET_TIME_AbsoluteNBO purse_expiration;
+ struct TALER_AmountNBO merge_value_after_fees;
+ struct GNUNET_HashCode h_contract_terms;
+ struct GNUNET_HashCode h_wire;
+ };
+
+
+.. _TALER_AccountMergeSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_AccountMergeSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_ACCOUNT_MERGE
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_PursePublicKey purse_pub;
+ struct GNUNET_TIME_AbsoluteNBO merge_timestamp;
+ struct GNUNET_TIME_AbsoluteNBO purse_expiration;
+ struct TALER_AmountNBO merge_value_after_fees;
+ struct GNUNET_HashCode h_contract_terms;
+ struct GNUNET_HashCode h_wire;
+ };
+
+
+.. _TALER_PurseMergeSuccessSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_PurseMergeSuccessSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_PURSE_MERGE_SUCCESS
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_ReservePublicKey reserve_pub;
+ struct TALER_PursePublicKey purse_pub;
+ struct TALER_AmountNBO merge_amount_after_fees;
+ struct GNUNET_TIME_AbsoluteNBO contract_time;
+ struct GNUNET_HashCode h_contract_terms;
+ struct GNUNET_HashCode h_wire;
+ };
+
+
+.. _TALER_AccountSetupRequestSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_AccountSetupRequestSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_ACCOUNT_SETUP_REQUEST
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO kyc_timestamp;
+ struct TALER_AmountNBO kyc_fee;
+ struct GNUNET_HashCode h_wire;
+ };
+
+
+.. _TALER_AccountSetupSuccessSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_AccountSetupRequestSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_ACCOUNT_SETUP_SUCCESS
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_ReservePublicKey reserve_pub;
+ struct GNUNET_TIME_AbsoluteNBO now;
+ };
+
+
+.. _TALER_WadDataSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_WadDataSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_WAD_DATA
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO wad_execution_time;
+ struct TALER_AmountNBO total_amount;
+ struct GNUNET_HashCode h_items;
+ struct TALER_WadId wad_id;
+ };
+
+.. _TALER_WadPartnerSignaturePS:
+.. sourcecode:: c
+
+ struct TALER_WadPartnerSignaturePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_MASTER_PARTNER_DETAILS
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_HashCode h_partner_base_url;
+ struct TALER_MasterPublicKeyP master_public_key;
+ struct GNUNET_TIME_AbsoluteNBO start_date;
+ struct GNUNET_TIME_AbsoluteNBO end_date;
+ struct TALER_AmountNBO wad_fee;
+ struct GNUNET_TIME_RelativeNBO wad_frequency;
+ };
+
+
+.. _TALER_P2PFeesPS:
+.. sourcecode:: c
+
+ struct TALER_P2PFeesPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_P2P_FEES
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO start_date;
+ struct GNUNET_TIME_AbsoluteNBO end_date;
+ struct TALER_AmountNBO kyc_fee;
+ struct TALER_AmountNBO purse_fee;
+ struct TALER_AmountNBO account_history_fee;
+ struct TALER_AmountNBO account_annual_fee;
+ struct GNUNET_TIME_RelativeNBO account_kyc_timeout;
+ struct GNUNET_TIME_RelativeNBO purse_timeout;
+ uint32_t purse_account_limit;
+ };
+
+
+.. _TALER_SIGNATURE_EXCHANGE_CONFIRM_PURSE_REFUND:
+.. sourcecode:: c
+
+ struct TALER_CoinPurseRefundConfirmationPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_EXCHANGE_CONFIRM_PURSE_REFUND.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_PursePublicKey purse_pub;
+ struct TALER_CoinSpendPublicKeyP coin_pub;
+ struct TALER_MerchantPublicKeyP merchant;
+ struct TALER_AmountNBO remaining_amount;
+ struct TALER_AmountNBO purse_fee_share;
+ struct TALER_AmountNBO refund_fee;
+ };
+
+
+.. _TALER_DenominationKeyAnnouncementPS:
+.. sourcecode:: c
+
+ struct TALER_DenominationKeyAnnouncementPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_SM_DENOMINATION_KEY
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_HashCode h_denom_pub;
+ struct GNUNET_HashCode h_section_name;
+ struct GNUNET_TIME_AbsoluteNBO anchor_time;
+ struct GNUNET_TIME_RelativeNBO duration_withdraw;
+ };
+
+
+.. _TALER_SigningKeyAnnouncementPS:
+.. sourcecode:: c
+
+ struct TALER_SigningKeyAnnouncementPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_SM_SIGNING_KEY .
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_ExchangePublicKeyP exchange_pub;
+ struct GNUNET_TIME_AbsoluteNBO anchor_time;
+ struct GNUNET_TIME_RelativeNBO duration;
+ };
+
+.. _TALER_MasterDenominationKeyRevocationPS:
+.. sourcecode:: c
+
+ struct TALER_MasterDenominationKeyRevocationPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_HashCode h_denom_pub;
+ };
+
+
+.. _TALER_MasterSigningKeyRevocationPS:
+.. sourcecode:: c
+
+ struct TALER_MasterSigningKeyRevocationPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_MASTER_SIGNING_KEY_REVOKED.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct TALER_ExchangePublicKeyP exchange_pub;
+ };
+
+
+.. _TALER_MasterAddAuditorPS:
+.. sourcecode:: c
+
+ struct TALER_MasterAddAuditorPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_MASTER_ADD_AUDITOR
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO start_date;
+ struct TALER_AuditorPublicKeyP auditor_pub;
+ struct GNUNET_HashCode h_auditor_url;
+ };
+
+.. _TALER_MasterDelAuditorPS:
+.. sourcecode:: c
+
+ struct TALER_MasterDelAuditorPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_MASTER_DEL_AUDITOR
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO end_date;
+ struct TALER_AuditorPublicKeyP auditor_pub;
+ };
+
+.. _TALER_MasterAddWirePS:
+.. sourcecode:: c
+
+ struct TALER_MasterAddWirePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_MASTER_ADD_WIRE.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO start_date;
+ struct GNUNET_HashCode h_wire GNUNET_PACKED;
+ };
+
+.. _TALER_MasterDelWirePS:
+.. sourcecode:: c
+
+ struct TALER_MasterDelWirePS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_MASTER_DEL_WIRE.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO end_date;
+ struct GNUNET_HashCode h_wire GNUNET_PACKED;
+ };