{
  "openapi": "3.1.0",
  "info": {
    "title": "Loopscale API",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://tars.loopscale.com/v1",
      "description": "Loopscale Production Server"
    }
  ],
  "paths": {
    "/markets/lending_vaults/deposit": {
      "post": {
        "tags": [
          "lending_vaults"
        ],
        "operationId": "query_lend_vault_deposit",
        "parameters": [
          {
            "name": "Idempotent-Key",
            "in": "header",
            "description": "Optional idempotency key; a retried write with the same key replays the original response",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LendVaultDepositQueryParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Serialized transaction and update stake account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LendVaultDepositResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "summary": "Vault deposit",
        "description": "Deposit funds into a target lending Vault. On an additional deposit, the previous stake account and reward schedule is deleted and a new one is created."
      }
    },
    "/markets/lending_vaults/withdraw": {
      "post": {
        "tags": [
          "lending_vaults"
        ],
        "operationId": "query_lend_vault_withdraw",
        "parameters": [
          {
            "name": "Idempotent-Key",
            "in": "header",
            "description": "Optional idempotency key; a retried write with the same key replays the original response",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LendVaultWithdrawQueryParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Serialized transaction and update stake account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LendVaultWithdrawResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "summary": "Vault withdraw",
        "description": "Withdraw funds from a target lending Vault. If any deposits remain, the previous stake account and reward schedule is deleted and a new one is created."
      }
    },
    "/markets/lending_vaults/rewards/claim": {
      "post": {
        "tags": [
          "lending_vaults"
        ],
        "operationId": "query_claim_lend_vault_rewards",
        "parameters": [
          {
            "name": "Idempotent-Key",
            "in": "header",
            "description": "Optional idempotency key; a retried write with the same key replays the original response",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimLendVaultRewardsParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Serialized transactions to claim rewards",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VersionedTransactionReturn"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "summary": "Claim Vault rewards",
        "description": "Claim rewards from a target lending Vault. This will harvest from all available rewards schedules and close empty accounts to refund SOL to requesting wallet."
      }
    },
    "/markets/lending_vaults/timelock/create": {
      "post": {
        "tags": [
          "lending_vaults"
        ],
        "operationId": "query_create_timelocks",
        "parameters": [
          {
            "name": "Idempotent-Key",
            "in": "header",
            "description": "Optional idempotency key; a retried write with the same key replays the original response",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitLendingVaultTimelockTxnParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Serialized versioned transactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VersionedTransactionReturn"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "summary": "Create vault timelocks",
        "description": "Create one or more timelock updates for vault collateral, rates, allocation, caps, and settings changes."
      }
    },
    "/markets/lending_vaults/timelock/cancel": {
      "post": {
        "tags": [
          "lending_vaults"
        ],
        "operationId": "query_cancel_timelock",
        "parameters": [
          {
            "name": "Idempotent-Key",
            "in": "header",
            "description": "Optional idempotency key; a retried write with the same key replays the original response",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/QueryCancelTimelockParams"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Serialized versioned transactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VersionedTransactionReturn"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "summary": "Cancel vault timelocks",
        "description": "Cancel one or more pending timelock entries."
      }
    },
    "/markets/lending_vaults/deposits/edit": {
      "post": {
        "tags": [
          "lending_vaults"
        ],
        "operationId": "query_edit_lend_vault_deposits",
        "parameters": [
          {
            "name": "Idempotent-Key",
            "in": "header",
            "description": "Optional idempotency key; a retried write with the same key replays the original response",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditLendVaultDepositsQueryParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Serialized versioned transaction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionedTransactionReturn"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "summary": "Edit vault deposits",
        "description": "Enable or disable deposits for a lending vault."
      }
    },
    "/markets/lending_vaults/rewards/schedule/create": {
      "post": {
        "tags": [
          "lending_vaults"
        ],
        "operationId": "query_create_lend_vault_rewards_schedule",
        "parameters": [
          {
            "name": "Idempotent-Key",
            "in": "header",
            "description": "Optional idempotency key; a retried write with the same key replays the original response",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRewardsScheduleTxnParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Serialized versioned transaction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionedTransactionReturn"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "summary": "Create rewards schedule",
        "description": "Create a new vault rewards schedule and optionally deposit reward tokens into it."
      }
    },
    "/markets/lending_vaults/rewards/schedule/edit": {
      "post": {
        "tags": [
          "lending_vaults"
        ],
        "operationId": "query_edit_lend_vault_rewards_schedule",
        "parameters": [
          {
            "name": "Idempotent-Key",
            "in": "header",
            "description": "Optional idempotency key; a retried write with the same key replays the original response",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRewardsScheduleTxnParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Serialized versioned transaction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionedTransactionReturn"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "summary": "Edit rewards schedule",
        "description": "Edit an existing vault rewards schedule and optionally extend its end time while depositing additional rewards."
      }
    }
  },
  "components": {
    "schemas": {
      "AddCollateralArgs": {
        "type": "object",
        "required": [
          "durationsAndApys"
        ],
        "properties": {
          "durationsAndApys": {
            "type": "object",
            "description": "Request map of serialized-duration → apy, both as strings.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "externalMarketInformationAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "marketInformation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ParsedUpdateAssetDataParams",
                "description": "Parsed asset-data params (ignored for base vaults / custom strategy)."
              }
            ]
          }
        }
      },
      "ClaimLendVaultRewardsParams": {
        "type": "object",
        "required": [
          "vaultAddress"
        ],
        "properties": {
          "rewardMints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unclaimedStakeAccounts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "vaultAddress": {
            "type": "string"
          }
        }
      },
      "CollateralAllocationUpdateArgs": {
        "type": "object",
        "required": [
          "assetIdentifier",
          "maxAllocationPct"
        ],
        "properties": {
          "assetIdentifier": {
            "type": "string"
          },
          "maxAllocationPct": {
            "type": "string"
          }
        }
      },
      "CollateralParamsUpdateArgs": {
        "type": "object",
        "properties": {
          "apyUpdate": {
            "type": [
              "object",
              "null"
            ],
            "description": "Request map of serialized-duration → apy, both as strings.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "ltvUpdate": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ParsedUpdateAssetDataParams",
                "description": "Parsed asset-data params."
              }
            ]
          }
        }
      },
      "CreateRewardsScheduleTxnParams": {
        "type": "object",
        "required": [
          "vaultAddress",
          "amountToDeposit",
          "rewardMint",
          "rewardStartTime",
          "rewardEndTime",
          "durationStakeWeights"
        ],
        "properties": {
          "amountToDeposit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "durationStakeWeights": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          "rewardEndTime": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "rewardMint": {
            "type": "string"
          },
          "rewardStartTime": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "vaultAddress": {
            "type": "string"
          }
        }
      },
      "EditLendVaultDepositsQueryParams": {
        "type": "object",
        "required": [
          "lendVaultAddress",
          "depositsEnabled"
        ],
        "properties": {
          "depositsEnabled": {
            "type": "boolean"
          },
          "lendVaultAddress": {
            "type": "string"
          }
        }
      },
      "EditStrategySettingsArgs": {
        "type": "object",
        "properties": {
          "externalYieldSource": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ExternalYieldSourceParams"
              }
            ]
          },
          "interestFee": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "liquidityBuffer": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "originationCap": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "originationFee": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "originationsEnabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "principalFee": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "EditVaultArgs": {
        "type": "object",
        "required": [
          "maxEarlyUnstakeFeeCbps"
        ],
        "properties": {
          "maxEarlyUnstakeFeeCbps": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ErrorDetails": {
        "type": "object",
        "description": "Inner detail of the [`ErrorResponse`] envelope.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code, mirrored in the response status line",
            "example": 400,
            "minimum": 0
          },
          "message": {
            "type": "string",
            "description": "human-readable, client-safe message (sensitive data redacted)",
            "example": "Request could not be processed."
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Canonical error envelope for every endpoint. The `x-request-id` response\nheader carries the correlation id for the failing request.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetails",
            "description": "error detail"
          }
        }
      },
      "ExternalYieldSourceParams": {
        "type": "object",
        "required": [
          "newExternalYieldSource"
        ],
        "properties": {
          "newExternalYieldSource": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "InitLendingVaultTimelockTxnParams": {
        "type": "object",
        "required": [
          "vaultAddress"
        ],
        "properties": {
          "collateralUpdates": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StrategyCollateralUpdates"
              }
            ]
          },
          "editStrategyArgs": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/EditStrategySettingsArgs"
              }
            ]
          },
          "editVaultArgs": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/EditVaultArgs"
              }
            ]
          },
          "updatePrincipalCaps": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PrincipalCapsUpdateArgs"
              }
            ]
          },
          "vaultAddress": {
            "type": "string"
          }
        }
      },
      "LendVaultDepositQueryParams": {
        "type": "object",
        "required": [
          "vault",
          "principalAmount",
          "minLpAmount"
        ],
        "properties": {
          "depositOnly": {
            "type": "boolean"
          },
          "minLpAmount": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "principalAmount": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "vault": {
            "type": "string"
          }
        }
      },
      "LendVaultDepositResponse": {
        "type": "object",
        "required": [
          "transaction",
          "stakeAccount"
        ],
        "properties": {
          "preTransactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionedTransactionReturn"
            },
            "description": "Unstake-only transactions that must be executed before the main transaction\nwhen consolidating more positions than fit in a single transaction."
          },
          "stakeAccount": {
            "type": "string"
          },
          "transaction": {
            "$ref": "#/components/schemas/VersionedTransactionReturn"
          }
        }
      },
      "LendVaultWithdrawQueryParams": {
        "type": "object",
        "required": [
          "vault",
          "amountPrincipal",
          "maxAmountLp",
          "withdrawAll"
        ],
        "properties": {
          "amountPrincipal": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "maxAmountLp": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "vault": {
            "type": "string"
          },
          "withdrawAll": {
            "type": "boolean"
          },
          "withdrawOnly": {
            "type": "boolean"
          }
        }
      },
      "LendVaultWithdrawResponse": {
        "type": "object",
        "required": [
          "transaction",
          "stakeAccount"
        ],
        "properties": {
          "preTransactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionedTransactionReturn"
            },
            "description": "Unstake-only transactions that must be executed before the main transaction\nwhen consolidating more positions than fit in a single transaction."
          },
          "stakeAccount": {
            "type": "string"
          },
          "transaction": {
            "$ref": "#/components/schemas/VersionedTransactionReturn"
          }
        }
      },
      "ParsedUpdateAssetDataParams": {
        "type": "object",
        "description": "Parsed per-collateral asset-data / oracle config update (LTV, liquidation\nthreshold, oracle account/type, allocation cap).",
        "required": [
          "assetIdentifier"
        ],
        "properties": {
          "assetIdentifier": {
            "type": "string"
          },
          "liquidationThreshold": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "ltv": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "maxAge": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "maxCollateralAllocationPct": {
            "type": [
              "string",
              "null"
            ]
          },
          "maxUncertainty": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "oracleAccount": {
            "type": [
              "string",
              "null"
            ]
          },
          "oracleType": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "quoteMint": {
            "type": [
              "string",
              "null"
            ]
          },
          "removeCollateral": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "PrincipalCapsUpdateArgs": {
        "type": "object",
        "required": [
          "max1HrBorrowCap",
          "max24HrBorrowCap",
          "maxOutstandingBorrowCap",
          "max1HrSupplyCap",
          "max24HrSupplyCap",
          "maxOutstandingSupplyCap",
          "max1HrWithdrawCap",
          "max24HrWithdrawCap"
        ],
        "properties": {
          "max1HrBorrowCap": {
            "type": "string"
          },
          "max1HrSupplyCap": {
            "type": "string"
          },
          "max1HrWithdrawCap": {
            "type": "string"
          },
          "max24HrBorrowCap": {
            "type": "string"
          },
          "max24HrSupplyCap": {
            "type": "string"
          },
          "max24HrWithdrawCap": {
            "type": "string"
          },
          "maxOutstandingBorrowCap": {
            "type": "string"
          },
          "maxOutstandingSupplyCap": {
            "type": "string"
          }
        }
      },
      "QueryCancelTimelockParams": {
        "type": "object",
        "required": [
          "manager",
          "timelock",
          "vault"
        ],
        "properties": {
          "manager": {
            "type": "string"
          },
          "timelock": {
            "type": "string"
          },
          "vault": {
            "type": "string"
          }
        }
      },
      "RemoveCollateralArgs": {
        "type": "object",
        "required": [
          "durations",
          "removeFromMarketInformation"
        ],
        "properties": {
          "durations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StrategyDuration"
            }
          },
          "removeFromMarketInformation": {
            "type": "boolean"
          }
        }
      },
      "StrategyCollateralUpdates": {
        "type": "object",
        "properties": {
          "addCollateral": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/AddCollateralArgs"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "removeCollateral": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/RemoveCollateralArgs"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "updateAssetAllocation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CollateralAllocationUpdateArgs"
            }
          },
          "updateCollateral": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/CollateralParamsUpdateArgs"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "StrategyDuration": {
        "type": "object",
        "required": [
          "duration",
          "durationType"
        ],
        "properties": {
          "duration": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "durationType": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "UpdateRewardsScheduleTxnParams": {
        "type": "object",
        "required": [
          "vaultAddress",
          "scheduleIndex",
          "amountToDeposit",
          "rewardMint"
        ],
        "properties": {
          "amountToDeposit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "newScheduleEndTime": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "rewardMint": {
            "type": "string"
          },
          "scheduleIndex": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "vaultAddress": {
            "type": "string"
          }
        }
      },
      "VersionedTransactionReturn": {
        "type": "object",
        "description": "versioned txn return",
        "required": [
          "message",
          "signatures"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "serialized message"
          },
          "signatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionedTransactionSignature"
            },
            "description": "serialized signatures"
          }
        }
      },
      "VersionedTransactionSignature": {
        "type": "object",
        "description": "versioned txn return",
        "required": [
          "publicKey",
          "signature"
        ],
        "properties": {
          "publicKey": {
            "type": "string",
            "description": "serialized message"
          },
          "signature": {
            "type": "string",
            "description": "serialized signatures"
          }
        }
      }
    }
  }
}
