commit 18186c640534bef371de1e303e9c49bb8387202f
parent 744d691a15784c2575d0c04d305b34a2f29349ae
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Wed, 5 Nov 2025 23:45:27 +0100
update spec:
Diffstat:
2 files changed, 39 insertions(+), 24 deletions(-)
diff --git a/core/api-mailbox.rst b/core/api-mailbox.rst
@@ -199,7 +199,7 @@ Receiving messages
// Signature by the mailbox's private key affirming
// the deletion of the messages, of purpuse
// ``TALER_SIGNATURE_WALLET_MAILBOX_DELETE_MESSAGES``.
- signature: EddsaSignature;
+ signature: string;
}
@@ -228,7 +228,7 @@ Key directory
:http:statuscode:`200 Ok`:
Keys are returned in a `MailboxMessageKeys` response,
- :http:statuscode:`204 No Content`:
+ :http:statuscode:`404 Not Found`:
The mailbox has no keys configured.
:http:statuscode:`429 Too Many Requests`:
The system is currently experiencing a too high request
@@ -247,27 +247,30 @@ Key directory
// Note that ``$H_MAILBOX == H(singingKey)``.
// Note also how this key cannot be updated
// as it identifies the mailbox.
- signingKey: EddsaKey;
+ // Base32 crockford-encoded.
+ signingKey: string;
// Type of key.
- // Optional, as currently only
+ // Currently only
// EdDSA keys are supported.
- signingKeyType?: "EdDSA";
+ signingKeyType: "EdDSA";
// The mailbox encryption key.
- // This is an HPKE public key
- // in the X25519 format for use
- // in a X25519-DHKEM (RFC 9180).
+ // This is a HPKE public key
+ // Currently, only the X25519 format
+ // for use in a X25519-DHKEM (RFC 9180)
+ // is supported.
// Base32 crockford-encoded.
encryptionKey: string;
// Type of key.
- // Optional, as currently only
+ // Currently only
// X25519 keys are supported.
- encryptionKeyType?: "X25519";
+ encryptionKeyType: "X25519";
// Expiration of this mapping.
- expiration: Timestamp;
+ // Unix epoch (seconds) FIXME Timestamp?
+ expiration: number;
}
@@ -275,6 +278,8 @@ Key directory
.. http:post:: /keys
Requests the update of the encryption key for the mailbox.
+ The mailbox identity is given through the keys field
+ in the ``MailboxMessageKeys`` field.
**Request**
@@ -291,11 +296,14 @@ Key directory
keys: MailboxMessageKeys;
// Signature by the mailbox's signing key affirming
- // the update of keys, of purpuse
+ // the update of keys, of purpose
// ``TALER_SIGNATURE_WALLET_MAILBOX_UPDATE_KEYS``.
// The signature is created over the SHA-512 hash
// of (encryptionKeyType||encryptionKey||expiration)
- signature: EddsaSignature;
+ // Base32 crockford-encoded.
+ // The signature system is defined through the
+ // signingKeyType in the keys field.
+ signature: string;
}
diff --git a/design-documents/070-alias-directory-mailbox.rst b/design-documents/070-alias-directory-mailbox.rst
@@ -272,27 +272,31 @@ Wire format MailboxMessage:
.. _MailboxMessage:
.. ts:def:: MailboxMessage
- type MailboxMessage = (PaymentInvoiceRequestMessage | SendMoneyMessage) & MailboxMessageCommon
+ type MailboxMessage = (PaymentInvoiceMessage | MoneyTransferMessage) & MailboxMessageCommon
-.. _PaymentInvoiceRequestMessage:
-.. ts:def:: PaymentInvoiceRequestMessage
+.. _PaymentInvoiceMessage:
+.. ts:def:: PaymentInvoiceMessage
- interface PaymentInvoiceRequestMessage {
+ interface PaymentInvoiceMessage {
+ // Message type
+ type: "payment-invoice";
- // Pay push URI.
- payPushUri: string;
+ // Pay pull URI.
+ payPullUri: string;
}
-.. _SendMoneyMessage:
-.. ts:def:: SendMoneyMessage
+.. _MoneyTransferMessage:
+.. ts:def:: MoneyTransferMessage
- interface SendMoneyMessage {
+ interface MoneyTransferMessage {
+ // Message type
+ type: "money-transfer";
- // Pay pull URI.
- payPullUri: string;
+ // Pay push URI.
+ payPushUri: string;
}
@@ -300,6 +304,9 @@ Wire format MailboxMessage:
.. ts:def:: MailboxMessageCommon
interface MailboxMessageCommon {
+ // Message type
+ messageType: string;
+
// Message identifier
messageId: string;