Skip to content

Commit

Permalink
add withdrawals to the API Swagger specification
Browse files Browse the repository at this point in the history
We represent them as a list and not a key:value map with stake address as key because clients typically don't know the stake address associated with their wallet, so it'd be quite impractical for them to access this data if returned as a map...
  • Loading branch information
KtorZ committed Jul 10, 2020
1 parent c672b67 commit fd55332
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions specifications/api/swagger.yaml
Expand Up @@ -215,6 +215,11 @@ x-amount: &amount
enum:
- lovelace

x-stakeAddress: &stakeAddress
type: string
format: bech32
example: stake_addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x

x-addressId: &addressId
type: string
format: base58|bech32
Expand Down Expand Up @@ -460,6 +465,20 @@ x-transactionOutputs: &transactionOutputs
address: *addressId
amount: *transactionAmount

x-transactionWithdrawals: &transactionWithdrawals
description: A list of withdrawals from stake addresses.
type: array
minItems: 0
items:
type: object
additionalProperties: false
required:
- stake_address
- amount
properties:
stake_address: *stakeAddress
amount: *amount

x-transactionResolvedInputs: &transactionResolvedInputs
description: A list of transaction inputs
type: array
Expand Down Expand Up @@ -902,6 +921,7 @@ components:
- direction
- inputs
- outputs
- withdrawals
- status
properties:
id: *transactionId
Expand All @@ -912,6 +932,7 @@ components:
direction: *transactionDirection
inputs: *transactionInputs
outputs: *transactionOutputs
withdrawals: *transactionWithdrawals
status: *transactionStatus

ApiWalletDelegationNext: &ApiWalletDelegationNext
Expand Down

0 comments on commit fd55332

Please sign in to comment.