Skip to main content
POST
Set Loan Approvals
Builds the next transaction that switches approve-only loans on or off, and confirms it on a second call. Trusset never signs: the market admin signs the calldata this route returns. Switching on takes up to two signatures:
  1. CREATE_APPROVALS builds the market’s approvals contract. The answer carries remaining: 1.
  2. Call again with enabled: true for SWITCH_ON, which names the approvals contract on the market.
Switching off is one signature, SWITCH_OFF. If approve-only loans were only requested at deployment and never switched on, enabled: false clears the request without a transaction. The answer is then action: NONE with cleared: true.

Who can call

The market admin, the holder of DEFAULT_ADMIN_ROLE.

Path Parameters

string
required
The market’s record ID on your instance.

Body Parameters

Send exactly one of enabled or txHash.
boolean
true to switch approve-only loans on, false to switch them off.
string
The wallet that will sign.
string
Hash of the transaction you broadcast for the step this route built. Send it to confirm the step.

Response Fields

object

Error Codes