Skip to content

Commit

Permalink
Add support for restoration mode in swagger file
Browse files Browse the repository at this point in the history
  • Loading branch information
paolino committed Feb 9, 2024
1 parent b6d991b commit 0035fd1
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions specifications/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,42 @@ x-numberOfBlocks: &numberOfBlocks
- block
example: "block"

x-genesis: &genesis
type: object
required:
- unit
properties:
unit:
type: string
enum:
- genesis
example: "genesis"

x-tip: &tip
type: object
required:
- unit
properties:
unit:
type: string
enum:
- tip
example: "tip"

x-date-time: &date-time
type: object
required:
- value
- unit
properties:
value:
type: string
format: ISO 8601
unit:
type: string
enum:
- time

x-blockReference: &blockReference
description: A reference to a particular time slot, and the block height at that point.
type: object
Expand Down Expand Up @@ -465,6 +501,37 @@ x-oneChangeAddressMode: &oneChangeAddressMode
type: boolean
default: false

x-restorationMode: &restorationMode
description: |
The wallet restoration mode. This determines since when the wallet should
be restored from the blockchain.
oneOf:
- title: Restore from genesis
description: |
Restore the wallet from the genesis block. This will cause the wallet
to be restored from the very beginning of the blockchain.
<<: *genesis
- title: Restore from date
description: |
Restore the wallet from a specific date. This will cause the wallet
to be restored from the specified date.
<<: *date-time
- title: Restore from block
description: |
Restore the wallet from a specific block. This will cause the wallet
to be restored from the specified block.
<<: *numberOfBlocks
- title: Restore from slot
description: |
Restore the wallet from a specific slot. This will cause the wallet
to be restored from the specified slot.
<<: *numberOfSlots
- title: Restore from tip
description: |
Restore the wallet from the tip of the blockchain. This will cause the
wallet to be restored from the tip of the blockchain.
<<: *tip

x-walletName: &walletName
type: string
maxLength: 255
Expand Down Expand Up @@ -3025,6 +3092,7 @@ components:
passphrase: *walletPassphrase
address_pool_gap: *walletAddressPoolGap
one_change_address_mode: *oneChangeAddressMode
restoration_mode: *restorationMode

ApiAccountPostData: &ApiAccountPostData
type: object
Expand Down

0 comments on commit 0035fd1

Please sign in to comment.