Modeling trust lines

I have a use case that has a need for 'trust lines', similar to those that
can be added in the ripple system

e.g. Alice trusts Bob for 100 bits

Would be the statement I would like to model.

The terms needed:
source
amount
currency
destination
description / context (optional?)

I already have a very similar data structure in web credits namely the
"Credit" class that amounts to an IOU between participants.

Does anyone have any ideas on a good way to model trust lines?  My current
idea would just be to reuse the web credits fields with a new type -- (name
= TrustLine?)

This leads to the question, of whether to make TrustLine a subclass of
Credit, a sibling class, or to create some kind of parent class for both.
I'll note that the web payments work already has a similar concept, namely
"Transfer" e.g.

https://web-payments.org/specs/source/web-payments/

I'd probably like to turn this around in the next days so just wanted to
ask the group if they had any thoughts or experiences with this workflow
that they might like to share!

EXAMPLE 1

--------------------------------- Step #1 -----------------------------------

*** Agent creates a Transaction object

{
   "type": "Transaction"
   "transfer":
   {
      "type": "Transfer",
      "amount": "7.50",
      "currency": "USD",
      "source": "https://bluebank.com/people/john/accounts/party-funds",
      "destination": "https://redbank.com/people/jane/accounts/hosting",
      "comment": "Chipping in for the Pizza Party tomorrow."
   }
}

Received on Wednesday, 17 February 2016 19:31:42 UTC