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

react-native-webln

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-webln - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

4

dist/postMessage-handler.d.ts

@@ -12,3 +12,3 @@ import { MutableRefObject } from "react";

}
declare const postMessageHandler: (webview: MutableRefObject<WebView>, requests: WebLNProviderWithExtras) => (event: WebViewMessageEvent) => Promise<void>;
export { postMessageHandler, };
declare const onMessageHandler: (webview: MutableRefObject<WebView>, requests: WebLNProviderWithExtras) => (event: WebViewMessageEvent) => Promise<void>;
export { onMessageHandler, };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const postMessageHandler = (webview, requests) => async (event) => {
const onMessageHandler = (webview, requests) => async (event) => {
if (!webview.current) {

@@ -66,3 +66,3 @@ console.error("react-native-webln: Reference to webview is not properly set.\n" +

};
exports.postMessageHandler = postMessageHandler;
exports.onMessageHandler = onMessageHandler;
const injectResponseToWebView = (webview, id, inject) => {

@@ -69,0 +69,0 @@ console.log("inject");

@@ -14,3 +14,3 @@ import { MutableRefObject } from "react";

const postMessageHandler = (webview: MutableRefObject<WebView>, requests: WebLNProviderWithExtras) => async (event: WebViewMessageEvent) => {
const onMessageHandler = (webview: MutableRefObject<WebView>, requests: WebLNProviderWithExtras) => async (event: WebViewMessageEvent) => {
if (!webview.current) {

@@ -98,3 +98,3 @@ console.error(

export {
postMessageHandler,
onMessageHandler,
}
{
"name": "react-native-webln",
"description": "Library for supporting WebLN in a WebView",
"version": "0.1.3",
"version": "0.1.4",
"main": "dist/index",

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

@@ -51,3 +51,3 @@ # react-native-webln

}}
onMessage={postMessageHandler(webview, {
onMessage={onMessageHandler(webview, {
enable: async () => { /* Your implementation goes here */ },

@@ -54,0 +54,0 @@ getInfo: async () => { /* Your implementation goes here */ },

Sorry, the diff of this file is not supported yet

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