1.0.22 • Published 8 months ago

@unioncredit/data v1.0.22

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Union Data

npm version

A javascript library for fetching data about Union from the graphQL enpoints hosting on The Graph

Usage

yarn add @unioncredit/data

Test

yarn test

Build

yarn build

Documentation

Functions

fetchBorrows(orderBy, orderDirection, where) ⇒ Promise

Get Accounts borrows historical data

Kind: global function
Returns: Promise - { id, account, amount, fee, timestamp }[]

ParamTypeDescription
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc
whereobjectWhere object e.g { account: "0x00" }

fetchAccountBorrows(account, orderBy, orderDirection) ⇒ Promise

Get Account borrows historical data

Kind: global function
Returns: Promise - { id, account, amount, fee, timestamp }[]

ParamTypeDescription
accountstringAccount to get borrow historical data for
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc

fetchDeposits(orderBy, orderDirection) ⇒ Promise

Get AssetManager deposits historical data

Kind: global function
Returns: Promise - { id, token, amount, account, marketsTotalSupply }[]

ParamTypeDescription
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc

fetchMemberApplications(orderBy, orderDirection) ⇒ Promise

Get MemberApplications historical data

Kind: global function
Returns: Promise - { id, staker, applicant, timestamp }[]

ParamTypeDescription
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc

fetchRepays(orderBy, orderDirection, where) ⇒ Promise

Get Accounts repays historical data

Kind: global function
Returns: Promise - { id, account, amount, fee, timestamp }[]

ParamTypeDescription
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc
whereobjectWhere object e.g { account: "0x00" }

fetchAccountRepays(account, orderBy, orderDirection) ⇒ Promise

Get Account repays historical data

Kind: global function
Returns: Promise - { id, account, amount, fee, timestamp }[]

ParamTypeDescription
accountstringAccount to get repay historical data for
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc

fetchStakers(orderBy, orderDirection, where) ⇒ Promise

Get stakers historical data

Kind: global function
Returns: Promise - { id, account, totalLockedStake, totalFrozen, creditLimit, stakedAmount, timestamp }[]

ParamTypeDescription
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc
whereobjectWhere object e.g { account: "0x00" }

fetchAccountStakes(orderBy, orderDirection) ⇒ Promise

Get staker historical data for single account

Kind: global function
Returns: Promise - { id, account, totalLockedStake, totalFrozen, creditLimit, stakedAmount, timestamp }[]

ParamTypeDescription
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc

fetchTrustlines(orderBy, orderDirection, where) ⇒ Promise

Get trustline historical data. when updateTrust is called on the UserManager this trustline data is recorded

Kind: global function
Returns: Promise - { id, staker, borrower, amount, timestamp }[]

ParamTypeDescription
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc
whereobjectWhere object e.g { staker: "0x00" }

fetchCancelTrusted(orderBy, orderDirection, where) ⇒ Promise

Get cancel trustline historical data. when cancelVouch is called on the UserManager this cancel trustline data is recorded

Kind: global function
Returns: Promise - { id, staker, borrower, timestamp }[]

ParamTypeDescription
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc
whereobjectWhere object e.g { staker: "0x00" }

fetchAccountTrusted(account, orderBy, orderDirection) ⇒ Promise

Get data about accounts that are vouching for account

Kind: global function
Returns: Promise - { id, staker, borrower, amount, timestamp }[]

ParamTypeDescription
accountstringAccount to lookup
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc

fetchAccountTrusting(account, orderBy, orderDirection) ⇒ Promise

Get data about accounts that are being trusted by account

Kind: global function
Returns: Promise - { id, staker, borrower, amount, timestamp }[]

ParamTypeDescription
accountstringAccount to lookup
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc

fetchAccountTrustRelationship(borrower, staker, orderBy, orderDirection) ⇒ Promise

Get data about related account borrower -> staker

Kind: global function
Returns: Promise - { id, staker, borrower, amount, timestamp }[]

ParamTypeDescription
borrowerstringAccount to lookup
stakerstringAccount to lookup
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc

fetchUTokenMeta(orderBy, orderDirection) ⇒ Promise

Get UserManager historical state

Kind: global function
Returns: Promise - { id, totalBorrows, totalSupply, totalReserves, totalRedeemable, borrowRate, supplyRate, exchangeRate, timestamp }

ParamTypeDescription
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc

fetchUserManagerMeta(orderBy, orderDirection) ⇒ Promise

Get UserManager historical data

Kind: global function
Returns: Promise - { id, totalStaked, totalFrozen, timestamp }[]

ParamTypeDescription
orderBystringProperty to orderBy
orderDirectionOrderDirectionOrder in asc or desc
1.0.22

8 months ago

1.0.21

10 months ago

1.0.20

1 year ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago