bitcoin-sv / ts-sdk

Other
51 stars 13 forks source link

[BUG] pubKey.toDER() should probably return an number[] rather than a String #110

Closed sirdeggen closed 3 months ago

sirdeggen commented 3 months ago

Bug Description

I don't think any method exists to return the public key in DER encoding as a number array as you'd expect to push to a P2PK script for example.

Steps to Reproduce

import { PrivateKey } from '@bsv/sdk'

const k = PrivateKey.fromRandom()
k.toPublicKey().toDER()

Returns a string.

Expected Behavior

Return DER format number[]