Yuva DocsBack to Yuva
Local mock / proposed contracts

Obligations

Keep proposal, acceptance, funding and repayment separate.

On this page

Build terms#

Example
const terms = api.loans.terms({
  lender: 'me', borrower: 'eren', amount: 10000,
  due: C.plusMonths(Date.now(), 1), installments: 2
});
// Propose with lender approval, then accept with borrower approval.

Fund and repay#

fundingPayment prepares a stable funding instruction after both approvals. fund executes it. repaymentPayment registers a bounded repayment instruction; repay applies its finalized receipt. The current service is named PrivateObligationService.

Proposed HTTP contracts#

RuleValidation
PartiesMutual relationship and both credit permissions.
FundingSame approved terms and finalized receipt.
RepaymentPositive amount no greater than outstanding principal.
Example
POST /obligations
POST /obligations/{id}/accept
POST /obligations/{id}/repay
# Design examples only. No HTTP handlers are shipped.

Search Yuva Docs

Type to search the documentation.

↑ ↓ to navigate Enter to open · Esc to close