computeTweakedKey()
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / computeTweakedKey
Function: computeTweakedKey()
Section titled “Function: computeTweakedKey()”computeTweakedKey(
internalKey,merkleRoot?):object
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:5959
Compute tweaked public key for Taproot Implements BIP-341: P’ = P + hash_TapTweak(P || merkle_root) * G
Parameters
Section titled “Parameters”internalKey
Section titled “internalKey”Uint8Array
32-byte x-only internal public key
merkleRoot?
Section titled “merkleRoot?”Uint8Array<ArrayBufferLike>
Optional 32-byte merkle root of tapscript tree
Returns
Section titled “Returns”object
Tweaked x-only public key and parity
tweakedKey
Section titled “tweakedKey”tweakedKey:
Uint8Array
parity
Section titled “parity”parity:
number