Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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!
- Host: GitHub
- URL: https://github.com/getalby/zap-button
- Owner: getAlby
- Created: 2023-10-18T17:26:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-19T14:48:40.000Z (about 1 year ago)
- Last Synced: 2024-11-30T15:59:52.514Z (about 1 month ago)
- Topics: bitcoin, lightning, nostr
- Language: CSS
- Homepage:
- Size: 446 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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