Drips Documentation

Drips Documentation

  • Docs

List Sub-Accounts

With the SDK, you can query the Drips subgraph to get a list of the NFT-based sub-accounts belonging to a given Ethereum address. To do so, you will first need to DripsSubgraphClient.

Once you have it, you can simply call DripsSubgraphClient.getNftSubAccountsByOwner. The full method signature looks like this:

getNftSubAccountsByOwner(ownerAddress: string): Promise<NftSubAccount[]>

Take a look at the method's documentation for additional details.

TODO - switch this to getNftSubAccountsByOwnerAndApp() once we add that function

This method will return all NFT-based sub-accounts belonging to the given Ethereum address. If the address is the address of an end-user of your app who happens to have a wallet connected, your app can then allow that end user to perform actions on the sub-account like adding funds, starting a stream or creating splits.