Skip to content

Commit

Permalink
feat: we decided to go to default ed25519
Browse files Browse the repository at this point in the history
  • Loading branch information
Dudleyneedham committed Aug 25, 2023
1 parent 6f323fd commit 3fd34dd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import { cryptoWaitReady } from '@polkadot/util-crypto'
import { GenericContainer, Wait } from 'testcontainers'
import { ctypeDomainLinkage } from '../wellKnownDidConfiguration'

const signingKeyPairType = 'sr25519'

export const faucet = async () => {
await cryptoWaitReady()
const keyring = new Utils.Keyring({ ss58Format: 38, type: 'ed25519' })
Expand All @@ -37,9 +35,9 @@ export async function fundAccount(address: KiltKeyringPair['address'], amount: B
}

export async function keypairs(mnemonic: string) {
const authentication = Utils.Crypto.makeKeypairFromUri(mnemonic, signingKeyPairType)
const authentication = Utils.Crypto.makeKeypairFromUri(mnemonic, 'ed25519')

const assertionMethod = Utils.Crypto.makeKeypairFromUri(mnemonic, signingKeyPairType)
const assertionMethod = Utils.Crypto.makeKeypairFromUri(mnemonic, 'ed25519')

const keyAgreement = Utils.Crypto.makeEncryptionKeypairFromSeed(Utils.Crypto.mnemonicToMiniSecret(mnemonic))

Expand All @@ -51,7 +49,6 @@ export async function keypairs(mnemonic: string) {
}

export async function generateDid(account: KiltKeyringPair, mnemonic: string): Promise<DidDocument> {

const { authentication, assertionMethod, keyAgreement } = await keypairs(mnemonic)

const uri = Did.getFullDidUriFromKey(authentication)
Expand Down

0 comments on commit 3fd34dd

Please sign in to comment.