Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/getalby/zap-button

Bringing zaps truly out of nostr!
https://github.com/getalby/zap-button

bitcoin lightning nostr

Last synced: about 1 month ago
JSON representation

Bringing zaps truly out of nostr!

Awesome Lists containing this project

README

        



# zap-button

React component that allows you to integrate a zap button into your web application, and help zap people on nostr using their lightning address.

⚠️ Best used alongside [Bitcoin Connect](https://github.com/getAlby/bitcoin-connect)

## 🚀 Quick Start

```
npm install @getalby/zap-button
```

## 🤙 Usage

### `ZapButton`

```jsx
import React, { useEffect, useState } from 'react';
import { Button, Modal } from '@getalby/bitcoin-connect-react';
import { ZapButton } from 'zap-button';

const MyComponent = () => {
const lnurl = '[email protected]';
const [connected, setConnected] = useState(false)

useEffect(() => {
window.addEventListener("bc:connected", () => {
setConnected(true)
});
}, [])

return (


My Zapping App







);
};

export default MyComponent;
```

And Zap Button component would be embedded like this:

## Thanks

@bigyanpoudel for https://github.com/bigyanpoudel/react-vite-library