From 0035fd12692d60c0d47fdb6f0c636e4c3809d5a1 Mon Sep 17 00:00:00 2001 From: paolino Date: Tue, 2 Jan 2024 13:44:16 +0000 Subject: [PATCH] Add support for restoration mode in swagger file --- specifications/api/swagger.yaml | 68 +++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/specifications/api/swagger.yaml b/specifications/api/swagger.yaml index a9c1b0c7eff..37a0ef14e91 100644 --- a/specifications/api/swagger.yaml +++ b/specifications/api/swagger.yaml @@ -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 @@ -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 @@ -3025,6 +3092,7 @@ components: passphrase: *walletPassphrase address_pool_gap: *walletAddressPoolGap one_change_address_mode: *oneChangeAddressMode + restoration_mode: *restorationMode ApiAccountPostData: &ApiAccountPostData type: object