@wallfree-dev/coinlib-core 0.13.43-beta.19 → 0.13.43-beta.20

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.
@@ -7,8 +7,8 @@
7
7
  6 silly config load:file:/opt/hostedtoolcache/node/18.20.8/x64/etc/npmrc
8
8
  7 verbose title npm publish
9
9
  8 verbose argv "publish" "--cache" ".npm-cache" "--tag" "next" "--access" "public"
10
- 9 verbose logfile logs-max:10 dir:/home/runner/work/airgap-coin-lib/airgap-coin-lib/packages/core/dist/.npm-cache/_logs/2026-03-04T15_20_30_707Z-
11
- 10 verbose logfile /home/runner/work/airgap-coin-lib/airgap-coin-lib/packages/core/dist/.npm-cache/_logs/2026-03-04T15_20_30_707Z-debug-0.log
10
+ 9 verbose logfile logs-max:10 dir:/home/runner/work/airgap-coin-lib/airgap-coin-lib/packages/core/dist/.npm-cache/_logs/2026-03-07T11_51_22_566Z-
11
+ 10 verbose logfile /home/runner/work/airgap-coin-lib/airgap-coin-lib/packages/core/dist/.npm-cache/_logs/2026-03-07T11_51_22_566Z-debug-0.log
12
12
  11 verbose publish [ '.' ]
13
13
  12 silly logfile done cleaning log files
14
14
  13 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
@@ -16,8 +16,18 @@ var bs58checkBase = require('../../bs58check-2.1.2/base')
16
16
 
17
17
  var fastcurve = require('./fastcurve')
18
18
 
19
+ function isCompatibleECPair (value) {
20
+ if (!value || typeof value !== 'object') return false
21
+
22
+ var hasPublicKey = typeof value.getPublicKeyBuffer === 'function'
23
+ var hasNetwork = typeof value.getNetwork === 'function'
24
+ var hasSignVerify = typeof value.sign === 'function' && typeof value.verify === 'function'
25
+
26
+ return value.compressed === true && hasPublicKey && hasNetwork && hasSignVerify
27
+ }
28
+
19
29
  function HDNode (keyPair, chainCode) {
20
- typeforce(types.tuple('ECPair', types.Buffer256bit), arguments)
30
+ typeforce(types.tuple(isCompatibleECPair, types.Buffer256bit), arguments)
21
31
 
22
32
  if (!keyPair.compressed) throw new TypeError('BIP32 only allows compressed keyPairs')
23
33
 
@@ -16,8 +16,22 @@ function Satoshi (value) {
16
16
  }
17
17
 
18
18
  // external dependent types
19
- var BigInt = typeforce.quacksLike('BigInteger')
20
- var ECPoint = typeforce.quacksLike('Point')
19
+ function BigInt (value) {
20
+ return !!value &&
21
+ typeof value === 'object' &&
22
+ typeof value.toBuffer === 'function' &&
23
+ typeof value.compareTo === 'function' &&
24
+ typeof value.signum === 'function'
25
+ }
26
+ BigInt.toJSON = function () { return 'BigInteger' }
27
+
28
+ function ECPoint (value) {
29
+ return !!value &&
30
+ typeof value === 'object' &&
31
+ typeof value.getEncoded === 'function' &&
32
+ typeof value.add === 'function'
33
+ }
34
+ ECPoint.toJSON = function () { return 'Point' }
21
35
 
22
36
  // exposed, external API
23
37
  var ECSignature = typeforce.compile({ r: BigInt, s: BigInt })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallfree-dev/coinlib-core",
3
- "version": "0.13.43-beta.19",
3
+ "version": "0.13.43-beta.20",
4
4
  "description": "The @wallfree-dev/coinlib-core is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.",
5
5
  "keywords": [
6
6
  "airgap",