User
#
All events of userReturns a list of all event logs of a user for currency networks / exchanges / tokens / unweth.
That means all events where the given user address is either from
or to
.
You can filter what type of events you want with contractType
to select the contract
and type
to select the name of the events within the contract.
#
Request#
Example Request#
URL ParametersName | Type | Required | Description |
---|---|---|---|
user | string | YES | Address of user |
type | string | NO | Either TrustlineUpdate , TrustlineUpdateRequest , TrustlineUpdateCancel or Transfer |
contractType | string | NO | Either CurrencyNetwork , Exchange , UnwETH or Token |
fromBlock | int | NO | Start of block range |
The types available for currency networks contracts are: "TrustlineUpdateRequest"
, "TrustlineUpdateCancel"
,
"TrustlineUpdate"
, "BalanceUpdate"
, "Transfer"
, "DebtUpdate"
, and "NetworkFreeze"
.
The types available for exchange contracts are: "LogFill"
, and "LogCancel"
The types available for UnwETH contracts are: "Deposit"
, "Withdrawal"
, "Transfer"
, and "Approval"
The types available for token contracts are: "Transfer"
, and "Approval"
If no contract type or event type are given, the response will have all events of types,
excluding "DebtUpdate"
, "BalanceUpdate"
, and "NetworkFreeze"
#
ResponseFor events from currency networks, they will have the following attributes:
Attribute | Type | Description |
---|---|---|
networkAddress | string | Address of currency network |
blockNumber | string | Number of block |
timestamp | int | UNIX timestamp |
type | string | Either TrustlineUpdate , TrustlineUpdateRequest , TrustlineUpdateCancel or Transfer |
from | string | Address of from user |
to | string | Address of to user |
status | string | sent , pending or confirmed depending on block height |
transactionId | string | Transaction hash |
blockHash | string | Hash of the block containing the event |
logIndex | number | Log index of the event |
Following additional attributes for TrustlineUpdate
and TrustlineUpdateRequest
events:
Attribute | Type | Description |
---|---|---|
given | string | Proposed or accepted amount from -> to |
received | string | Proposed or accepted amount to -> from |
interestRateGiven | string | Proposed or accepted rate of interests from -> to |
interestRateReceived | string | Proposed or accepted rate of interests to -> from |
isFrozen | bool | Proposed or accepted frozen status |
Following additional attributes for Transfer
events:
Attribute | Type | Description |
---|---|---|
amount | string | Transfer amount from -> to |
extraData | string | extraData as specified in the corresponding transfer |
Following additional attributes for DebtUpdate
events:
Attribute | Type | Description |
---|---|---|
debt | string | Debt of from in the view of to , positive if from owes to to and negative otherwise |
#
Example Response#
Balance of userReturns the balance in wei of the given address.
#
Request#
Example Request#
URL ParametersName | Type | Required | Description |
---|---|---|---|
userAddress | string | YES | Address of user |
#
ResponseAttribute | Type | JSON Type | Description |
---|---|---|---|
balance | string | string | Balance of user in wei |
#
Example Response#
Transaction infos for userReturns information that is needed to sign a transaction.
#
Request#
Example Request#
URL ParametersName | Type | Required | Description |
---|---|---|---|
userAddress | string | YES | Address of user |
#
ResponseAttribute | Type | Description |
---|---|---|
gasPrice | string | Gas price |
balance | string | Balance of user in wei |
nonce | int | Nonce needed for creating a transaction |
#
Example Response#
All Trustlines of user in all currency networksReturns a list of trustlines a user has in any currency network.
#
Request#
URL ParametersName | Type | Required | Description |
---|---|---|---|
userAddress | string | YES | Address of user |
#
Example Request#
ResponseAttribute | Type | Description |
---|---|---|
counterParty | string | Address of trustline counterparty |
currencyNetwork | string | Address of currency network |
user | string | Address of trustline user |
balance | string | Balance of trustline from point of view of user |
given | string | Creditline given to counterparty |
received | string | Creditline received by counterparty |
leftGiven | string | given - balance |
leftReceived | string | received + balance |
interestRateGiven | string | Interest Rate given to counterparty |
interestRateReceived | string | Interest Rate received from counterparty |
isFrozen | bool | Whether the trustlines is frozen |
id | string | Identifier of trustline |
#
Example Response#
All debts of userReturns a list of all the debts in all currency networks for the user.
#
Request#
Example Request#
URL ParametersName | Type | Required | Description |
---|---|---|---|
userAddress | string | YES | Address of user |
#
ResponseThe response is a list of objects with the following fields: | Attribute | Type | JSON Type | Description | | --------------- | ------- | --------- | ---------------------------------------------------------- | | currencyNetwork | address | string | address of the currency network of all the following debts | | debts | object | object | list of debts involving the user in the currency network |
Debts is a list of objects with the following fields: | Attribute | Type | JSON Type | Description | | --------------------- | ---------- | -------------- | ------------------------------------------------------------------------------------ | | debtor | address | string | address of the debtor that owes money to the user / towards which user owes money | | value | object | object | value of the debt, positive if user is owed money, negative if it owes money | | maximumClaimableValue | BigInteger | string | the maximum value currently claimable considering the available paths in the network | | claimPath | List | list of string | if it exists, a path to claim the claimable value of the debt in the network |