Expose privkey_tweak_add

This commit is contained in:
Richard Ramos 2020-11-12 19:22:47 -04:00 committed by zah
parent fb9699702b
commit 9387bd8b2d
1 changed files with 4 additions and 0 deletions

View File

@ -517,3 +517,7 @@ proc default*(T: type SkSignature): T {.error: "loophole".}
proc default*(T: type SkRecoverableSignature): T {.error: "loophole".} proc default*(T: type SkRecoverableSignature): T {.error: "loophole".}
proc default*(T: type SkEcdhSecret): T {.error: "loophole".} proc default*(T: type SkEcdhSecret): T {.error: "loophole".}
proc default*(T: type SkEcdhRawSecret): T {.error: "loophole".} proc default*(T: type SkEcdhRawSecret): T {.error: "loophole".}
func privKeyTweakAdd*(secretKey: var openArray[byte], tweak: openArray[byte]) =
let res = secp256k1_ec_privkey_tweak_add(getContext(), secretKey.ptr0, tweak.ptr0)
doAssert res == 1