kernl API
    Preparing search index...

    Interface IdentityProviders

    The host-backed lookups kehto's identity service accepts, plus the relay list for the signer wrapper.

    interface IdentityProviders {
        getBadges?: (
            pubkey: string,
            message: IdentityGetBadgesMessage,
        ) => MaybePromise<Badge[]>;
        getBlocked?: (
            pubkey: string,
            message: IdentityGetBlockedMessage,
        ) => MaybePromise<string[]>;
        getFollows?: (
            pubkey: string,
            message: IdentityGetFollowsMessage,
        ) => MaybePromise<string[]>;
        getList?: (
            listType: string,
            pubkey: string,
            message: IdentityGetListMessage,
        ) => MaybePromise<string[]>;
        getMutes?: (
            pubkey: string,
            message: IdentityGetMutesMessage,
        ) => MaybePromise<string[]>;
        getProfile?: (
            pubkey: string,
            message: IdentityGetProfileMessage,
        ) => MaybePromise<ProfileData | null>;
        getZaps?: (
            pubkey: string,
            message: IdentityGetZapsMessage,
        ) => MaybePromise<ZapReceipt[]>;
        getRelays(pubkey: string): Promise<RelayPermissions>;
    }

    Hierarchy

    • Pick<
          IdentityServiceOptions,
          | "getProfile"
          | "getFollows"
          | "getMutes"
          | "getList"
          | "getZaps"
          | "getBlocked"
          | "getBadges",
      >
      • IdentityProviders
    Index
    getBadges?: (
        pubkey: string,
        message: IdentityGetBadgesMessage,
    ) => MaybePromise<Badge[]>

    Optional host-backed badge lookup for the current user.

    Type Declaration

      • (pubkey: string, message: IdentityGetBadgesMessage): MaybePromise<Badge[]>
      • Parameters

        • pubkey: string

          Current signer pubkey, or "" when no signer is connected.

        • message: IdentityGetBadgesMessage

          Original identity.getBadges request envelope.

        Returns MaybePromise<Badge[]>

        Badges awarded to the user.

    getBlocked?: (
        pubkey: string,
        message: IdentityGetBlockedMessage,
    ) => MaybePromise<string[]>

    Optional host-backed block-list lookup for the current user.

    Type Declaration

      • (pubkey: string, message: IdentityGetBlockedMessage): MaybePromise<string[]>
      • Parameters

        • pubkey: string

          Current signer pubkey, or "" when no signer is connected.

        • message: IdentityGetBlockedMessage

          Original identity.getBlocked request envelope.

        Returns MaybePromise<string[]>

        Hex-encoded blocked pubkeys.

    getFollows?: (
        pubkey: string,
        message: IdentityGetFollowsMessage,
    ) => MaybePromise<string[]>

    Optional host-backed follow-list lookup for the current user.

    Type Declaration

      • (pubkey: string, message: IdentityGetFollowsMessage): MaybePromise<string[]>
      • Parameters

        • pubkey: string

          Current signer pubkey, or "" when no signer is connected.

        • message: IdentityGetFollowsMessage

          Original identity.getFollows request envelope.

        Returns MaybePromise<string[]>

        Hex-encoded followed pubkeys.

    getList?: (
        listType: string,
        pubkey: string,
        message: IdentityGetListMessage,
    ) => MaybePromise<string[]>

    Optional host-backed categorized-list lookup for the current user.

    Type Declaration

      • (
            listType: string,
            pubkey: string,
            message: IdentityGetListMessage,
        ): MaybePromise<string[]>
      • Parameters

        • listType: string

          Requested list category from the wire envelope.

        • pubkey: string

          Current signer pubkey, or "" when no signer is connected.

        • message: IdentityGetListMessage

          Original identity.getList request envelope.

        Returns MaybePromise<string[]>

        List entries.

    getMutes?: (
        pubkey: string,
        message: IdentityGetMutesMessage,
    ) => MaybePromise<string[]>

    Optional host-backed mute-list lookup for the current user.

    Type Declaration

      • (pubkey: string, message: IdentityGetMutesMessage): MaybePromise<string[]>
      • Parameters

        • pubkey: string

          Current signer pubkey, or "" when no signer is connected.

        • message: IdentityGetMutesMessage

          Original identity.getMutes request envelope.

        Returns MaybePromise<string[]>

        Hex-encoded muted pubkeys.

    getProfile?: (
        pubkey: string,
        message: IdentityGetProfileMessage,
    ) => MaybePromise<ProfileData | null>

    Optional host-backed profile lookup for the current user.

    Kehto does not query relays itself; hosts that already maintain kind-0 metadata can provide it here without replacing the whole identity service.

    Type Declaration

      • (
            pubkey: string,
            message: IdentityGetProfileMessage,
        ): MaybePromise<ProfileData | null>
      • Parameters

        • pubkey: string

          Current signer pubkey, or "" when no signer is connected.

        • message: IdentityGetProfileMessage

          Original identity.getProfile request envelope.

        Returns MaybePromise<ProfileData | null>

        Profile metadata, or null when unavailable.

    getZaps?: (
        pubkey: string,
        message: IdentityGetZapsMessage,
    ) => MaybePromise<ZapReceipt[]>

    Optional host-backed zap receipt lookup for the current user.

    Type Declaration

      • (pubkey: string, message: IdentityGetZapsMessage): MaybePromise<ZapReceipt[]>
      • Parameters

        • pubkey: string

          Current signer pubkey, or "" when no signer is connected.

        • message: IdentityGetZapsMessage

          Original identity.getZaps request envelope.

        Returns MaybePromise<ZapReceipt[]>

        Zap receipts.