diff options
Diffstat (limited to 'core/api-wire.rst')
-rw-r--r-- | core/api-wire.rst | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/core/api-wire.rst b/core/api-wire.rst index fbf27469..654d72f3 100644 --- a/core/api-wire.rst +++ b/core/api-wire.rst @@ -175,7 +175,15 @@ Querying the transaction history .. ts:def:: IncomingBankTransaction - interface IncomingBankTransaction { + // Union discriminated by the "type" field. + type IncomingBankTransaction = + | IncomingReserveTransaction + | IncomingWadTransaction; + + .. ts:def:: IncomingReserveTransaction + + interface IncomingReserveTransaction { + type: "RESERVE"; // Opaque identifier of the returned record. row_id: SafeUint64; @@ -195,6 +203,35 @@ Querying the transaction history // The reserve public key extracted from the transaction details. reserve_pub: EddsaPublicKey; + + } + + .. ts:def:: IncomingWadTransaction + + interface IncomingWadTransaction { + type: "WAD"; + + // Opaque identifier of the returned record. + row_id: SafeUint64; + + // Date of the transaction. + date: Timestamp; + + // Amount transferred. + amount: Amount; + + // Payto URI to identify the receiver of funds. + // This must be one of the exchange's bank accounts. + credit_account: string; + + // Payto URI to identify the sender of funds. + debit_account: string; + + // Base URL of the exchange that originated the wad. + origin_exchange_url: string; + + // The reserve public key extracted from the transaction details. + wad_id: WadId; } @@ -308,6 +345,8 @@ exposed by bank gateways in production. Authentication failed, likely the credentials are wrong. :http:statuscode:`404 Not found`: The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. + :http:statuscode:`409 Conflict`: + The 'reserve_pub' argument was used previously in another transfer, and the specification mandates that reserve public keys must not be reused. .. ts:def:: AddIncomingRequest |