Skip to content

Commit

Permalink
fix: remove js-sha3
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Feb 26, 2024
1 parent b20a910 commit 794462a
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 17 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
"async-mutex": "^0.4.1",
"elliptic": "^6.5.4",
"ethers": "^5.7.2",
"js-sha3": "0.9.3",
"long": "^5.2.3"
},
"devDependencies": {
Expand Down
1 change: 0 additions & 1 deletion rollup.config.bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const external = [
'crypto',
'elliptic',
'ethers',
'js-sha3',
'long',
]

Expand Down
1 change: 0 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const external = [
'crypto',
'elliptic',
'ethers',
'js-sha3',
'long',
]

Expand Down
4 changes: 1 addition & 3 deletions src/authn/LocalAuthenticator.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import sha3 from 'js-sha3'
import { authn, signature, publicKey } from '@xmtp/proto'
import AuthData from './AuthData'
import { PrivateKey } from '../crypto'
import { hexToBytes } from '../crypto/utils'
import Token from './Token'

const { keccak256 } = sha3
import { keccak256 } from 'viem'

export default class LocalAuthenticator {
private identityKey: PrivateKey
Expand Down
4 changes: 1 addition & 3 deletions test/authn/Authn.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sha3 from 'js-sha3'
import Long from 'long'
import { PrivateKey, PrivateKeyBundleV1, Signature } from '../../src/crypto'
import Authenticator from '../../src/authn/LocalAuthenticator'
Expand All @@ -7,8 +6,7 @@ import { hexToBytes } from '../../src/crypto/utils'
import { newWallet, sleep } from '../helpers'
import { Wallet } from 'ethers'
import AuthCache from '../../src/authn/AuthCache'

const { keccak256 } = sha3
import { keccak256 } from 'viem'

describe('authn', () => {
let authenticator: Authenticator
Expand Down
8 changes: 0 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2571,7 +2571,6 @@ __metadata:
ethers: "npm:^5.7.2"
happy-dom: "npm:^13.6.2"
husky: "npm:^7.0.4"
js-sha3: "npm:0.9.3"
long: "npm:^5.2.3"
prettier: "npm:^3.2.5"
prettier-plugin-packagejson: "npm:^2.4.12"
Expand Down Expand Up @@ -6289,13 +6288,6 @@ __metadata:
languageName: node
linkType: hard

"js-sha3@npm:0.9.3":
version: 0.9.3
resolution: "js-sha3@npm:0.9.3"
checksum: 10/8daacb93b18609a0dc081f2f6199b80a96df36f9975b4b9c7476ae92822e07100b9e1969fc76f4b58e703cd6175f0de7656a99cbb2335cfb554c66f988fbead5
languageName: node
linkType: hard

"js-tokens@npm:^4.0.0":
version: 4.0.0
resolution: "js-tokens@npm:4.0.0"
Expand Down

0 comments on commit 794462a

Please sign in to comment.