Get information regarding a stream going from a sender to a receiver for a specified Super Token
//load the token you'd like to use like this
//note that tokens may be loaded by symbol or by address
const daix = await sf.loadSuperToken("DAIx");
let res = await daix.getFlow({
sender: string,
receiver: string,
providerOrSigner: ethers.providers.Provider | ethers.Signer
});
Parameter | Type | Description |
---|---|---|
sender | string | Address of sender |
receiver | string | Address of receiver |
providerOrSigner | ethers.providers.Provider or ethers.Signer | ethers provider or ethers signer object |
Returns a JSON object literal with the below info:
Key | Value Type | Value Description |
---|---|---|
timestamp | Date | Timestamp when the stream of superToken was last updated by the account |
flowRate | string | Flow rate (wei/second) of the stream. Always zero or positive. |
deposit | string | Buffer deposit held for the stream |
owedDeposit | string | Additional deposit if the stream is to a Super App |
{% embed url="https://github.com/superfluid-finance/super-examples/blob/311e5a95d3505dc8c5d8afd420e9edc8b5a57426/projects/borrow-against-salary/test/EmploymentLoan.test.js#L186" %}