Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@webbtc/webln-types

Package Overview
Dependencies
Maintainers
1
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.0 to 1.0.1

5

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

@@ -14,3 +14,4 @@ "repository": {

"scripts": {
"publish": "npm publish --access public"
"npm:bump-version": "npm version patch",
"npm:publish": "npm publish --access public"
},

@@ -17,0 +18,0 @@ "bugs": {

31

README.md
# webln-types
Type definitions for WebLN
Type definitions for [WebLN](https://webbtc.dev/webln)
## Quick Start
1. Install package
```bash
npm install @webbtc/webln-types --save-dev # or yarn add @webbtc/webln-types --dev
```
2. Add the following line somewhere in your codebase (e.g. the main/index.tsx file)
```javascript
/// <reference types="@webbtc/webln-types" />
```
3. Type definitions are now available for `window.webln`
```javascript
if (window.webln) {
(async () => {
await window.webln.enable();
console.log(await window.webln.getInfo());
})();
} else {
console.warn("WebLN not enabled");
}
```
## Adding WebLN to your application
Read the [WebLN Guide](https://www.webln.guide/introduction/readme)
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