Drips docs

Drips docs

    ›Accounts

    Intro and Basics

    • What's a Drip?
    • Drips v2 Features
    • Accessing Drips
    • FAQ

    The Drips App

    • Getting Started
    • Manage funds

      • Add funds
      • Withdraw funds
      • Collect earnings

      Streams

      • Create a stream
      • Edit, pause or delete a stream

      Splits

      • Set up & manage splits

      Explore the network

      • Drips profiles

      Advanced

      • Connecting to a Safe

    The Protocol

    • Overview
    • User Identities In Drips
    • Smart Contract and Subgraph Details
    • Security

    For Developers

    • The Drips JS SDK
    • Installing the SDK and Running the Example App
    • Initializing the SDK
    • Accounts

      • Intro to Accounts
      • Create an Account
      • List Sub-Accounts
      • Add Funds

      Streams

      • Start a Stream
      • Update a Stream
      • Scheduling

      Splitting

      • Create User Splits
      • Edit User Splits
      • List User Splits
      • Immutable Splits

      Collecting

      • How to Collect
      • Squeezing Drips

      Advanced Topics

      • Caller
      • Account Metadata
      • Dripping Fractional Amounts
      • Drips inner workings

    Get Involved

    • Join the Drips Community

    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.

    ← Create an AccountAdd Funds →