import { SignedEvent, StampedEvent } from "./Events.js"; export type ManagementSign = (event: StampedEvent) => Promise; export type ManagementRequest = { method: string; params: any[]; }; export type ManagementResponse = { result?: any; error?: string; }; export declare const makeSupportedMethods: () => ManagementRequest; export declare const makeBanPubkey: (pubkey: string, reason?: string) => ManagementRequest; export declare const makeUnbanPubkey: (pubkey: string, reason?: string) => ManagementRequest; export declare const makeListBannedPubkeys: () => ManagementRequest; export declare const makeAllowPubkey: (pubkey: string, reason?: string) => ManagementRequest; export declare const makeUnallowPubkey: (pubkey: string, reason?: string) => ManagementRequest; export declare const makeListAllowedPubkeys: () => ManagementRequest; export declare const makeCreateRole: (id: string, label: string, description: string, color: number, order: number) => ManagementRequest; export declare const makeEditRole: (id: string, label: string, description: string, color: number, order: number) => ManagementRequest; export declare const makeDeleteRole: (id: string) => ManagementRequest; export declare const makeAssignRole: (pubkey: string, roleId: string) => ManagementRequest; export declare const makeUnassignRole: (pubkey: string, roleId: string) => ManagementRequest; export declare const makeAssignMethod: (pubkey: string, method: string) => ManagementRequest; export declare const makeUnassignMethod: (pubkey: string, method: string) => ManagementRequest; export declare const makeListMethodAssignees: () => ManagementRequest; export declare const makeListClaims: () => ManagementRequest; export declare const makeCreateClaim: (claim: string) => ManagementRequest; export declare const makeDeleteClaim: (claim: string) => ManagementRequest; export declare const makeListEventsNeedingModeration: () => ManagementRequest; export declare const makeAllowEvent: (id: string, reason?: string) => ManagementRequest; export declare const makeBanEvent: (id: string, reason?: string) => ManagementRequest; export declare const makeListBannedEvents: () => ManagementRequest; export declare const makeChangeRelayName: (name: string) => ManagementRequest; export declare const makeChangeRelayDescription: (description: string) => ManagementRequest; export declare const makeChangeRelayIcon: (iconUrl: string) => ManagementRequest; export declare const makeAllowKind: (kind: number) => ManagementRequest; export declare const makeDisallowKind: (kind: number) => ManagementRequest; export declare const makeListAllowedKinds: () => ManagementRequest; export declare const makeBlockIp: (ip: string, reason?: string) => ManagementRequest; export declare const makeUnblockIp: (ip: string) => ManagementRequest; export declare const makeListBlockedIps: () => ManagementRequest; export declare const sendManagementRequest: (url: string, request: ManagementRequest, authEvent: SignedEvent) => Promise; /** * A NIP-86 relay management client bound to one relay and one signer. Each * method builds the request, signs a fresh NIP-98 auth event, and POSTs it — * e.g. `new ManagementApi(url, sign).deleteRole(roleId)`. Management shares the * relay's websocket URI but is served over HTTP, so `ws(s)://` is normalized to * `http(s)://`. */ export declare class ManagementApi { readonly sign: ManagementSign; readonly url: string; constructor(url: string, sign: ManagementSign); send: (request: ManagementRequest) => Promise; supportedMethods: () => Promise; banPubkey: (pubkey: string, reason?: string) => Promise; unbanPubkey: (pubkey: string, reason?: string) => Promise; listBannedPubkeys: () => Promise; allowPubkey: (pubkey: string, reason?: string) => Promise; unallowPubkey: (pubkey: string, reason?: string) => Promise; listAllowedPubkeys: () => Promise; createRole: (id: string, label: string, description: string, color: number, order: number) => Promise; editRole: (id: string, label: string, description: string, color: number, order: number) => Promise; deleteRole: (id: string) => Promise; assignRole: (pubkey: string, roleId: string) => Promise; unassignRole: (pubkey: string, roleId: string) => Promise; assignMethod: (pubkey: string, method: string) => Promise; unassignMethod: (pubkey: string, method: string) => Promise; listMethodAssignees: () => Promise; listClaims: () => Promise; createClaim: (claim: string) => Promise; deleteClaim: (claim: string) => Promise; listEventsNeedingModeration: () => Promise; allowEvent: (id: string, reason?: string) => Promise; banEvent: (id: string, reason?: string) => Promise; listBannedEvents: () => Promise; changeRelayName: (name: string) => Promise; changeRelayDescription: (description: string) => Promise; changeRelayIcon: (iconUrl: string) => Promise; allowKind: (kind: number) => Promise; disallowKind: (kind: number) => Promise; listAllowedKinds: () => Promise; blockIp: (ip: string, reason?: string) => Promise; unblockIp: (ip: string) => Promise; listBlockedIps: () => Promise; } //# sourceMappingURL=Nip86.d.ts.map