Files
radicle-explorer/src/lib/cobs.ts
T
Rūdolfs Ošiņšandxphoniex 1a5430aced Rename URN -> ID
Co-authored-by: xphoniex <dj.2dixx@gmail.com>
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2022-12-27 15:43:46 +01:00

32 lines
503 B
TypeScript

import type { PeerId } from "@app/lib/project";
export interface Author {
peer: PeerId;
id: string;
profile: {
name: string;
ens: {
name: string;
} | null;
} | null;
}
export interface PeerIdentity {
id: string;
name: string;
ens: {
name: string;
} | null;
}
export interface PeerInfo {
id: PeerId;
person?: PeerIdentity;
delegate: boolean;
}
// Formats COBs Object Ids
export function formatObjectId(id: string): string {
return id.substring(0, 11);
}