@omnisat/lasereyes 0.0.0-next-20250417115249

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ MIT License
2
+ Copyright (c) 2024 Laser Eyes
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+ The above copyright notice and this permission notice shall be included in all
10
+ copies or substantial portions of the Software.
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+ ![lasereyes_logo](https://github.com/omnisat/lasereyes-mono/blob/main/.github/assets/lasereyes.png?raw=true)
2
+
3
+ # lasereyes
4
+
5
+ `@omnisat/lasereyes` is the main package that bundles both `lasereyes-core` and `lasereyes-react`, offering a unified interface for Bitcoin wallet integration in both framework-agnostic and React-based environments. This package simplifies wallet interactions across various Bitcoin wallets, making it easy for developers to build dApps with Bitcoin support.
6
+
7
+ ## Key Features
8
+
9
+ - **Unified Wallet Interface**: Simplifies Bitcoin wallet integration by providing a common interface for multiple wallet providers.
10
+ - **Framework-Agnostic**: `lasereyes-core` can be used in any JavaScript or TypeScript environment, not tied to any specific framework.
11
+ - **React Support**: `lasereyes-react` offers React hooks, context providers, and wallet icons for seamless integration into React applications.
12
+ - **Vue Support** (coming soon): `lasereyes-vue` offers a Vue hook, context providers, and wallet icons for seamless integration into Vue applications.
13
+ - **Angular Support** (coming soon): `lasereyes-angular` offers a Angular hook, context providers, and wallet icons for seamless integration into Angular applications.
14
+
15
+ ## Packages
16
+
17
+ This package exports two core packages:
18
+
19
+ 1. **[lasereyes-core](https://github.com/omnisat/lasereyes-mono/tree/main/packages/lasereyes-core)**: The framework-agnostic core logic for wallet interactions.
20
+ 2. **[lasereyes-react](https://github.com/omnisat/lasereyes-mono/tree/main/packages/lasereyes-react)**: React-specific components, including hooks, providers, and wallet icons.
21
+
22
+ ## Installation
23
+
24
+ To install the `@omnisat/lasereyes` package:
25
+
26
+ ```bash
27
+ yarn add @omnisat/lasereyes
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ `@omnisat/lasereyes` provides both framework-agnostic and React-specific integrations. You can use it in either environment based on your app’s requirements.
33
+
34
+ ### Example Usage (React)
35
+
36
+ ```typescript
37
+ import { LaserEyesProvider, useLaserEyes, UNISAT, MAINNET } from '@omnisat/lasereyes-react';
38
+
39
+ function App() {
40
+ return (
41
+ <LaserEyesProvider config={{network: MAINNET}}>
42
+ <WalletInfo />
43
+ </LaserEyesProvider>
44
+ );
45
+ }
46
+
47
+ function WalletInfo() {
48
+ const { address, connect } = useLaserEyes();
49
+
50
+ return (
51
+ <div>
52
+ {address ? (
53
+ <p>Connected: {address}</p>
54
+ ) : (
55
+ <button onClick={() => connect(UNISAT)}>Connect Wallet</button>
56
+ )}
57
+ </div>
58
+ );
59
+ }
60
+ ```
61
+
62
+ ## Development
63
+
64
+ To develop the `@omnisat/lasereyes` package within the monorepo:
65
+
66
+ 1. Clone the repository and navigate to the monorepo root.
67
+ 2. Install dependencies:
68
+
69
+ ```bash
70
+ pnpm install
71
+ ```
72
+
73
+ 3. Run the development build:
74
+
75
+ ```bash
76
+ pnpm dev
77
+ ```
78
+
79
+ ## Contributing
80
+
81
+ Contributions are welcome! Feel free to submit pull requests or open issues for bug fixes, feature enhancements, or documentation improvements.
82
+
83
+ ## License
84
+
85
+ `@omnisat/lasereyes` is MIT licensed.
86
+
87
+ If you find Laser Eyes useful or use it for work, please consider [sponsoring Laser Eyes](https://github.com/sponsors/omnisat). Thank you 🙏
@@ -0,0 +1,4 @@
1
+ export * from '@omnisat/lasereyes-core';
2
+ export { useLaserEyes, LaserEyesProvider, WalletIcon, LeatherLogo, MagicEdenLogo, OkxLogo, PhantomLogo, OylLogo, UnisatLogo, WizzLogo, XverseLogo, LaserEyesLogo, } from '@omnisat/lasereyes-react';
3
+ export type { LaserEyesContextType } from '@omnisat/lasereyes-react';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,aAAa,EACb,OAAO,EACP,WAAW,EACX,OAAO,EACP,UAAU,EACV,QAAQ,EACR,UAAU,EACV,aAAa,GACd,MAAM,0BAA0B,CAAA;AACjC,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA"}