Socket
Socket
Sign inDemoInstall

@webbtc/webln-types

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webbtc/webln-types - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

2

package.json
{
"name": "@webbtc/webln-types",
"description": "Type definitions for WebLN",
"version": "1.0.12",
"version": "1.0.13",
"types": "types/index.d.ts",

@@ -6,0 +6,0 @@ "repository": {

@@ -11,5 +11,5 @@ # webln-types

```bash
npm install @webbtc/webln-types --save-dev # or yarn add @webbtc/webln-types --dev
```
```bash
npm install @webbtc/webln-types --save-dev # or yarn add @webbtc/webln-types --dev
```

@@ -24,17 +24,18 @@ 2. Create `webln-types.d.ts` in your `src` directory with the following contents to ensure the types are picked up by the Typescript compiler:

```javascript
import { GetInfoResponse } from "@webbtc/webln-types";
if (window.webln) {
(async () => {
await window.webln.enable();
const info: GetInfoResponse = await window.webln.getInfo();
console.log("Your node pubkey is", info.node.pubkey);
})();
} else {
console.warn("WebLN not enabled");
}
```
```typescript
import type { GetInfoResponse } from "@webbtc/webln-types";
if (window.webln) {
(async () => {
await window.webln.enable();
const info: GetInfoResponse = await window.webln.getInfo();
console.log("Your node pubkey is", info.node.pubkey);
})();
} else {
console.warn("WebLN not enabled");
}
```
## Adding WebLN to your application
Read the [WebLN Guide](https://www.webln.guide/introduction/readme)

@@ -274,2 +274,4 @@ // Workaround for code completion to account for values this library doesn't know about yet.

verifyMessage(signature: string, message: string): Promise<void>;
on?(eventName: string, listener: () => void): this;
off?(eventName: string, listener: () => void): this;
}

@@ -276,0 +278,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc