Skip to main content

MidnightMakeResponse

Everything the frontend needs to sign and publish a maker offer (step 1 of the make flow). actions is null — the publish transaction is produced by /finalize after signing.

typedData object

EIP-712 typed-data to sign with wallet.signTypedData (bigints serialized as strings — sign the response as-is).

property name*any

EIP-712 typed-data to sign with wallet.signTypedData (bigints serialized as strings — sign the response as-is).

inputs object

Deterministic offer inputs. Returned verbatim by GET /v1/actions/midnight/make; POST them back unchanged to /v1/actions/midnight/finalize alongside the signature so the worker rebuilds the identical offer tree. Any tampering fails on-chain ratification.

chainIdstring
Example: 8453
lenderstring

MORPHO_MIDNIGHT_<id> lender key.

Example: MORPHO_MIDNIGHT_0xABC…
buyboolean

true = maker BUYS units (a lend offer / bid); false = maker SELLS units (a borrow offer / ask).

tickstring

Order-book tick the APR snapped to.

startstring
Example: 0
expirystring

Offer expiry, unix seconds.

maxAssetsstring

Maker-side size in loan-token units.

makerstring

Maker (offer owner) address.

authorization object

One-time setIsAuthorized(ecrecoverRatifier, true) transaction on the Midnight core. Send FIRST, only if the maker has not authorized the ratifier yet (read isAuthorized on-chain).

tostring
datastring
valuestring
ratifierstring
aprPctSnappednumber

The exact APR (percent) after tick-snapping — what the offer will actually quote once posted.

Example: 3.49
maturitynumber

Market maturity, unix seconds.

MidnightMakeResponse
{
"typedData": {},
"inputs": {
"chainId": "8453",
"lender": "MORPHO_MIDNIGHT_0xABC…",
"buy": true,
"tick": "string",
"start": "0",
"expiry": "string",
"maxAssets": "string",
"maker": "string"
},
"authorization": {
"to": "string",
"data": "string",
"value": "string",
"ratifier": "string"
},
"aprPctSnapped": 3.49,
"maturity": 0
}