Home Bitcoin segregated witness – What do the next traces of code do within the context of sending Bitcoin?

segregated witness – What do the next traces of code do within the context of sending Bitcoin?

0
segregated witness – What do the next traces of code do within the context of sending Bitcoin?

[ad_1]

I’ve lately began dev on Bitcoin and have a doubt relating to the next code. I’ve a dApp that prompts customers to attach their BTC Pockets and in return, I get their handle(testnet).

I wish to perceive this piece of code from this hyperlink
https://docs.xverse.app/sats-connect/creating-psbts

How will we get this 02818b7ff740a40f311d002123087053d5d9e0e1546674aedb10e15a5b57fd3985

Provided that we will solely obtain the handle of the person which is on this format

tb1q32vcpx59fucfc0jmd3hd3uqvpdwuq85j024qfl

on the profitable connection of the BTC pockets

Is there any strategy to convert the traditional handle to the lengthy type of the handle talked about above?

const publicKey = hex.encode("02818b7ff740a40f311d002123087053d5d9e0e1546674aedb10e15a5b57fd3985")
const p2wpkh = btc.p2wpkh(publicKey, bitcoinTestnet);
const p2sh = btc.p2sh(p2wpkh, bitcoinTestnet);

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here