Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
devinivy committed Oct 30, 2023
1 parent 28ea1bd commit f8c4611
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1",
"uint8arrays": "3.0.0"
},
"devDependencies": {
"@atproto/common": "workspace:^"
}
}
2 changes: 1 addition & 1 deletion packages/crypto/tests/signatures.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import fs from 'node:fs'
import * as uint8arrays from 'uint8arrays'
import { secp256k1 as nobleK256 } from '@noble/curves/secp256k1'
import { p256 as nobleP256 } from '@noble/curves/p256'
import { cborEncode } from '@atproto/common'
import EcdsaKeypair from '../src/p256/keypair'
import Secp256k1Keypair from '../src/secp256k1/keypair'
import * as p256 from '../src/p256/operations'
import * as secp from '../src/secp256k1/operations'
import { cborEncode } from '@atproto/common'
import {
bytesToMultibase,
multibaseToBytes,
Expand Down
12 changes: 8 additions & 4 deletions packages/pds/tests/entryway.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import assert from 'node:assert'
import * as os from 'node:os'
import * as path from 'node:path'
import AtpAgent from '@atproto/api'
Expand All @@ -23,7 +24,7 @@ describe('entryway', () => {
entrywayJwtVerifyKeyK256PublicKeyHex: getPublicHex(jwtSigningKey),
entrywayPlcRotationKeyK256PublicKeyHex: getPublicHex(plcRotationKey),
adminPassword: 'admin-pass',
serviceHandleDomains: ['.test'], // @TODO
serviceHandleDomains: [],
didPlcUrl: plc.url,
serviceDid: 'did:example:pds',
inviteRequired: false,
Expand Down Expand Up @@ -125,8 +126,10 @@ const moveAccountToPds = async (
services: { entryway: pdsEntryway.PDS; plc: TestPlc },
) => {
const { entryway, plc } = services
const plcClient = plc.getClient()
const doc = await plcClient.getDocumentData(did)
const account = await entryway.ctx.services
.account(entryway.ctx.db)
.getAccount(did)
assert(account)
const signingKey = await Secp256k1Keypair.create({ exportable: true })
const commit = await pds.ctx.actorStore.create(
did,
Expand All @@ -138,12 +141,13 @@ const moveAccountToPds = async (
await pds.ctx.accountManager.createAccount({
did,
email: `${did}@email.invalid`,
handle: doc.alsoKnownAs[0].replace('at://', ''),
handle: account.handle,
password: randomStr(8, 'base32'),
repoCid: commit.cid,
repoRev: commit.rev,
inviteCode: undefined,
})
const plcClient = plc.getClient()
await plcClient.updatePds(
did,
entryway.ctx.plcRotationKey,
Expand Down
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f8c4611

Please sign in to comment.