Skip to content

Commit 91b511b

Browse files
ahsan-javaidjanniks
authored andcommitted
fix: offload bn.js dependency
1 parent 8b41449 commit 91b511b

File tree

28 files changed

+845
-555
lines changed

28 files changed

+845
-555
lines changed

package-lock.json

Lines changed: 45 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/bns/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@
4242
"dependencies": {
4343
"@stacks/common": "^4.0.1",
4444
"@stacks/network": "^4.0.1",
45-
"@stacks/transactions": "^4.0.0",
46-
"@types/bn.js": "^4.11.6",
47-
"bn.js": "^5.2.0"
45+
"@stacks/transactions": "^4.0.0"
4846
},
4947
"devDependencies": {
5048
"@types/jest": "^26.0.22",

packages/bns/src/utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { Buffer } from '@stacks/common';
22
import { bufferCV, uintCV, hash160 } from '@stacks/transactions';
33

4-
import BN from 'bn.js';
5-
64
export function decodeFQN(fqdn: string): {
75
name: string;
86
namespace: string;
@@ -30,6 +28,6 @@ export function decodeFQN(fqdn: string): {
3028

3129
export const bufferCVFromString = (string: string) => bufferCV(Buffer.from(string));
3230

33-
export const uintCVFromBN = (int: BN) => uintCV(int.toString(10));
31+
export const uintCVFromBN = (int: bigint) => uintCV(int.toString(10));
3432

3533
export const getZonefileHash = (zonefile: string) => hash160(Buffer.from(zonefile));

0 commit comments

Comments
 (0)