const { Framework } = require("@superfluid-finance/sdk-core");
const { ethers } = require("ethers");
const provider = new ethers.providers.InfuraProvider(
const sf = await Framework.create({
type Paging = { take: number, skip?: number, lastId?: string };
const pageResult = await sf.query.
// The different queries can take different order by properties
// given the properties that exist on the entity itself.
listAllSuperTokens({ isListed?: boolean },
ordering: Ordering<Token_OrderBy>
listIndexes({ indexId?: string, publisher?: string, token?: string },
ordering: Ordering<Index_OrderBy>
listIndexSubscriptions({ subscriber?: string, approved?: boolean },
ordering: Ordering<IndexSubscription_OrderBy>
listStreams({ sender?: string, receiver?: string, token?: string },
ordering: Ordering<Stream_OrderBy>
listUserInteractedSuperTokens({ account?: string, token?: string },
ordering: Ordering<AccountTokenSnapshot_OrderBy>
listEvents({ account?: string, timestamp_gt?: number },
ordering: Ordering<Event_OrderBy>
// A subscription function which allows you to subscribe to events via polling.
callback: (events: AllEvents[], unsubscribe: () => void) => void,