An easy-to-host PDS on the ATProtocol, iPhone and MacOS. Maintain control of your keys and data, always.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(identity-wallet): add list_identities Tauri command and IPC wrapper

authored by

Malpercio and committed by
Tangled
2b8f1f41 b24d5dac

+25
+13
apps/identity-wallet/src-tauri/src/lib.rs
··· 660 660 Ok(()) 661 661 } 662 662 663 + /// Return the list of managed DIDs currently stored in the Keychain. 664 + /// 665 + /// Returns an empty list if no identities have been claimed. Returns an error only if 666 + /// the Keychain entry exists but contains invalid data (data corruption). 667 + /// 668 + /// The frontend calls this on mount to check for existing identities and decide whether 669 + /// to skip the mode selector. 670 + #[tauri::command] 671 + fn list_identities() -> Result<Vec<String>, identity_store::IdentityStoreError> { 672 + identity_store::IdentityStore.list_identities() 673 + } 674 + 663 675 /// Check whether the relay can resolve `handle` to `expected_did` via the ATProto 664 676 /// `resolveHandle` endpoint. 665 677 /// ··· 749 761 perform_did_ceremony, 750 762 register_handle, 751 763 check_handle_resolution, 764 + list_identities, 752 765 get_relay_url, 753 766 save_relay_url, 754 767 home::load_home_data,
+12
apps/identity-wallet/src/lib/ipc.ts
··· 468 468 */ 469 469 export const submitClaim = (did: string): Promise<ClaimResult> => 470 470 invoke('submit_claim', { did }); 471 + 472 + // ── Identity Store ────────────────────────────────────────────────────────── 473 + 474 + export type IdentityStoreError = 475 + | { code: 'IDENTITY_NOT_FOUND' } 476 + | { code: 'IDENTITY_ALREADY_EXISTS' } 477 + | { code: 'KEYCHAIN_ERROR' } 478 + | { code: 'KEY_GENERATION_FAILED' } 479 + | { code: 'SERIALIZATION_ERROR' }; 480 + 481 + export const listIdentities = (): Promise<string[]> => 482 + invoke('list_identities');