To set up a trustline, make sure that a user instance is loaded into the library.
Trustlines consist of bi-directional credit agreements. That means, that they have to be accepted by both parties. The first step to establish a trustline is therefore to create an initial request or proposal to the counterparty.
The initiator creates a request where he is willing to lend a maximal denomination of
100 to the user with the address
counterpartyAddress in the currency network with the address
He also proposes that he is willing to owe a maximal denomination of
200 to the counterparty.
In the next step the counterparty has to accept the request. Note that in the example below the loaded user is the counterparty of step 1.
The counterparty of step 1 first fetches all trustline requests in the currency network. The
prepareAccept function is then called where the attributes
received have to be from the point of view of the caller. So in our case the counterparty or receiver of the initial request.
NOTE: All numerical values have to be provided in their largest unit. For example, if the currency network has two decimals, the values have to be in a format like