Version: Next

Class: UserInformation

"UserInformation".UserInformation

The UserInformation class contains methods related to getting trustlines related information of a user.

Hierarchy#

  • UserInformation

Constructors#

constructor#

+ new UserInformation(params: { currencyNetwork: CurrencyNetwork ; provider: TLProvider ; user: User }): UserInformation

Defined in src/UserInformation.ts:30

Parameters:#

NameType
params{ currencyNetwork: CurrencyNetwork ; provider: TLProvider ; user: User }

Returns: UserInformation

Methods#

getAccruedInterests#

getAccruedInterests(networkAddress: string, options?: { decimalsOptions?: DecimalsOptions ; timeWindowOption?: { endTime: number ; startTime: number } }): Promise<UserAccruedInterestsObject>

Defined in src/UserInformation.ts:91

Get all the accrued interests the loaded user has earned and paid out The returned values are positive for earned interests and negative for paid out interests

Parameters:#

NameTypeDefault valueDescription
networkAddressstring-the address of the network
options{ decimalsOptions?: DecimalsOptions ; timeWindowOption?: { endTime: number ; startTime: number } }{}

Returns: Promise<UserAccruedInterestsObject>


getAccruedInterestsOnTrustline#

getAccruedInterestsOnTrustline(networkAddress: string, counterpartyAddress: string, options?: { decimalsOptions?: DecimalsOptions ; timeWindowOption?: { endTime: number ; startTime: number } }): Promise<TrustlineAccruedInterestsObject>

Defined in src/UserInformation.ts:134

Get all the accrued interests the loaded user has earned and paid out on a single trustline The returned values are positive for earned interests and negative for paid out interests

Parameters:#

NameTypeDefault valueDescription
networkAddressstring-the address of the network
counterpartyAddressstring-the address of the counterparty of the trustlines
options{ decimalsOptions?: DecimalsOptions ; timeWindowOption?: { endTime: number ; startTime: number } }{}

Returns: Promise<TrustlineAccruedInterestsObject>


getEarnedMediationFees#

getEarnedMediationFees(networkAddress: string, options?: { decimalsOptions?: DecimalsOptions ; timeWindowOption?: { endTime: number ; startTime: number } }): Promise<EarnedMediationFeesListObject>

Defined in src/UserInformation.ts:49

Get all the mediation fees the loaded user has earned

Parameters:#

NameTypeDefault valueDescription
networkAddressstring-the address of the network for which to get the fees
options{ decimalsOptions?: DecimalsOptions ; timeWindowOption?: { endTime: number ; startTime: number } }{}

Returns: Promise<EarnedMediationFeesListObject>


getTotalTransferredSum#

getTotalTransferredSum(networkAddress: string, senderAddress: string, receiverAddress: string, options?: { decimalsOptions?: DecimalsOptions ; timeWindowOption?: { endTime: number ; startTime: number } }): Promise<TransferredSumObject>

Defined in src/UserInformation.ts:178

Get the sum of all transfer made in time window and network from sender to receiver Does take into account transfer from receiver to sender, or any other transfer The value returned can only be positive

Parameters:#

NameTypeDefault valueDescription
networkAddressstring-the address of the network
senderAddressstring-the address of the sender of transfers
receiverAddressstring-the address of the receiver of transfers
options{ decimalsOptions?: DecimalsOptions ; timeWindowOption?: { endTime: number ; startTime: number } }{}

Returns: Promise<TransferredSumObject>