@enclaved/encli
Version:
CLI utilities for working with enclaved application server for TEEs
29 lines (28 loc) • 1.08 kB
TypeScript
import { Event, UnsignedEvent } from "nostr-tools";
import { Signer } from "./types";
import { Client } from "./client";
export declare class Nip46Client extends Client implements Signer {
private userPubkey?;
static login({ bunkerUrl, relayUrl, filename, perms, }: {
filename: string;
bunkerUrl?: string;
relayUrl?: string;
perms?: string;
}): Promise<string>;
static logout(filename: string): void;
static fromFile(filename: string): Nip46Client;
constructor({ relayUrl, signerPubkey, privkey, }: {
relayUrl?: string;
signerPubkey?: string;
privkey?: Uint8Array;
});
private connect;
private nostrconnect;
start(): Promise<void>;
getPublicKey(): Promise<string>;
nip04Decrypt(pubkey: string, data: string): Promise<string>;
nip04Encrypt(pubkey: string, data: string): Promise<string>;
nip44Decrypt(pubkey: string, data: string): Promise<string>;
nip44Encrypt(pubkey: string, data: string): Promise<string>;
signEvent(event: UnsignedEvent): Promise<Event>;
}