@bigmi/core 0.0.2 → 0.0.4
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 +9 -0
- package/README.md +10 -1
- package/package.json +2 -3
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.4](https://github.com/lifinance/bigmi/compare/v0.0.3...v0.0.4) (2024-10-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add okx wallet ([58b93b5](https://github.com/lifinance/bigmi/commit/58b93b5f8839bbbb0340ff7ac77f03617325c506))
|
|
11
|
+
|
|
12
|
+
### [0.0.3](https://github.com/lifinance/bigmi/compare/v0.0.2...v0.0.3) (2024-10-23)
|
|
13
|
+
|
|
5
14
|
### 0.0.2 (2024-10-17)
|
|
6
15
|
|
|
7
16
|
|
package/README.md
CHANGED
|
@@ -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/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "TypeScript library for Bitcoin apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/index.js",
|
|
@@ -27,12 +27,11 @@
|
|
|
27
27
|
"typescript"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@noble/curves": "^1.6.0",
|
|
31
30
|
"@noble/hashes": "^1.5.0",
|
|
32
31
|
"bech32": "^2.0.0",
|
|
33
32
|
"bitcoinjs-lib": "^7.0.0-rc.0",
|
|
34
33
|
"bs58": "^6.0.0",
|
|
35
|
-
"viem": "^2.21.
|
|
34
|
+
"viem": "^2.21.35"
|
|
36
35
|
},
|
|
37
36
|
"peerDependencies": {
|
|
38
37
|
"bitcoinjs-lib": "^7.0.0-rc.0",
|