From 4ec46dd65d48e5a3d08ba3d78c6a28185ea9f900 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Tue, 14 Feb 2023 17:00:11 +0000 Subject: [PATCH] Remove scure-base from top-level dep --- package-lock.json | 1 - package.json | 1 - test/stark/stark.test.js | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index ce61bd2..7c3488a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,6 @@ "@noble/hashes": "1.2.0" }, "devDependencies": { - "@scure/base": "~1.1.1", "@scure/bip32": "~1.1.5", "@scure/bip39": "~1.1.1", "@types/node": "18.11.3", diff --git a/package.json b/package.json index 7a7e768..05e7edd 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "@noble/hashes": "1.2.0" }, "devDependencies": { - "@scure/base": "~1.1.1", "@scure/bip32": "~1.1.5", "@scure/bip39": "~1.1.1", "@types/node": "18.11.3", diff --git a/test/stark/stark.test.js b/test/stark/stark.test.js index 4e2b6b9..d193de7 100644 --- a/test/stark/stark.test.js +++ b/test/stark/stark.test.js @@ -1,6 +1,6 @@ import { deepStrictEqual, throws } from 'assert'; import { describe, should } from 'micro-should'; -import { hex, utf8 } from '@scure/base'; +import { utf8ToBytes } from '@noble/hashes/utils.js'; import * as bip32 from '@scure/bip32'; import * as bip39 from '@scure/bip39'; import * as starknet from '../../lib/esm/stark.js'; @@ -9,7 +9,7 @@ import { default as precomputedKeys } from './fixtures/keys_precomputed.json' as describe('starknet', () => { should('custom keccak', () => { - const value = starknet.keccak(utf8.decode('hello')); + const value = starknet.keccak(utf8ToBytes('hello')); deepStrictEqual(value, 0x8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8n); deepStrictEqual(value < 2n ** 250n, true); });