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.
safe
#
Create instance of type A user of type safe
is based on a Gnosis Safe contract. The Gnosis Safe is a smart contract
that acts as your identity on chain. You control it with your private key and we make a use of meta-transactions to pay
for the gas costs of your transactions.
ethers
#
Create instance of type Note that a user of type ethers
can not
use meta-transactions.
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.