applesauce-wallet-connect
Version:
NIP-47 Nostr Wallet Connect implementation for both clients and services.
12 lines (11 loc) • 785 B
TypeScript
import { EventFactory } from "applesauce-core/factories";
import { KnownEventTemplate } from "applesauce-core/helpers";
import { WALLET_REQUEST_KIND } from "../helpers/request.js";
import { WalletConnectEncryptionMethod } from "../helpers/encryption.js";
import { TWalletMethod } from "../helpers/methods.js";
export type WalletRequestTemplate = KnownEventTemplate<typeof WALLET_REQUEST_KIND>;
export declare class WalletRequestFactory extends EventFactory<typeof WALLET_REQUEST_KIND, WalletRequestTemplate> {
static create<Method extends TWalletMethod>(service: string, request: Method["request"], encryption?: WalletConnectEncryptionMethod): WalletRequestFactory;
service(pubkey: string): this;
request<T>(request: T, encryption?: WalletConnectEncryptionMethod): this;
}