{"openapi":"3.0.0","info":{"title":"EVM Actions API","version":"1.0.0"},"servers":[{"url":"https://api.nest.credit/v1/actions","description":"EVM Actions API Server"}],"components":{"schemas":{"CrossChainMintQuote":{"type":"object","properties":{"sourceChainId":{"type":"number"},"destinationChainId":{"type":"number"},"destinationEid":{"type":"number"},"composerAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"sourceOftAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"destinationOftAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"depositAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"minimumShareAmount":{"type":"string"},"nativeFee":{"type":"string","description":"LayerZero fee in source-chain native base units, separate from transaction gas."}},"required":["sourceChainId","destinationChainId","destinationEid","composerAddress","sourceOftAddress","destinationOftAddress","depositAsset","minimumShareAmount","nativeFee"]},"MintRequestBody":{"type":"object","properties":{"depositAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"ERC20 address of the deposit asset on the requested chain.","example":"0xdddd73f5df1f0dc31373357beac77545dc5a6f3f"},"depositAmount":{"type":"string","pattern":"^\\d+$","description":"Raw base-unit amount of the deposit asset (string for bigint safety).","example":"1000000"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"EVM chain ID. Must be one of the supported chains (Plume=98866, Ethereum=1, Base=8453, BSC=56, Plasma=9745, Avalanche=43114, Arc=5042, Morph=2818, World Chain=480) and must match a chain the vault is deployed on.","example":98866},"destinationChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Receive shares on this chain. Omit or use chainId for a same-chain mint. Only registered composer destinations are supported.","example":98866},"recipient":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Destination recipient; required for cross-chain quotes and all builds."},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Source-chain caller, defaulting to recipient. A cross-chain deposit always represents this account."},"minimumShareAmount":{"type":"string","pattern":"^\\d+$","description":"Minimum raw output shares. Required for cross-chain builds; quotes default to their current net output. Retain the user-approved minimum when rebuilding."},"complianceVersion":{"type":"string","enum":["v1","v2"],"description":"Compliance stack used for the deposit calldata. `v1` = NestVaultPredicateProxy + Predicate message (default on existing chains; Arc and Morph default to v2); `v2` = ComplianceProxy + Predicate V2 attestation (opaque `complianceData`, supports `onBehalf`). Defaults to the vault registry setting.","example":"v2"}},"required":["depositAsset","depositAmount","chainId"]},"MintTransaction":{"type":"object","properties":{"complianceExpiresAt":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"V2 deposit proof expiration as Unix time in seconds, without a subtracted buffer. Omitted for approvals and V1 transactions. The proof is single-use and must remain valid at on-chain execution; rebuild when insufficient time remains for signing and inclusion."},"label":{"type":"string","enum":["approve","deposit"]},"description":{"type":"string"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"value":{"type":"string","pattern":"^\\d+$"}},"required":["label","description","to","data","value"]},"BuildMintTxRequestBody":{"allOf":[{"$ref":"#/components/schemas/MintRequestBody"},{"type":"object","properties":{"recipient":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Recipient of the minted shares; also the sender unless `sender` is provided.","example":"0x0000000000000000000000000000000000000001"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"EVM account that will execute the returned transactions and is screened as the compliance sender. Defaults to `recipient`. Set it when a relayer or aggregator submits the transactions on behalf of `onBehalf`.","example":"0x0000000000000000000000000000000000000002"},"skipSimulation":{"type":"boolean","default":false,"description":"Skip the approve + deposit transaction simulation preflight.","example":false},"onBehalf":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{40}|[a-fA-F0-9]{64})$","description":"Optional, `complianceVersion: \"v2\"` only. Represented end user when `sender` deposits on behalf of someone else (relayers or aggregators). EVM address or 32-byte hex identifier. The compliance policy screens both `sender` and `onBehalf`, and the deposit calldata uses `ComplianceProxy.depositOnBehalf`.","example":"0x0000000000000000000000000000000000000000000000000000000000000001"}},"required":["recipient"]}]},"RedeemRequestBody":{"type":"object","properties":{"redemptionType":{"type":"string","enum":["atomicQueue","nest"],"description":"Redemption route. New requests use the vault default when omitted. Pending and update requests first select an outstanding legacy AtomicQueue request, then use the default. Pass the same explicit type throughout a request lifecycle, especially when both routes have pending shares."},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"ERC20 address of the desired redemption asset on the requested chain.","example":"0x222365ef19f7947e5484218551b56bb3965aa7af"},"shareAmount":{"type":"string","pattern":"^\\d+$","description":"Raw base-unit amount of vault shares to redeem (string for bigint safety).","example":"1000000"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"EVM chain ID. Must be one of the supported chains (Plume=98866, Ethereum=1, Base=8453, BSC=56, Plasma=9745, Avalanche=43114, Arc=5042, Morph=2818) and must match a chain the vault is deployed on.","example":98866}},"required":["redemptionAsset","shareAmount","chainId"]},"RedeemTransaction":{"type":"object","properties":{"complianceExpiresAt":{"type":"number"},"label":{"type":"string","enum":["approve","requestRedeem","updateAtomicRequest"]},"description":{"type":"string"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"value":{"type":"string","enum":["0"]}},"required":["label","description","to","data","value"]},"BuildRedeemTxRequestBody":{"allOf":[{"$ref":"#/components/schemas/RedeemRequestBody"},{"type":"object","properties":{"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"User/controller address submitting the redemption.","example":"0x00000000000000000000000000000000000000ab"},"skipSimulation":{"type":"boolean","default":false,"description":"Skip the transaction simulation preflight.","example":false}},"required":["user"]}]},"PendingRedeemRequestBody":{"type":"object","properties":{"redemptionType":{"type":"string","enum":["atomicQueue","nest"],"description":"Redemption route. New requests use the vault default when omitted. Pending and update requests first select an outstanding legacy AtomicQueue request, then use the default. Pass the same explicit type throughout a request lifecycle, especially when both routes have pending shares."},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"ERC20 address of the desired redemption asset on the requested chain.","example":"0x222365ef19f7947e5484218551b56bb3965aa7af"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"EVM chain ID. Must be one of the supported chains and must match a chain the vault is deployed on.","example":98866},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"User/controller address whose current pending redemption should be read.","example":"0x00000000000000000000000000000000000000ab"}},"required":["redemptionAsset","chainId","user"]},"UpdateRedeemTransaction":{"type":"object","properties":{"label":{"type":"string","enum":["updateRedeem","updateAtomicRequest"]},"description":{"type":"string"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"value":{"type":"string","enum":["0"]}},"required":["label","description","to","data","value"]},"BuildUpdateRedeemTxRequestBody":{"allOf":[{"$ref":"#/components/schemas/PendingRedeemRequestBody"},{"type":"object","properties":{"newShareAmount":{"type":"string","pattern":"^\\d+$","description":"Raw base-unit final pending-share total after the reduction. Use 0 to cancel the request.","example":"500000"},"skipSimulation":{"type":"boolean","default":false,"description":"Skip the transaction simulation preflight.","example":false}},"required":["newShareAmount"]}]},"ClaimRequestBody":{"type":"object","properties":{"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"ERC20 address of the redemption asset used to select the NestVault on the requested chain.","example":"0x222365ef19f7947e5484218551b56bb3965aa7af"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"EVM chain ID. Must be one of the supported chains and must match a chain the vault is deployed on.","example":98866},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"User/controller address whose claimable redemption shares should be read or claimed.","example":"0x00000000000000000000000000000000000000ab"}},"required":["redemptionAsset","chainId","user"]},"ClaimTransaction":{"type":"object","properties":{"label":{"type":"string","enum":["claimRedeem"]},"description":{"type":"string"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"value":{"type":"string","enum":["0"]}},"required":["label","description","to","data","value"]},"BuildClaimTxRequestBody":{"allOf":[{"$ref":"#/components/schemas/ClaimRequestBody"},{"type":"object","properties":{"skipSimulation":{"type":"boolean","default":false,"description":"Skip the claim transaction simulation preflight.","example":false}}}]},"InstantRedeemRequestBody":{"type":"object","properties":{"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"ERC20 address of the desired instant redemption asset on the requested chain.","example":"0x222365ef19f7947e5484218551b56bb3965aa7af"},"shareAmount":{"type":"string","pattern":"^\\d+$","description":"Raw base-unit amount of vault shares to instant-redeem (string for bigint safety).","example":"1000000"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"EVM chain ID. Must be supported and must match a chain the vault is deployed on.","example":98866}},"required":["redemptionAsset","shareAmount","chainId"]},"InstantRedeemLiquidityRequestBody":{"type":"object","properties":{"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"ERC20 address of the desired instant redemption asset on the requested chain.","example":"0x222365ef19f7947e5484218551b56bb3965aa7af"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"EVM chain ID. Must be supported and must match a chain the vault is deployed on.","example":98866}},"required":["redemptionAsset","chainId"]},"InstantRedeemTransaction":{"type":"object","properties":{"complianceExpiresAt":{"type":"number"},"label":{"type":"string","enum":["approve","instantRedeem"]},"description":{"type":"string"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"value":{"type":"string","enum":["0"]}},"required":["label","description","to","data","value"]},"BuildInstantRedeemTxRequestBody":{"allOf":[{"$ref":"#/components/schemas/InstantRedeemRequestBody"},{"type":"object","properties":{"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"User/owner address instant-redeeming shares.","example":"0x00000000000000000000000000000000000000ab"},"receiver":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Optional receiver of redeemed assets. Defaults to user.","example":"0x00000000000000000000000000000000000000ab"},"skipSimulation":{"type":"boolean","default":false,"description":"Skip the transaction simulation preflight.","example":false}},"required":["user"]}]},"LoopRequest":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Position owner and signer of every returned transaction. Relayed execution is not supported."},"maxAssetInput":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum loan tokens that the bundle may pull from the wallet."},"maxShareInput":{"type":"string","pattern":"^\\d{1,78}$","default":"0","description":"Maximum existing vault shares that the bundle may pull from the wallet."},"slippageBps":{"type":"integer","minimum":0,"maximum":9999,"description":"Share-price slippage in basis points (50 = 0.5%). Supply this or the raw price limit, never both."},"maxSharePriceE27":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum mint price in raw asset/share units, scaled by 1e27. A caller-supplied slippage limit."},"complianceVersion":{"type":"string","enum":["v1","v2"]},"riskPreset":{"type":"string","enum":["safe","standard","max_risk"],"default":"max_risk","description":"Risk policy enforced on the resulting position. Defaults to the frontend selection, max_risk."},"mode":{"type":"string","enum":["target"],"default":"target"},"targetDebtAssets":{"type":"string","pattern":"^\\d{1,78}$","description":"Desired total Morpho debt in raw loan-token units."},"targetCollateralShares":{"type":"string","pattern":"^\\d{1,78}$","description":"Desired total collateral in raw vault-share units."}},"required":["chainId","marketId","sender","maxAssetInput","targetDebtAssets","targetCollateralShares"],"additionalProperties":false},{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Position owner and signer of every returned transaction. Relayed execution is not supported."},"maxAssetInput":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum loan tokens that the bundle may pull from the wallet."},"maxShareInput":{"type":"string","pattern":"^\\d{1,78}$","default":"0","description":"Maximum existing vault shares that the bundle may pull from the wallet."},"slippageBps":{"type":"integer","minimum":0,"maximum":9999,"description":"Share-price slippage in basis points (50 = 0.5%). Supply this or the raw price limit, never both."},"maxSharePriceE27":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum mint price in raw asset/share units, scaled by 1e27. A caller-supplied slippage limit."},"complianceVersion":{"type":"string","enum":["v1","v2"]},"riskPreset":{"type":"string","enum":["safe","standard","max_risk"],"default":"max_risk","description":"Risk policy enforced on the resulting position. Defaults to the frontend selection, max_risk."},"mode":{"type":"string","enum":["delta"]},"delta":{"type":"object","properties":{"borrow":{"type":"string","pattern":"^\\d{1,78}$","default":"0"},"supplyCollateral":{"type":"string","pattern":"^\\d{1,78}$","default":"0"},"repay":{"type":"string","enum":["0"],"default":"0"},"flashRepay":{"type":"string","enum":["0"],"default":"0"},"withdrawCollateral":{"type":"string","enum":["0"],"default":"0"}},"additionalProperties":false,"description":"Additional raw loan assets to borrow and collateral shares to supply, matching NestBundler Delta mode. Reductions use unloop."}},"required":["chainId","marketId","sender","maxAssetInput","mode","delta"],"additionalProperties":false},{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Position owner and signer of every returned transaction. Relayed execution is not supported."},"maxAssetInput":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum loan tokens that the bundle may pull from the wallet."},"maxShareInput":{"type":"string","pattern":"^\\d{1,78}$","default":"0","description":"Maximum existing vault shares that the bundle may pull from the wallet."},"slippageBps":{"type":"integer","minimum":0,"maximum":9999,"description":"Share-price slippage in basis points (50 = 0.5%). Supply this or the raw price limit, never both."},"maxSharePriceE27":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum mint price in raw asset/share units, scaled by 1e27. A caller-supplied slippage limit."},"complianceVersion":{"type":"string","enum":["v1","v2"]},"riskPreset":{"type":"string","enum":["safe","standard","max_risk"],"default":"max_risk","description":"Risk policy enforced on the resulting position. Defaults to the frontend selection, max_risk."},"mode":{"type":"string","enum":["leverage"],"default":"leverage"},"leverageBps":{"type":"integer","minimum":10000,"maximum":4294967295,"description":"Target total leverage using the vault valuation (20000 = 2x). Uses maxAssetInput/maxShareInput as funding budgets and includes the existing position and mint fees. Sizes at or below the target, reducing borrowing when the oracle-valued leverage cap is limiting. Both valuations must pass the shared risk cap. Cannot reduce debt."}},"required":["chainId","marketId","sender","maxAssetInput","leverageBps"],"additionalProperties":false}]},"LoopBuildRequest":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Position owner and signer of every returned transaction. Relayed execution is not supported."},"maxAssetInput":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum loan tokens that the bundle may pull from the wallet."},"maxShareInput":{"type":"string","pattern":"^\\d{1,78}$","default":"0","description":"Maximum existing vault shares that the bundle may pull from the wallet."},"slippageBps":{"type":"integer","minimum":0,"maximum":9999,"description":"Share-price slippage in basis points (50 = 0.5%). Supply this or the raw price limit, never both."},"maxSharePriceE27":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum mint price in raw asset/share units, scaled by 1e27. A caller-supplied slippage limit."},"complianceVersion":{"type":"string","enum":["v1","v2"]},"riskPreset":{"type":"string","enum":["safe","standard","max_risk"],"default":"max_risk","description":"Risk policy enforced on the resulting position. Defaults to the frontend selection, max_risk."},"mode":{"type":"string","enum":["target"],"default":"target"},"targetDebtAssets":{"type":"string","pattern":"^\\d{1,78}$","description":"Desired total Morpho debt in raw loan-token units."},"targetCollateralShares":{"type":"string","pattern":"^\\d{1,78}$","description":"Desired total collateral in raw vault-share units."},"skipSimulation":{"type":"boolean","default":false}},"required":["chainId","marketId","sender","maxAssetInput","targetDebtAssets","targetCollateralShares"],"additionalProperties":false},{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Position owner and signer of every returned transaction. Relayed execution is not supported."},"maxAssetInput":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum loan tokens that the bundle may pull from the wallet."},"maxShareInput":{"type":"string","pattern":"^\\d{1,78}$","default":"0","description":"Maximum existing vault shares that the bundle may pull from the wallet."},"slippageBps":{"type":"integer","minimum":0,"maximum":9999,"description":"Share-price slippage in basis points (50 = 0.5%). Supply this or the raw price limit, never both."},"maxSharePriceE27":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum mint price in raw asset/share units, scaled by 1e27. A caller-supplied slippage limit."},"complianceVersion":{"type":"string","enum":["v1","v2"]},"riskPreset":{"type":"string","enum":["safe","standard","max_risk"],"default":"max_risk","description":"Risk policy enforced on the resulting position. Defaults to the frontend selection, max_risk."},"mode":{"type":"string","enum":["delta"]},"delta":{"type":"object","properties":{"borrow":{"type":"string","pattern":"^\\d{1,78}$","default":"0"},"supplyCollateral":{"type":"string","pattern":"^\\d{1,78}$","default":"0"},"repay":{"type":"string","enum":["0"],"default":"0"},"flashRepay":{"type":"string","enum":["0"],"default":"0"},"withdrawCollateral":{"type":"string","enum":["0"],"default":"0"}},"additionalProperties":false,"description":"Additional raw loan assets to borrow and collateral shares to supply, matching NestBundler Delta mode. Reductions use unloop."},"skipSimulation":{"type":"boolean","default":false}},"required":["chainId","marketId","sender","maxAssetInput","mode","delta"],"additionalProperties":false},{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Position owner and signer of every returned transaction. Relayed execution is not supported."},"maxAssetInput":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum loan tokens that the bundle may pull from the wallet."},"maxShareInput":{"type":"string","pattern":"^\\d{1,78}$","default":"0","description":"Maximum existing vault shares that the bundle may pull from the wallet."},"slippageBps":{"type":"integer","minimum":0,"maximum":9999,"description":"Share-price slippage in basis points (50 = 0.5%). Supply this or the raw price limit, never both."},"maxSharePriceE27":{"type":"string","pattern":"^\\d{1,78}$","description":"Maximum mint price in raw asset/share units, scaled by 1e27. A caller-supplied slippage limit."},"complianceVersion":{"type":"string","enum":["v1","v2"]},"riskPreset":{"type":"string","enum":["safe","standard","max_risk"],"default":"max_risk","description":"Risk policy enforced on the resulting position. Defaults to the frontend selection, max_risk."},"mode":{"type":"string","enum":["leverage"],"default":"leverage"},"leverageBps":{"type":"integer","minimum":10000,"maximum":4294967295,"description":"Target total leverage using the vault valuation (20000 = 2x). Uses maxAssetInput/maxShareInput as funding budgets and includes the existing position and mint fees. Sizes at or below the target, reducing borrowing when the oracle-valued leverage cap is limiting. Both valuations must pass the shared risk cap. Cannot reduce debt."},"skipSimulation":{"type":"boolean","default":false}},"required":["chainId","marketId","sender","maxAssetInput","leverageBps"],"additionalProperties":false}]},"UnloopRequest":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Position owner and signer of every returned transaction. Relayed execution is not supported."},"leverageBps":{"type":"integer","minimum":0,"maximum":4294967295,"description":"0 fully exits; 10000 leaves an unborrowed collateral position (1x). Must be below current leverage."},"slippageBps":{"type":"integer","minimum":0,"maximum":9999,"description":"Share-price slippage in basis points (50 = 0.5%). Supply this or the raw price limit, never both."},"minSharePriceE27":{"type":"string","pattern":"^\\d{1,78}$","description":"Minimum accepted redemption price in raw asset/share units, scaled by 1e27."},"deadline":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1793077514,"description":"Unix seconds; latest keeper execution time. Omit for now + 17 days; a future timestamp overrides the default."}},"required":["chainId","marketId","sender","leverageBps"],"additionalProperties":false},"AutoClaimTransaction":{"type":"object","properties":{"label":{"type":"string","enum":["setOperator"]},"description":{"type":"string"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"value":{"type":"string","enum":["0"]}},"required":["label","description","to","data","value"]},"BuildAutoClaimTxRequestBody":{"allOf":[{"$ref":"#/components/schemas/AutoClaimRequestBody"},{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the redeem operator should be approved for the user.","example":true},"skipSimulation":{"type":"boolean","default":false,"description":"Skip the setOperator transaction simulation preflight.","example":false}},"required":["enabled"]}]},"AutoClaimRequestBody":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"EVM chain ID. Must be one of the supported chains (Plume=98866, Ethereum=1, Base=8453, BSC=56, Plasma=9745, Avalanche=43114, Arc=5042, Morph=2818).","example":98866},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"User/controller address whose redeem operator approval is being managed.","example":"0x00000000000000000000000000000000000000ab"}},"required":["chainId","user"]},"AutoClaimStatusRequestBody":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"EVM chain ID. Must be one of the supported chains (Plume=98866, Ethereum=1, Base=8453, BSC=56, Plasma=9745, Avalanche=43114, Arc=5042, Morph=2818).","example":98866},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"User/controller address whose redeem operator approval is being managed.","example":"0x00000000000000000000000000000000000000ab"}},"required":["chainId","user"]}},"parameters":{}},"paths":{"/vaults/{slug}/mint/quote":{"post":{"tags":["vaults"],"summary":"Quote the share amount for a deposit into a Nest vault.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintRequestBody"}}}},"responses":{"200":{"description":"Quote computed successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"complianceVersion":{"type":"string","enum":["v1","v2"]},"slug":{"type":"string"},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"depositAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"depositAmount":{"type":"string"},"depositDecimals":{"type":"number"},"shareAmount":{"type":"string"},"shareDecimals":{"type":"number"},"rate":{"type":"string"},"rateDecimals":{"type":"number"},"feeAmount":{"type":"string"},"fees":{"type":"object","properties":{"ratePpm":{"type":"number"},"flatAmount":{"type":"string"},"maxRatePpm":{"type":"number"},"maxFlatAmount":{"type":"string"}},"required":["ratePpm","flatAmount","maxRatePpm","maxFlatAmount"]},"steps":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["approve","deposit"]},"description":{"type":"string"}},"required":["label","description"]}},"bridge":{"$ref":"#/components/schemas/CrossChainMintQuote"}},"required":["complianceVersion","slug","shareTokenAddress","depositAsset","depositAmount","depositDecimals","shareAmount","shareDecimals","rate","rateDecimals","feeAmount","fees","steps"]}},"required":["data"]}}}},"400":{"description":"Invalid request, unsupported vault/asset, or deposit too small to mint any shares.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"409":{"description":"Deposits are currently disabled for this vault.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/mint/build-tx":{"post":{"tags":["vaults"],"summary":"Build the approval + deposit transactions for a Nest vault mint.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildMintTxRequestBody"}}}},"responses":{"200":{"description":"Transaction bundle built successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"chainId":{"type":"number"},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"depositAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"depositAmount":{"type":"string"},"depositDecimals":{"type":"number"},"shareAmount":{"type":"string"},"shareDecimals":{"type":"number"},"feeAmount":{"type":"string"},"fees":{"type":"object","properties":{"ratePpm":{"type":"number"},"flatAmount":{"type":"string"},"maxRatePpm":{"type":"number"},"maxFlatAmount":{"type":"string"}},"required":["ratePpm","flatAmount","maxRatePpm","maxFlatAmount"]},"complianceVersion":{"type":"string","enum":["v1","v2"],"description":"Compliance stack the returned calldata targets.","example":"v1"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/MintTransaction"}},"bridge":{"$ref":"#/components/schemas/CrossChainMintQuote"}},"required":["slug","chainId","shareTokenAddress","depositAsset","depositAmount","depositDecimals","shareAmount","shareDecimals","feeAmount","fees","complianceVersion","transactions"]}},"required":["data"]}}}},"400":{"description":"Invalid request, unsupported vault/asset, insufficient deposit balance, caller non-compliant, or deposit too small.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"409":{"description":"Deposits are currently disabled for this vault.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"429":{"description":"Compliance requests are rate limited.","headers":{"Retry-After":{"schema":{"type":"string","description":"Delay or HTTP date before retrying."},"required":false,"description":"Delay or HTTP date before retrying."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC, Predicate service, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/redeem/quote":{"post":{"tags":["vaults"],"summary":"Quote the redemption asset amount for a vault share redemption.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemRequestBody"}}}},"responses":{"200":{"description":"Redemption quote computed successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"chainId":{"type":"number"},"redemptionType":{"type":"string","enum":["nest","atomicQueue"]},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"shareAmount":{"type":"string"},"shareDecimals":{"type":"number"},"redemptionAmount":{"type":"string"},"redemptionDecimals":{"type":"number"},"feeAmount":{"type":"string"},"fees":{"type":"object","properties":{"ratePpm":{"type":"number"},"flatAmount":{"type":"string"},"maxRatePpm":{"type":"number"},"maxFlatAmount":{"type":"string"}},"required":["ratePpm","flatAmount","maxRatePpm","maxFlatAmount"]},"minPrice":{"type":"string"},"deadline":{"type":"string"},"rate":{"type":"string"},"rateDecimals":{"type":"number"},"steps":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["approve","requestRedeem","updateAtomicRequest"]},"description":{"type":"string"}},"required":["label","description"]}}},"required":["slug","chainId","redemptionType","shareTokenAddress","redemptionAsset","shareAmount","shareDecimals","redemptionAmount","redemptionDecimals","feeAmount","fees","steps"]}},"required":["data"]}}}},"400":{"description":"Invalid request, unsupported vault/asset, or share amount too small.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/redeem/build-tx":{"post":{"tags":["vaults"],"summary":"Build transactions to submit a vault redemption request.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildRedeemTxRequestBody"}}}},"responses":{"200":{"description":"Transaction bundle built successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"chainId":{"type":"number"},"redemptionType":{"type":"string","enum":["nest","atomicQueue"]},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"shareAmount":{"type":"string"},"shareDecimals":{"type":"number"},"redemptionAmount":{"type":"string"},"redemptionDecimals":{"type":"number"},"feeAmount":{"type":"string"},"fees":{"type":"object","properties":{"ratePpm":{"type":"number"},"flatAmount":{"type":"string"},"maxRatePpm":{"type":"number"},"maxFlatAmount":{"type":"string"}},"required":["ratePpm","flatAmount","maxRatePpm","maxFlatAmount"]},"minPrice":{"type":"string"},"deadline":{"type":"string"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/RedeemTransaction"}}},"required":["slug","chainId","redemptionType","shareTokenAddress","redemptionAsset","shareAmount","shareDecimals","redemptionAmount","redemptionDecimals","feeAmount","fees","transactions"]}},"required":["data"]}}}},"400":{"description":"Invalid request, unsupported vault/asset, Arc redemption capability not yet public, insufficient vault-share balance, share amount too small, or failed simulation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"429":{"description":"Compliance requests are rate limited.","headers":{"Retry-After":{"schema":{"type":"string"},"required":false}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/update-redeem/pending":{"post":{"tags":["vaults"],"summary":"Read current pending redemption state for a user.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingRedeemRequestBody"}}}},"responses":{"200":{"description":"Pending redemption state read successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","properties":{"redemptionType":{"type":"string","enum":["nest"]},"slug":{"type":"string"},"chainId":{"type":"number"},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nestVaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"pendingShares":{"type":"string"},"shareDecimals":{"type":"number"}},"required":["redemptionType","slug","chainId","shareTokenAddress","redemptionAsset","nestVaultAddress","user","pendingShares","shareDecimals"]},{"type":"object","properties":{"redemptionType":{"type":"string","enum":["atomicQueue"]},"slug":{"type":"string"},"chainId":{"type":"number"},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"atomicQueueAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"pendingShares":{"type":"string"},"shareDecimals":{"type":"number"},"deadline":{"type":"string"},"atomicPrice":{"type":"string"},"offerAmount":{"type":"string"},"inSolve":{"type":"boolean"}},"required":["redemptionType","slug","chainId","shareTokenAddress","redemptionAsset","atomicQueueAddress","user","pendingShares","shareDecimals","deadline","atomicPrice","offerAmount","inSolve"]}]}},"required":["data"]}}}},"400":{"description":"Invalid request or unsupported vault/asset.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/update-redeem/build-tx":{"post":{"tags":["vaults"],"summary":"Build a transaction to reduce an existing pending redemption request.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildUpdateRedeemTxRequestBody"}}}},"responses":{"200":{"description":"Transaction built successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"chainId":{"type":"number"},"redemptionType":{"type":"string","enum":["nest","atomicQueue"]},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"previousPendingShares":{"type":"string"},"newShareAmount":{"type":"string"},"shareDecimals":{"type":"number"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/UpdateRedeemTransaction"}}},"required":["slug","chainId","redemptionType","shareTokenAddress","redemptionAsset","user","previousPendingShares","newShareAmount","shareDecimals","transactions"]}},"required":["data"]}}}},"400":{"description":"Invalid request, no pending redemption, non-reduction update, failed fee preflight, or failed simulation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/claim/pending":{"post":{"tags":["vaults"],"summary":"Read current claimable redemption shares for a user.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRequestBody"}}}},"responses":{"200":{"description":"Claimable redemption shares read successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"redemptionType":{"type":"string","enum":["nest"]},"slug":{"type":"string"},"chainId":{"type":"number"},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nestVaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"claimableShares":{"type":"string"},"shareDecimals":{"type":"number"}},"required":["redemptionType","slug","chainId","shareTokenAddress","redemptionAsset","nestVaultAddress","user","claimableShares","shareDecimals"]}},"required":["data"]}}}},"400":{"description":"Invalid request or unsupported vault/asset.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/claim/build-tx":{"post":{"tags":["vaults"],"summary":"Build a transaction to claim currently redeemable NestVault shares.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildClaimTxRequestBody"}}}},"responses":{"200":{"description":"Claim transaction built successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"redemptionType":{"type":"string","enum":["nest"]},"slug":{"type":"string"},"chainId":{"type":"number"},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nestVaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"claimableShares":{"type":"string"},"shareDecimals":{"type":"number"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/ClaimTransaction"}}},"required":["redemptionType","slug","chainId","shareTokenAddress","redemptionAsset","nestVaultAddress","user","claimableShares","shareDecimals","transactions"]}},"required":["data"]}}}},"400":{"description":"Invalid request, unsupported vault/asset, no claimable shares, or failed simulation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/instant-liquidity":{"get":{"tags":["vaults"],"summary":"Read available instant redemption liquidity for all NestVault assets on a chain.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"EVM chain ID. Defaults to Plume mainnet when omitted.","example":98866},"required":false,"description":"EVM chain ID. Defaults to Plume mainnet when omitted.","name":"chainId","in":"query"}],"responses":{"200":{"description":"Instant redemption liquidity read successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"redemptionType":{"type":"string","enum":["nest"]},"slug":{"type":"string"},"chainId":{"type":"number"},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAssets":{"type":"array","items":{"type":"object","properties":{"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nestVaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"liquidity":{"type":"string"},"fees":{"type":"object","properties":{"ratePpm":{"type":"number"},"flatAmount":{"type":"string"},"maxRatePpm":{"type":"number"},"maxFlatAmount":{"type":"string"}},"required":["ratePpm","flatAmount","maxRatePpm","maxFlatAmount"]},"redemptionDecimals":{"type":"number"}},"required":["redemptionAsset","nestVaultAddress","liquidity","fees","redemptionDecimals"]}}},"required":["redemptionType","slug","chainId","shareTokenAddress","redemptionAssets"]}},"required":["data"]}}}},"400":{"description":"Invalid request or unsupported vault/chain.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC or indexer failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/instant-redeem/quote":{"post":{"tags":["vaults"],"summary":"Quote the asset amount for an instant NestVault redemption.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantRedeemRequestBody"}}}},"responses":{"200":{"description":"Instant redemption quote computed successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"redemptionType":{"type":"string","enum":["nest"]},"slug":{"type":"string"},"chainId":{"type":"number"},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nestVaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"shareAmount":{"type":"string"},"shareDecimals":{"type":"number"},"redemptionAmount":{"type":"string"},"redemptionDecimals":{"type":"number"},"feeAmount":{"type":"string"},"fees":{"type":"object","properties":{"ratePpm":{"type":"number"},"flatAmount":{"type":"string"},"maxRatePpm":{"type":"number"},"maxFlatAmount":{"type":"string"}},"required":["ratePpm","flatAmount","maxRatePpm","maxFlatAmount"]},"steps":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["approve","instantRedeem"]},"description":{"type":"string"}},"required":["label","description"]}}},"required":["redemptionType","slug","chainId","shareTokenAddress","redemptionAsset","nestVaultAddress","shareAmount","shareDecimals","redemptionAmount","redemptionDecimals","feeAmount","fees","steps"]}},"required":["data"]}}}},"400":{"description":"Invalid request, unsupported vault/asset, or share amount too small.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"},"code":{"type":"string","enum":["INSUFFICIENT_LIQUIDITY"]}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/instant-redeem/liquidity":{"post":{"tags":["vaults"],"summary":"Read available instant redemption liquidity for a NestVault asset.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantRedeemLiquidityRequestBody"}}}},"responses":{"200":{"description":"Instant redemption liquidity read successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"redemptionType":{"type":"string","enum":["nest"]},"slug":{"type":"string"},"chainId":{"type":"number"},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nestVaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"liquidity":{"type":"string"},"fees":{"type":"object","properties":{"ratePpm":{"type":"number"},"flatAmount":{"type":"string"},"maxRatePpm":{"type":"number"},"maxFlatAmount":{"type":"string"}},"required":["ratePpm","flatAmount","maxRatePpm","maxFlatAmount"]},"redemptionDecimals":{"type":"number"}},"required":["redemptionType","slug","chainId","shareTokenAddress","redemptionAsset","nestVaultAddress","liquidity","fees","redemptionDecimals"]}},"required":["data"]}}}},"400":{"description":"Invalid request or unsupported vault/asset.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC or indexer failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/instant-redeem/build-tx":{"post":{"tags":["vaults"],"summary":"Build transactions to instant-redeem NestVault shares.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildInstantRedeemTxRequestBody"}}}},"responses":{"200":{"description":"Instant redemption transaction bundle built successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"redemptionType":{"type":"string","enum":["nest"]},"slug":{"type":"string"},"chainId":{"type":"number"},"shareTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"redemptionAsset":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nestVaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"receiver":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"shareAmount":{"type":"string"},"shareDecimals":{"type":"number"},"redemptionAmount":{"type":"string"},"redemptionDecimals":{"type":"number"},"feeAmount":{"type":"string"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/InstantRedeemTransaction"}}},"required":["redemptionType","slug","chainId","shareTokenAddress","redemptionAsset","nestVaultAddress","user","receiver","shareAmount","shareDecimals","redemptionAmount","redemptionDecimals","feeAmount","transactions"]}},"required":["data"]}}}},"400":{"description":"Invalid request, unsupported vault/asset, Arc redemption capability not yet public, insufficient vault-share balance, share amount too small, or failed simulation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"},"code":{"type":"string","enum":["INSUFFICIENT_LIQUIDITY"]}},"required":["error"]}}}},"429":{"description":"Compliance requests are rate limited.","headers":{"Retry-After":{"schema":{"type":"string"},"required":false}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/loop/quote":{"post":{"tags":["leverage"],"summary":"Derive an increase-only Morpho position bundle without fetching a proof.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoopRequest"}}}},"responses":{"200":{"description":"Current contract-derived loop amounts; not a guarantee of execution.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"chainId":{"type":"number"},"marketId":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"blockNumber":{"type":"string"},"vaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"loanToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"shareToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"mode":{"type":"string","enum":["target","delta","leverage"]},"leverageBps":{"type":"number","description":"Single requested vault-valued multiplier, present in leverage mode. See risk.vaultLeverageBps for the rounded result."},"complianceVersion":{"type":"string","enum":["v1","v2"]},"bundlerAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"adapterAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"targetDebtAssets":{"type":"string"},"targetCollateralShares":{"type":"string"},"borrowAssets":{"type":"string"},"mintShares":{"type":"string"},"walletAssetInput":{"type":"string"},"walletShareInput":{"type":"string"},"maxSharePriceE27":{"type":"string"},"risk":{"type":"object","properties":{"preset":{"type":"string","enum":["safe","standard","max_risk"]},"maxLeverageBps":{"type":"integer","description":"Shared leverage cap for both valuations."},"oracleLeverageBps":{"type":"string","nullable":true,"description":"Resulting leverage using the Morpho oracle valuation. Null when oracle-valued equity is nonpositive."},"vaultLeverageBps":{"type":"string","nullable":true,"description":"Resulting leverage using the vault valuation. Null when vault-valued equity is nonpositive."}},"required":["preset","maxLeverageBps","oracleLeverageBps","vaultLeverageBps"]}},"required":["slug","chainId","marketId","sender","blockNumber","vaultAddress","loanToken","shareToken","mode","complianceVersion","bundlerAddress","adapterAddress","targetDebtAssets","targetCollateralShares","borrowAssets","mintShares","walletAssetInput","walletShareInput","maxSharePriceE27","risk"]}},"required":["data"]}}}},"400":{"description":"Invalid request, ineligible position, compliance rejection, or failed simulation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"409":{"description":"Leverage deployment unavailable, configuration mismatch, or proof needs rebuilding.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"429":{"description":"Compliance rate limited.","headers":{"Retry-After":{"schema":{"type":"string"},"required":false}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"RPC or service failure.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/loop/build-tx":{"post":{"tags":["leverage"],"summary":"Build ordered authorizations, approvals, and a wallet-executed Bundler3 loop.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoopBuildRequest"}}}},"responses":{"200":{"description":"Unsigned transactions, simulated by default. Rebuild after approvals if the proof is near expiry.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"chainId":{"type":"number"},"marketId":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"blockNumber":{"type":"string"},"vaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"loanToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"shareToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"mode":{"type":"string","enum":["target","delta","leverage"]},"leverageBps":{"type":"number","description":"Single requested vault-valued multiplier, present in leverage mode. See risk.vaultLeverageBps for the rounded result."},"complianceVersion":{"type":"string","enum":["v1","v2"]},"bundlerAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"adapterAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"targetDebtAssets":{"type":"string"},"targetCollateralShares":{"type":"string"},"borrowAssets":{"type":"string"},"mintShares":{"type":"string"},"walletAssetInput":{"type":"string"},"walletShareInput":{"type":"string"},"maxSharePriceE27":{"type":"string"},"risk":{"type":"object","properties":{"preset":{"type":"string","enum":["safe","standard","max_risk"]},"maxLeverageBps":{"type":"integer","description":"Shared leverage cap for both valuations."},"oracleLeverageBps":{"type":"string","nullable":true,"description":"Resulting leverage using the Morpho oracle valuation. Null when oracle-valued equity is nonpositive."},"vaultLeverageBps":{"type":"string","nullable":true,"description":"Resulting leverage using the vault valuation. Null when vault-valued equity is nonpositive."}},"required":["preset","maxLeverageBps","oracleLeverageBps","vaultLeverageBps"]},"transactions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["approve","authorizeMorpho","setOperator","loop","requestUnloop"]},"description":{"type":"string"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"value":{"type":"string","enum":["0"]},"complianceExpiresAt":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["label","description","to","data","value"]}}},"required":["slug","chainId","marketId","sender","blockNumber","vaultAddress","loanToken","shareToken","mode","complianceVersion","bundlerAddress","adapterAddress","targetDebtAssets","targetCollateralShares","borrowAssets","mintShares","walletAssetInput","walletShareInput","maxSharePriceE27","risk","transactions"]}},"required":["data"]}}}},"400":{"description":"Invalid request, ineligible position, compliance rejection, or failed simulation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"409":{"description":"Leverage deployment unavailable, configuration mismatch, or proof needs rebuilding.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"429":{"description":"Compliance rate limited.","headers":{"Retry-After":{"schema":{"type":"string"},"required":false}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"RPC or service failure.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/unloop/quote":{"post":{"tags":["leverage"],"summary":"Validate a target-leverage unloop request against the current position.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnloopRequest"}}}},"responses":{"200":{"description":"Request parameters and position snapshot. Execution and proceeds depend on the keeper and liquidity.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"chainId":{"type":"number"},"marketId":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"blockNumber":{"type":"string"},"vaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"loanToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"shareToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"unlooperAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"adapterAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"leverageBps":{"type":"number"},"minSharePriceE27":{"type":"string"},"deadline":{"type":"number"},"currentCollateralShares":{"type":"string"},"currentBorrowShares":{"type":"string"},"execution":{"type":"string","enum":["keeper"]}},"required":["slug","chainId","marketId","sender","blockNumber","vaultAddress","loanToken","shareToken","unlooperAddress","adapterAddress","leverageBps","minSharePriceE27","deadline","currentCollateralShares","currentBorrowShares","execution"]}},"required":["data"]}}}},"400":{"description":"Invalid request, ineligible position, compliance rejection, or failed simulation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"409":{"description":"Leverage deployment unavailable, configuration mismatch, or proof needs rebuilding.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"429":{"description":"Compliance rate limited.","headers":{"Retry-After":{"schema":{"type":"string"},"required":false}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"RPC or service failure.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/vaults/{slug}/unloop/build-tx":{"post":{"tags":["leverage"],"summary":"Build authorizations and an async unloop request; this does not execute the exit.","parameters":[{"schema":{"type":"string","minLength":1,"example":"nest-wisdom-vault"},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Position owner and signer of every returned transaction. Relayed execution is not supported."},"leverageBps":{"type":"integer","minimum":0,"maximum":4294967295,"description":"0 fully exits; 10000 leaves an unborrowed collateral position (1x). Must be below current leverage."},"slippageBps":{"type":"integer","minimum":0,"maximum":9999,"description":"Share-price slippage in basis points (50 = 0.5%). Supply this or the raw price limit, never both."},"minSharePriceE27":{"type":"string","pattern":"^\\d{1,78}$","description":"Minimum accepted redemption price in raw asset/share units, scaled by 1e27."},"deadline":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1793077514,"description":"Unix seconds; latest keeper execution time. Omit for now + 17 days; a future timestamp overrides the default."},"skipSimulation":{"type":"boolean","default":false}},"required":["chainId","marketId","sender","leverageBps"],"additionalProperties":false}}}},"responses":{"200":{"description":"Unsigned request transactions. Keeper settlement is a later operation.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"chainId":{"type":"number"},"marketId":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"blockNumber":{"type":"string"},"vaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"loanToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"shareToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"unlooperAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"adapterAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"leverageBps":{"type":"number"},"minSharePriceE27":{"type":"string"},"deadline":{"type":"number"},"currentCollateralShares":{"type":"string"},"currentBorrowShares":{"type":"string"},"execution":{"type":"string","enum":["keeper"]},"transactions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["approve","authorizeMorpho","setOperator","loop","requestUnloop"]},"description":{"type":"string"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"value":{"type":"string","enum":["0"]},"complianceExpiresAt":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["label","description","to","data","value"]}}},"required":["slug","chainId","marketId","sender","blockNumber","vaultAddress","loanToken","shareToken","unlooperAddress","adapterAddress","leverageBps","minSharePriceE27","deadline","currentCollateralShares","currentBorrowShares","execution","transactions"]}},"required":["data"]}}}},"400":{"description":"Invalid request, ineligible position, compliance rejection, or failed simulation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"409":{"description":"Leverage deployment unavailable, configuration mismatch, or proof needs rebuilding.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"429":{"description":"Compliance rate limited.","headers":{"Retry-After":{"schema":{"type":"string"},"required":false}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"RPC or service failure.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/auto-claim/build-tx":{"post":{"tags":["auto-claim"],"summary":"Build a transaction to enable or disable the redeem operator.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildAutoClaimTxRequestBody"}}}},"responses":{"200":{"description":"Transaction built successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chainId":{"type":"number"},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"operatorRegistryAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"operatorAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"enabled":{"type":"boolean"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/AutoClaimTransaction"}}},"required":["chainId","user","operatorRegistryAddress","operatorAddress","enabled","transactions"]}},"required":["data"]}}}},"400":{"description":"Invalid request, unsupported chain, or failed simulation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}},"/auto-claim/status":{"post":{"tags":["auto-claim"],"summary":"Read whether the redeem operator is approved for a user.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoClaimStatusRequestBody"}}}},"responses":{"200":{"description":"Auto-claim status read successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chainId":{"type":"number"},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"operatorRegistryAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"operatorAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"enabled":{"type":"boolean"}},"required":["chainId","user","operatorRegistryAddress","operatorAddress","enabled"]}},"required":["data"]}}}},"400":{"description":"Invalid request or unsupported chain.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}},"500":{"description":"Internal error (RPC failure, etc.).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request"}},"required":["error"]}}}}}}}}}