Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix js-sha3 import #520

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: update js-sha3 import
  • Loading branch information
rygine committed Jan 16, 2024
commit e7766bec58f497818dcdff302a82d6798dd3de6e
4 changes: 3 additions & 1 deletion src/authn/LocalAuthenticator.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { keccak256 } from 'js-sha3'
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

export default class LocalAuthenticator {
private identityKey: PrivateKey

4 changes: 3 additions & 1 deletion test/authn/Authn.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { keccak256 } from 'js-sha3'
import sha3 from 'js-sha3'
import Long from 'long'
import { PrivateKey, PrivateKeyBundleV1, Signature } from '../../src/crypto'
import Authenticator from '../../src/authn/LocalAuthenticator'
@@ -8,6 +8,8 @@ import { newWallet, sleep } from '../helpers'
import { Wallet } from 'ethers'
import AuthCache from '../../src/authn/AuthCache'

const { keccak256 } = sha3

describe('authn', () => {
let authenticator: Authenticator
let privateKey: PrivateKey