Function create$

  • Initialize the indexer and/or rpc concurrently and emit partially applied intances of the Sdk. Useful when initializing in a UI context where displaying data from the indexer as fast as possible is a priority.

    Creates a shared observable that replays last emitted sdk instace to late subscribers, and disconnectes the rpc provider when all subscribers unsubscribe.

    Note

    If config is indexer and rpc, indexer sdk will emit first.

    Returns

    Observable<Sdk<Context, MS>>

    Type Parameters

    • MS extends MetadataStorage<{
          __meta: "markets";
          categories: undefined | ({ name: string; img?: string | undefined; ticker?: string | undefined; color?: string | undefined; })[];
          confidentialId: undefined | string;
          description: string;
          img: undefined | string;
          question: string;
          scalarType: undefined | "number" | "date";
          slug: string;
          tags: undefined | string[];
      }, MS> = MetadataStorage<{
          __meta: "markets";
          categories: undefined | ({ name: string; img?: string | undefined; ticker?: string | undefined; color?: string | undefined; })[];
          confidentialId: undefined | string;
          description: string;
          img: undefined | string;
          question: string;
          scalarType: undefined | "number" | "date";
          slug: string;
          tags: undefined | string[];
      }>

    Parameters

    • config: Config<MS>

      FullConfig

    Returns Observable<Sdk<Context<MS>, MS>>

Generated using TypeDoc