Prepare: Borrow
gage_prepare_borrowPrepare a loan: pledge a token, receive USDG (or the lend asset named by lendAsset), repay a fixed amount of it within the term. Use the prepare object of gage_borrow_quote, without its action. Returns the next unsigned transaction and a review link; never signs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | Yes | To repay, raw units of the loan's asset, above principal | |
| term | Yes | Loan term in seconds, one of the terms gage_capabilities lists | |
| token | Yes | ||
| wallet | Yes | ||
| lendAsset | No | The asset the loan is paid in and repaid in: USDG when omitted, or a lend asset gage_capabilities lists (its token address) | |
| principal | Yes | To borrow, raw units of the loan's asset (USDG: 6 decimals) | |
| collateral | Yes | Tokens to pledge, raw units |