diff --git a/src/utils/PlatformServiceMixin.ts b/src/utils/PlatformServiceMixin.ts index 6c1b1f2a..e1f8b4fd 100644 --- a/src/utils/PlatformServiceMixin.ts +++ b/src/utils/PlatformServiceMixin.ts @@ -1498,6 +1498,31 @@ export const PlatformServiceMixin = { } }, + /** + * Get all account DIDs - $getAllAccountDids() + * Retrieves all account DIDs from the accounts table + * @returns Promise Array of account DIDs + */ + async $getAllAccountDids(): Promise { + try { + const result = await this.$dbQuery( + "SELECT did FROM accounts ORDER BY did", + ); + + if (!result?.values?.length) { + return []; + } + + return result.values.map((row: SqlValue[]) => row[0] as string); + } catch (error) { + logger.error( + "[PlatformServiceMixin] Error getting all account DIDs:", + error, + ); + return []; + } + }, + // ================================================= // TEMP TABLE METHODS (for temporary storage) // =================================================