Create user / wallet
To be able to interact with the trustlines protocol a user, i.e. wallet, is needed.
You therefore have to create an instance and load it into the library.
The wallet manages your key pair and is used for cryptographically signing transactions, thus enabling the establishment of trustlines and transfers.
Depending on the initial configuration of the TLNetwork
instance, you can create either a new instance of type ethers
or type identity
.
The former type is based on the wallet object of the ethers.js library, whereas the second type uses an identity contract to enable meta-transactions.
ethers
#
Create instance of type Note that a user of type ethers
can not use meta-transactions.
The user therefore needs some coins (TLC, Test TLC, ... ), depending on the connected relay server and blockchain, before being able to execute a transaction.
identity
#
Create instance of type A user of type identity
makes use of meta-transactions.
Therefore the addresses of the deployed identity factory and implementation contracts have to be set.
An additional step of deploying the identity contract of the newly created user is also necessary.