@bigmi/react 0.0.1 → 0.0.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.3](https://github.com/lifinance/bigmi/compare/v0.0.2...v0.0.3) (2024-10-23)
6
+
7
+ ### 0.0.2 (2024-10-17)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * add createConfig export ([dec450a](https://github.com/lifinance/bigmi/commit/dec450a7e5a071e67e259be78c0b9a8b616c7183))
13
+
5
14
  ### 0.0.1 (2024-10-15)
6
15
 
7
16
 
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <h1 align="center">Bigmi</h1>
4
4
  <p align="center"><strong>TypeScript library and reactive primitives for Bitcoin apps.</strong></p>
5
5
 
6
- [![license](https://img.shields.io/npm/l/@bigmi/core)](/LICENSE.md)
6
+ [![license](https://img.shields.io/github/license/lifinance/bigmi)](/LICENSE.md)
7
7
  [![npm latest package](https://img.shields.io/npm/v/@bigmi/core/latest.svg)](https://www.npmjs.com/package/@bigmi/core)
8
8
  [![npm downloads](https://img.shields.io/npm/dm/@bigmi/core.svg)](https://www.npmjs.com/package/@bigmi/core)
9
9
 
@@ -43,6 +43,7 @@ pnpm add @bigmi/client
43
43
  Here is an example of a basic usage:
44
44
 
45
45
  ```tsx
46
+ import { useConfig } from '@bigmi/react'
46
47
  import {
47
48
  type UTXOAPISchema,
48
49
  bitcoin,
@@ -53,6 +54,8 @@ import {
53
54
  waitForTransaction,
54
55
  } from '@bigmi/core'
55
56
  import { createClient, fallback, rpcSchema } from 'viem'
57
+ import { useAccount } from 'wagmi'
58
+
56
59
 
57
60
  // Create a public client for interactions with the Bitcoin
58
61
  const publicClient = createClient({
@@ -104,11 +107,17 @@ const transaction = await waitForTransaction(publicClient, {
104
107
  });
105
108
 
106
109
  console.log('Transaction confirmed:', transaction);
110
+
111
+ // Getting account information inside the React application
112
+ const bigmiConfig = useConfig()
113
+ const account = useAccount({ config: bigmiConfig })
114
+
115
+ console.log('Bitcoin account address:', account.address);
107
116
  ```
108
117
 
109
118
  ## Examples
110
119
 
111
- We are working on examples to showcase Bigmi's capabilities. Stay tuned!
120
+ We are working on more examples to showcase Bigmi's capabilities. Stay tuned!
112
121
 
113
122
  In the meantime, explore the [LI.FI Widget](https://github.com/lifinance/widget) and [LI.FI SDK](https://github.com/lifinance/sdk) for inspiration.
114
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigmi/react",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "React primitives for Bitcoin apps.",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/index.js",
@@ -30,10 +30,10 @@
30
30
  ],
31
31
  "dependencies": {
32
32
  "use-sync-external-store": "^1.2.2",
33
- "viem": "^2.21.25",
34
- "wagmi": "^2.12.16",
35
- "@bigmi/client": "^0.0.1",
36
- "@bigmi/core": "^0.0.1"
33
+ "viem": "^2.21.33",
34
+ "wagmi": "^2.12.24",
35
+ "@bigmi/client": "^0.0.3",
36
+ "@bigmi/core": "^0.0.3"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": ">=18",