Implements

Constructors

Properties

auths: Set<string> = ...
clientSecret: string = ...

A secret used when initiating a connection from the client side

isConnected: boolean = false

Whether the signer is connected to the remote signer

log: Debugger = ...
nip04?: {
    decrypt: ((pubkey: string, ciphertext: string) => string | Promise<string>);
    encrypt: ((pubkey: string, plaintext: string) => string | Promise<string>);
}
nip44?: {
    decrypt: ((pubkey: string, ciphertext: string) => string | Promise<string>);
    encrypt: ((pubkey: string, plaintext: string) => string | Promise<string>);
}
onAuth: ((url: string) => Promise<void>) = defaultHandleAuth
onPublishEvent?: ((event: Event, relays: string[]) => Promise<void>)

A method that is called when an event needs to be published

onSubClose?: (() => Promise<void>)

A method called when the subscription should be closed

onSubOpen?: ((filters: Filter[], relays: string[], onEvent: ((event: Event) => void)) => Promise<void>)

A method that is called when the subscription needs to be updated

pubkey?: string

The users pubkey

relays: string[]

Relays to communicate over

remote?: string

The remote signer pubkey

requests: Map<string, Deferred<any>> = ...
signer: SimpleSigner

The local client signer

subscriptionOpen: boolean = false
verifyEvent: ((event: Event) => event is VerifiedEvent) = verifyEvent

Accessors

Methods

  • Request to create an account on the remote signer

    Parameters

    • username: string
    • domain: string
    • Optionalemail: string
    • Optionalpermissions: string[]

    Returns Promise<string>

  • Parses a bunker:// URI

    Parameters

    • uri: string

    Returns {
        relays: string[];
        remote: string;
        secret?: string;
    }

    • relays: string[]
    • remote: string
    • Optionalsecret?: string