feat: add borsh utilities and public key support (#17239)
* feat: add borsh utilities and public key support * fix: make bn internal for flow * fix: add Buffer import in borsh file
This commit is contained in:
@ -342,4 +342,11 @@ describe('PublicKey', function () {
|
||||
);
|
||||
expect(PublicKey.isOnCurve(offCurve.toBuffer())).to.be.false;
|
||||
});
|
||||
|
||||
it('canBeSerializedWithBorsh', () => {
|
||||
const publicKey = Keypair.generate().publicKey;
|
||||
const encoded = publicKey.encode();
|
||||
const decoded = PublicKey.decode(encoded);
|
||||
expect(decoded.equals(publicKey)).to.be.true;
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user