-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03eb03e
commit 8231c49
Showing
8 changed files
with
680 additions
and
682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { DkgPublicKey } from '@nucypher/nucypher-core'; | ||
|
||
import { fromHexString } from '../../src/utils'; | ||
|
||
describe('Ritual', () => { | ||
it('deserializes premade dkg ritual', async () => { | ||
const pkWord1 = fromHexString( | ||
'9045795411ed251bf2eecc9415552c41863502a207104ef7ab482bc2364729d9' | ||
); | ||
const pkWord2 = fromHexString('b99e2949cee8d888663b2995fc647fcf'); | ||
|
||
// We need to concat two words returned by the DKG contract | ||
const dkgPkBytes = new Uint8Array([...pkWord1, ...pkWord2]); | ||
expect(dkgPkBytes.length).toEqual(48); | ||
|
||
const dkgPk = DkgPublicKey.fromBytes(dkgPkBytes); | ||
expect(dkgPk.toBytes()).toEqual(dkgPkBytes); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.