@bigmi/core 0.6.3-alpha.1 → 0.6.3-alpha.2

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.
Files changed (43) hide show
  1. package/dist/cjs/version.d.ts +1 -1
  2. package/dist/cjs/version.js +1 -1
  3. package/dist/esm/version.d.ts +1 -1
  4. package/dist/esm/version.js +1 -1
  5. package/dist/types/version.d.ts +1 -1
  6. package/package.json +10 -1
  7. package/src/version.ts +1 -1
  8. package/.env +0 -4
  9. package/CHANGELOG.md +0 -158
  10. package/package.json.tmp +0 -73
  11. package/src/chains/signet.spec.ts +0 -33
  12. package/src/transports/ankr/__mocks__/getBalance/valid.json +0 -9
  13. package/src/transports/ankr/__mocks__/getTransactionFee/invalid.json +0 -3
  14. package/src/transports/ankr/__mocks__/getTransactionFee/valid.json +0 -51
  15. package/src/transports/ankr/__mocks__/getTransactions/valid.json +0 -1186
  16. package/src/transports/ankr/ankr.spec.ts +0 -103
  17. package/src/transports/blockchair/__mocks__/getBalance/invalidAddress.json +0 -29
  18. package/src/transports/blockchair/__mocks__/getBalance/valid.json +0 -29
  19. package/src/transports/blockchair/__mocks__/getBalance/zeroBalance.json +0 -29
  20. package/src/transports/blockchair/__mocks__/getTransactionFee/invalid.json +0 -7
  21. package/src/transports/blockchair/__mocks__/getTransactionFee/valid.json +0 -37
  22. package/src/transports/blockchair/__mocks__/getUTXOs/invalidAddress.json +0 -28
  23. package/src/transports/blockchair/__mocks__/getUTXOs/rateLimited.json +0 -28
  24. package/src/transports/blockchair/__mocks__/getUTXOs/valid.json +0 -95
  25. package/src/transports/blockchair/__mocks__/getUTXOs/validPaginated.json +0 -869
  26. package/src/transports/blockchair/blockchair.spec.ts +0 -284
  27. package/src/transports/blockcypher/__mocks__/getBalance/invalid.json +0 -3
  28. package/src/transports/blockcypher/__mocks__/getBalance/valid.json +0 -13
  29. package/src/transports/blockcypher/__mocks__/getTransactionFee/invalid.json +0 -3
  30. package/src/transports/blockcypher/__mocks__/getTransactionFee/valid.json +0 -22
  31. package/src/transports/blockcypher/__mocks__/getUTXOs/empty.json +0 -12
  32. package/src/transports/blockcypher/__mocks__/getUTXOs/paginated.json +0 -2786
  33. package/src/transports/blockcypher/__mocks__/getUTXOs/rateLimited.json +0 -3
  34. package/src/transports/blockcypher/__mocks__/getUTXOs/valid.json +0 -27
  35. package/src/transports/blockcypher/blockcyper.spec.ts +0 -161
  36. package/src/transports/fallback.spec.ts +0 -128
  37. package/src/transports/mempool/__mocks__/getBalance/invalid.json +0 -1
  38. package/src/transports/mempool/__mocks__/getBalance/valid.json +0 -17
  39. package/src/transports/mempool/__mocks__/getTransactionFee/invalid.json +0 -1
  40. package/src/transports/mempool/__mocks__/getTransactionFee/valid.json +0 -58
  41. package/src/transports/mempool/__mocks__/getTransactions/valid.json +0 -1268
  42. package/src/transports/mempool/mempool.spec.ts +0 -126
  43. package/tsconfig.json +0 -12
@@ -1,2 +1,2 @@
1
1
  export declare const name = "@bigmi/core";
2
- export declare const version = "0.6.3-alpha.1";
2
+ export declare const version = "0.6.3-alpha.2";
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = exports.name = void 0;
4
4
  exports.name = '@bigmi/core';
5
- exports.version = '0.6.3-alpha.1';
5
+ exports.version = '0.6.3-alpha.2';
6
6
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
1
  export declare const name = "@bigmi/core";
2
- export declare const version = "0.6.3-alpha.1";
2
+ export declare const version = "0.6.3-alpha.2";
@@ -1,3 +1,3 @@
1
1
  export const name = '@bigmi/core';
2
- export const version = '0.6.3-alpha.1';
2
+ export const version = '0.6.3-alpha.2';
3
3
  //# sourceMappingURL=version.js.map
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@bigmi/core";
2
- export declare const version = "0.6.3-alpha.1";
2
+ export declare const version = "0.6.3-alpha.2";
3
3
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigmi/core",
3
- "version": "0.6.3-alpha.1",
3
+ "version": "0.6.3-alpha.2",
4
4
  "description": "TypeScript library for Bitcoin apps.",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/index.js",
@@ -37,6 +37,15 @@
37
37
  "peerDependencies": {
38
38
  "bs58": "^6.0.0"
39
39
  },
40
+ "files": [
41
+ "dist/**",
42
+ "!dist/**/*.tsbuildinfo",
43
+ "src/**/*.ts",
44
+ "!src/**/*.spec.ts",
45
+ "!*.tmp",
46
+ "!*.env",
47
+ "!tsconfig.json"
48
+ ],
40
49
  "exports": {
41
50
  ".": {
42
51
  "types": "./dist/esm/index.d.ts",
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export const name = '@bigmi/core'
2
- export const version = '0.6.3-alpha.1'
2
+ export const version = '0.6.3-alpha.2'
package/.env DELETED
@@ -1,4 +0,0 @@
1
- VITE_TEST_ADDRESS='bc1qpvk0kjdg0kantu9z78qz7gqk53q643auz33yaw' # add test address
2
- VITE_TEST_ANKR_KEY='ANKR_TEST_KEY'
3
- VITE_TEST_BLOCKCHAIR_KEY=
4
- VITE_TEST_BLOCKCYPHER_API_KEY=
package/CHANGELOG.md DELETED
@@ -1,158 +0,0 @@
1
- # Changelog
2
-
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
-
5
- ### [0.6.2](https://github.com/lifinance/bigmi/compare/v0.6.1...v0.6.2) (2025-11-13)
6
-
7
-
8
- ### Bug Fixes
9
-
10
- * **leather-wallet:** cache wallet connection with daily expiry and improve wallet reconnection reliability ([#36](https://github.com/lifinance/bigmi/issues/36)) ([fcff06e](https://github.com/lifinance/bigmi/commit/fcff06e19426154750b775f7a1b83f5c6db038dd))
11
-
12
- ### [0.6.1](https://github.com/lifinance/bigmi/compare/v0.6.0...v0.6.1) (2025-10-29)
13
-
14
- ## [0.6.0](https://github.com/lifinance/bigmi/compare/v0.5.4...v0.6.0) (2025-10-06)
15
-
16
-
17
- ### ⚠ BREAKING CHANGES
18
-
19
- * bump packages
20
-
21
- * bump packages ([3576fa5](https://github.com/lifinance/bigmi/commit/3576fa55cd7ed3492f29f96a8cff6274313477ff))
22
-
23
- ### [0.5.4](https://github.com/lifinance/bigmi/compare/v0.5.3...v0.5.4) (2025-09-29)
24
-
25
-
26
- ### Bug Fixes
27
-
28
- * **blockchair:** handle zero balance addresses edge case ([#35](https://github.com/lifinance/bigmi/issues/35)) ([a57c5fd](https://github.com/lifinance/bigmi/commit/a57c5fd49ec22df2dd6165725ce2750d81f3267e))
29
-
30
- ### [0.5.3](https://github.com/lifinance/bigmi/compare/v0.5.2...v0.5.3) (2025-09-22)
31
-
32
- ### [0.5.2](https://github.com/lifinance/bigmi/compare/v0.5.1...v0.5.2) (2025-08-28)
33
-
34
-
35
- ### Bug Fixes
36
-
37
- * imports ([6b26572](https://github.com/lifinance/bigmi/commit/6b265727d74bd84d326543a61ab52d4fb0c58ae0))
38
-
39
- ### [0.5.1](https://github.com/lifinance/bigmi/compare/v0.5.0...v0.5.1) (2025-08-28)
40
-
41
-
42
- ### Bug Fixes
43
-
44
- * update connectors to determine chain id based on address ([#33](https://github.com/lifinance/bigmi/issues/33)) ([ae969c9](https://github.com/lifinance/bigmi/commit/ae969c909f6ca4376e4e2468152309251a983910))
45
-
46
- ## [0.5.0](https://github.com/lifinance/bigmi/compare/v0.4.5...v0.5.0) (2025-08-28)
47
-
48
-
49
- ### ⚠ BREAKING CHANGES
50
-
51
- * change chainId to enum (#31)
52
-
53
- * change chainId to enum ([#31](https://github.com/lifinance/bigmi/issues/31)) ([4e93517](https://github.com/lifinance/bigmi/commit/4e93517e50353ffe949c7fd7cebd3313a9d2d69e))
54
-
55
- ### [0.4.5](https://github.com/lifinance/bigmi/compare/v0.4.4...v0.4.5) (2025-08-27)
56
-
57
- ### [0.4.4](https://github.com/lifinance/bigmi/compare/v0.4.3...v0.4.4) (2025-08-18)
58
-
59
- ### [0.4.3](https://github.com/lifinance/bigmi/compare/v0.4.2...v0.4.3) (2025-07-31)
60
-
61
-
62
- ### Bug Fixes
63
-
64
- * **connectors:** remove retry logic when checking if app isAuthorized ([#30](https://github.com/lifinance/bigmi/issues/30)) ([7709d68](https://github.com/lifinance/bigmi/commit/7709d68f67b19880940d68e288ac061ec4f074f8))
65
-
66
- ### [0.4.2](https://github.com/lifinance/bigmi/compare/v0.4.1...v0.4.2) (2025-07-17)
67
-
68
- ### [0.4.1](https://github.com/lifinance/bigmi/compare/v0.4.0...v0.4.1) (2025-07-02)
69
-
70
-
71
- ### Bug Fixes
72
-
73
- * unisat wallet connector ([#24](https://github.com/lifinance/bigmi/issues/24)) ([6466bc5](https://github.com/lifinance/bigmi/commit/6466bc543719b1b26b1cdf990f2dc667659042a4))
74
-
75
- ## [0.4.0](https://github.com/lifinance/bigmi/compare/v0.4.0-beta.2...v0.4.0) (2025-07-01)
76
-
77
-
78
- ### Bug Fixes
79
-
80
- * **client:** update ctrl wallet signPSBT() signature ([#23](https://github.com/lifinance/bigmi/issues/23)) ([f502b92](https://github.com/lifinance/bigmi/commit/f502b924cdc4412f551c39333ae6bab800904975))
81
-
82
- ### [0.3.1](https://github.com/lifinance/bigmi/compare/v0.3.0...v0.3.1) (2025-05-30)
83
-
84
-
85
- ### Features
86
-
87
- * add more connectors (oyl, binance, magicEden & bitget) ([#17](https://github.com/lifinance/bigmi/issues/17)) ([18ad09a](https://github.com/lifinance/bigmi/commit/18ad09acd07726d25bd6422b0ecedd37745be335))
88
-
89
- ## [0.3.0](https://github.com/lifinance/bigmi/compare/v0.2.1...v0.3.0) (2025-05-28)
90
-
91
-
92
- ### ⚠ BREAKING CHANGES
93
-
94
- * add getUTXOs action (#16)
95
-
96
- ### Features
97
-
98
- * add getUTXOs action ([#16](https://github.com/lifinance/bigmi/issues/16)) ([e884c02](https://github.com/lifinance/bigmi/commit/e884c02ad902123a9daf2edaeea2ab777c315925))
99
-
100
- ### [0.2.1](https://github.com/lifinance/bigmi/compare/v0.2.0...v0.2.1) (2025-05-14)
101
-
102
-
103
- ### Bug Fixes
104
-
105
- * optimize usage of supported methods by RPC and API transports ([#15](https://github.com/lifinance/bigmi/issues/15)) ([ff20e08](https://github.com/lifinance/bigmi/commit/ff20e089286bdc5f6f9d12ed2362f95d3c276fd9))
106
-
107
- ## [0.2.0](https://github.com/lifinance/bigmi/compare/v0.1.1...v0.2.0) (2025-05-14)
108
-
109
-
110
- ### ⚠ BREAKING CHANGES
111
-
112
- * remove viem dependencies (#14)
113
-
114
- * remove viem dependencies ([#14](https://github.com/lifinance/bigmi/issues/14)) ([3c3461f](https://github.com/lifinance/bigmi/commit/3c3461f8b646253df0c1614706f4dd5027d53930))
115
-
116
- ### [0.1.1](https://github.com/lifinance/bigmi/compare/v0.0.8...v0.1.1) (2025-02-04)
117
-
118
- ### [0.0.8](https://github.com/lifinance/bigmi/compare/v0.0.7...v0.0.8) (2024-12-30)
119
-
120
-
121
- ### Features
122
-
123
- * add Leather and OneKey wallets ([#7](https://github.com/lifinance/bigmi/issues/7)) ([ac93f66](https://github.com/lifinance/bigmi/commit/ac93f665c8baa24752fd0ad4e2c513b72587060f))
124
-
125
- ### [0.0.7](https://github.com/lifinance/bigmi/compare/v0.0.6...v0.0.7) (2024-12-20)
126
-
127
-
128
- ### Features
129
-
130
- * improve peer dependencies ([#6](https://github.com/lifinance/bigmi/issues/6)) ([a9359d1](https://github.com/lifinance/bigmi/commit/a9359d1f72d5089652bad9311d8cd0ee67c909d4))
131
-
132
- ### [0.0.6](https://github.com/lifinance/bigmi/compare/v0.0.5...v0.0.6) (2024-12-13)
133
-
134
- ### [0.0.5](https://github.com/lifinance/bigmi/compare/v0.0.4...v0.0.5) (2024-12-05)
135
-
136
- ### [0.0.4](https://github.com/lifinance/bigmi/compare/v0.0.3...v0.0.4) (2024-10-28)
137
-
138
-
139
- ### Features
140
-
141
- * add okx wallet ([58b93b5](https://github.com/lifinance/bigmi/commit/58b93b5f8839bbbb0340ff7ac77f03617325c506))
142
-
143
- ### [0.0.3](https://github.com/lifinance/bigmi/compare/v0.0.2...v0.0.3) (2024-10-23)
144
-
145
- ### 0.0.2 (2024-10-17)
146
-
147
-
148
- ### Bug Fixes
149
-
150
- * add createConfig export ([dec450a](https://github.com/lifinance/bigmi/commit/dec450a7e5a071e67e259be78c0b9a8b616c7183))
151
-
152
- ### 0.0.1 (2024-10-15)
153
-
154
-
155
- ### Bug Fixes
156
-
157
- * biome checks ([bc348fa](https://github.com/lifinance/bigmi/commit/bc348faad5cec9ddada1a0c82f4d34e68b85c1c4))
158
- * tsconfig ([bf6ccea](https://github.com/lifinance/bigmi/commit/bf6cceae3a1602b99b4825ee3695b367d5935226))
package/package.json.tmp DELETED
@@ -1,73 +0,0 @@
1
- {
2
- "name": "@bigmi/core",
3
- "version": "0.6.3-alpha.1",
4
- "description": "TypeScript library for Bitcoin apps.",
5
- "type": "module",
6
- "main": "./src/index.ts",
7
- "types": "./src/index.d.ts",
8
- "sideEffects": false,
9
- "scripts": {
10
- "watch": "tsc -w -p ./tsconfig.json",
11
- "build": "pnpm clean && pnpm build:version && pnpm build:esm && pnpm build:cjs && pnpm build:types && pnpm build:clean",
12
- "build:cjs": "tsc --project ./tsconfig.json --module commonjs --outDir ./dist/cjs --removeComments --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
13
- "build:esm": "tsc --project ./tsconfig.json --module es2015 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json",
14
- "build:types": "tsc --project ./tsconfig.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
15
- "build:prerelease": "node ../../scripts/prerelease.js && cpy '../../*.md' .",
16
- "build:postrelease": "node ../../scripts/postrelease.js && rm -rf *.md",
17
- "build:clean": "rm -rf tsconfig.tsbuildinfo ./dist/tsconfig.tsbuildinfo",
18
- "build:version": "node ../../scripts/version.js",
19
- "clean": "pnpm build:clean && rm -rf dist",
20
- "check:types": "tsc --noEmit",
21
- "check:circular-deps": "madge --circular $(find ./src -name '*.ts' -o -name '*.tsx')",
22
- "check:circular-deps-graph": "madge --circular $(find ./src -name '*.ts' -o -name '*.tsx') --image graph.svg",
23
- "test": "vitest",
24
- "coverage": "vitest run --coverage"
25
- },
26
- "author": "Eugene Chybisov <eugene@li.finance>",
27
- "homepage": "https://github.com/lifinance/bigmi",
28
- "repository": {
29
- "type": "git",
30
- "url": "https://github.com/lifinance/bigmi.git",
31
- "directory": "packages/core"
32
- },
33
- "bugs": {
34
- "url": "https://github.com/lifinance/bigmi/issues"
35
- },
36
- "license": "MIT",
37
- "keywords": [
38
- "bitcoin",
39
- "bitcoinjs",
40
- "btc",
41
- "utxo",
42
- "web3",
43
- "dapp",
44
- "typescript"
45
- ],
46
- "dependencies": {
47
- "@noble/hashes": "^1.8.0",
48
- "bech32": "^2.0.0",
49
- "bitcoinjs-lib": "^7.0.0",
50
- "bs58": "^6.0.0",
51
- "eventemitter3": "^5.0.1",
52
- "zustand": "^5.0.8"
53
- },
54
- "devDependencies": {
55
- "@vitest/coverage-v8": "^4.0.12",
56
- "cpy-cli": "^6.0.0",
57
- "madge": "^8.0.0",
58
- "typescript": "^5.9.3",
59
- "vitest": "^4.0.12"
60
- },
61
- "peerDependencies": {
62
- "bs58": "^6.0.0"
63
- },
64
- "files": [
65
- "dist/**",
66
- "!dist/**/*.tsbuildinfo",
67
- "src/**/*.ts",
68
- "!src/**/*.spec.ts",
69
- "!*.tmp",
70
- "!*.env",
71
- "!tsconfig.json"
72
- ]
73
- }
@@ -1,33 +0,0 @@
1
- import { describe, expect, it } from 'vitest'
2
- import { getBalance } from '../actions/getBalance.js'
3
- import { createClient, rpcSchema } from '../factories/createClient.js'
4
- import { mempool } from '../transports/mempool/mempool.js'
5
- import type { UTXOSchema } from '../transports/types.js'
6
- import { bitcoinSignet } from './signet.js'
7
-
8
- const shouldSkipIntegration = !process.env.ENABLE_INTEGRATION_TESTS
9
-
10
- const TESTNET_ADDRESS =
11
- 'tb1p0d22lal2kve68h278yyqdl99cntymc9p37qd8uaj4ym7233c2k5s57m4sa'
12
-
13
- describe('Real Testnet Integration', () => {
14
- it.skipIf(shouldSkipIntegration)(
15
- 'should fetch real balance from testnet',
16
- async () => {
17
- const realTestnetClient = createClient({
18
- chain: bitcoinSignet,
19
- rpcSchema: rpcSchema<UTXOSchema>(),
20
- transport: mempool({
21
- baseUrl: 'https://mempool.space/signet/api',
22
- }),
23
- })
24
-
25
- const balance = await getBalance(realTestnetClient, {
26
- address: TESTNET_ADDRESS,
27
- })
28
-
29
- expect(typeof balance).toBe('bigint')
30
- expect(balance).toBeGreaterThanOrEqual(BigInt(0))
31
- }
32
- )
33
- })
@@ -1,9 +0,0 @@
1
- {
2
- "address": "bc1qpvk0kjdg0kantu9z78qz7gqk53q643auz33yaw",
3
- "balance": "33206",
4
- "totalReceived": "424052",
5
- "totalSent": "390846",
6
- "unconfirmedBalance": "0",
7
- "unconfirmedTxs": 0,
8
- "txs": 19
9
- }
@@ -1,3 +0,0 @@
1
- {
2
- "error": "Internal server error"
3
- }
@@ -1,51 +0,0 @@
1
- {
2
- "txid": "f5742112a67781b7a4edf0f8a4947f2de7ace7d0d1676ad210a864090dfbb0b5",
3
- "hash": "a6cb5bb2b04e707e908877768698704532a39e7c722bdaf738e41d8322da5499",
4
- "version": 2,
5
- "size": 222,
6
- "vsize": 141,
7
- "weight": 561,
8
- "locktime": 901525,
9
- "vin": [
10
- {
11
- "txid": "8cfe185ae02d74903d7adb6143dcc5c752486511c3e64bfef4d97a1f7eaf7b70",
12
- "vout": 0,
13
- "scriptSig": { "asm": "", "hex": "" },
14
- "txinwitness": [
15
- "3044022060621e82e159b1745fc9bfd9f559bef82292e1d231c76df654618c575f9bda2c02203d0cf3369bb0665bba0f53ed03d0adc6e6eff66914b81a39ebff6c629b618cc901",
16
- "0253255ff7355f4dbcc6abf7b69c193db6465cbf69490b0427e3c510289421f78c"
17
- ],
18
- "sequence": 4294967293
19
- }
20
- ],
21
- "vout": [
22
- {
23
- "value": 0.02916852,
24
- "n": 0,
25
- "scriptPubKey": {
26
- "asm": "0 299ee6ccdbf83eaae4e7b40a378af3e0db286670",
27
- "desc": "addr(bc1q9x0wdnxmlql24e88ks9r0zhnurdjsens486axv)#k5n52ns5",
28
- "hex": "0014299ee6ccdbf83eaae4e7b40a378af3e0db286670",
29
- "address": "bc1q9x0wdnxmlql24e88ks9r0zhnurdjsens486axv",
30
- "type": "witness_v0_keyhash"
31
- }
32
- },
33
- {
34
- "value": 0.02939571,
35
- "n": 1,
36
- "scriptPubKey": {
37
- "asm": "0 a49003a69b99395bedd4eae792ece26568f41fe5",
38
- "desc": "addr(bc1q5jgq8f5mnyu4hmw5atne9m8zv450g8l9uhf3me)#jr0v2n0x",
39
- "hex": "0014a49003a69b99395bedd4eae792ece26568f41fe5",
40
- "address": "bc1q5jgq8f5mnyu4hmw5atne9m8zv450g8l9uhf3me",
41
- "type": "witness_v0_keyhash"
42
- }
43
- }
44
- ],
45
- "hex": "02000000000101707baf7e1f7ad9f4fe4be6c311654852c7c5dc4361db7a3d90742de05a18fe8c0000000000fdffffff02f4812c0000000000160014299ee6ccdbf83eaae4e7b40a378af3e0db286670b3da2c0000000000160014a49003a69b99395bedd4eae792ece26568f41fe502473044022060621e82e159b1745fc9bfd9f559bef82292e1d231c76df654618c575f9bda2c02203d0cf3369bb0665bba0f53ed03d0adc6e6eff66914b81a39ebff6c629b618cc901210253255ff7355f4dbcc6abf7b69c193db6465cbf69490b0427e3c510289421f78c95c10d00",
46
- "blockhash": "00000000000000000000424244f4cc05ce659d674d0980cdad000dd72cbe0d8d",
47
- "confirmations": 2,
48
- "time": 1750086075,
49
- "blocktime": 1750086075,
50
- "fees": 300
51
- }