fix: add PublicKey createWithSeed method
This commit is contained in:
committed by
Michael Vines
parent
e0e3094370
commit
fc77e55920
@ -223,3 +223,43 @@ test('equals (II)', () => {
|
||||
|
||||
expect(key1.equals(key2)).toBe(true);
|
||||
});
|
||||
|
||||
test('createWithSeed', () => {
|
||||
const defaultPublicKey = new PublicKey([
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
]);
|
||||
const derivedKey = PublicKey.createWithSeed(defaultPublicKey, 'limber chicken: 4/45', defaultPublicKey);
|
||||
|
||||
expect(derivedKey.equals(new PublicKey('9h1HyLCW5dZnBVap8C5egQ9Z6pHyjsh5MNy83iPqqRuq'))).toBe(true);
|
||||
});
|
||||
|
Reference in New Issue
Block a user