Skip to content

Commit f61371c

Browse files
committed
chore: removed un-used exports
1 parent bc6358f commit f61371c

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

src/types.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
/// <reference types="node" />
2-
import { Buffer as NBuffer } from 'buffer';
32
export declare const typeforce: any;
4-
export declare const ZERO32: NBuffer;
5-
export declare const EC_P: NBuffer;
6-
export declare const GROUP_ORDER: NBuffer;
73
export declare function isPoint(p: Buffer | number | undefined | null): boolean;
84
export declare function UInt31(value: number): boolean;
95
export declare function BIP32Path(value: string): boolean;

src/types.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
'use strict';
22
Object.defineProperty(exports, '__esModule', { value: true });
3-
exports.oneOf = exports.Null = exports.BufferN = exports.Function = exports.UInt32 = exports.UInt8 = exports.tuple = exports.maybe = exports.Hex = exports.Buffer = exports.String = exports.Boolean = exports.Array = exports.Number = exports.Hash256bit = exports.Hash160bit = exports.Buffer256bit = exports.Network = exports.ECPoint = exports.Satoshi = exports.Signer = exports.BIP32Path = exports.UInt31 = exports.isPoint = exports.GROUP_ORDER = exports.EC_P = exports.ZERO32 = exports.typeforce = void 0;
3+
exports.oneOf = exports.Null = exports.BufferN = exports.Function = exports.UInt32 = exports.UInt8 = exports.tuple = exports.maybe = exports.Hex = exports.Buffer = exports.String = exports.Boolean = exports.Array = exports.Number = exports.Hash256bit = exports.Hash160bit = exports.Buffer256bit = exports.Network = exports.ECPoint = exports.Satoshi = exports.Signer = exports.BIP32Path = exports.UInt31 = exports.isPoint = exports.typeforce = void 0;
44
const buffer_1 = require('buffer');
55
exports.typeforce = require('typeforce');
6-
exports.ZERO32 = buffer_1.Buffer.alloc(32, 0);
7-
exports.EC_P = buffer_1.Buffer.from(
6+
const ZERO32 = buffer_1.Buffer.alloc(32, 0);
7+
const EC_P = buffer_1.Buffer.from(
88
'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f',
99
'hex',
1010
);
11-
exports.GROUP_ORDER = buffer_1.Buffer.from(
12-
'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141',
13-
'hex',
14-
);
1511
function isPoint(p) {
1612
if (!buffer_1.Buffer.isBuffer(p)) return false;
1713
if (p.length < 33) return false;
1814
const t = p[0];
1915
const x = p.slice(1, 33);
20-
if (x.compare(exports.ZERO32) === 0) return false;
21-
if (x.compare(exports.EC_P) >= 0) return false;
16+
if (x.compare(ZERO32) === 0) return false;
17+
if (x.compare(EC_P) >= 0) return false;
2218
if ((t === 0x02 || t === 0x03) && p.length === 33) {
2319
return true;
2420
}
2521
const y = p.slice(33);
26-
if (y.compare(exports.ZERO32) === 0) return false;
27-
if (y.compare(exports.EC_P) >= 0) return false;
22+
if (y.compare(ZERO32) === 0) return false;
23+
if (y.compare(EC_P) >= 0) return false;
2824
if (t === 0x04 && p.length === 65) return true;
2925
return false;
3026
}

ts_src/types.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ import { Buffer as NBuffer } from 'buffer';
22

33
export const typeforce = require('typeforce');
44

5-
export const ZERO32 = NBuffer.alloc(32, 0);
6-
export const EC_P = NBuffer.from(
5+
const ZERO32 = NBuffer.alloc(32, 0);
6+
const EC_P = NBuffer.from(
77
'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f',
88
'hex',
99
);
10-
export const GROUP_ORDER = NBuffer.from(
11-
'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141',
12-
'hex',
13-
);
1410

1511
export function isPoint(p: Buffer | number | undefined | null): boolean {
1612
if (!NBuffer.isBuffer(p)) return false;

0 commit comments

Comments
 (0)