unisat-wallet / dev-support

30 stars 19 forks source link

Get the txId without submitting a tx #2

Closed elRaulito closed 6 months ago

elRaulito commented 7 months ago

I would like to request 2 features:

  1. Signing a rawTx I created externally
  2. Being able to get the txId without submitting it (this allows to create transactions based on this one)
slient-coder commented 6 months ago

https://github.com/unisat-wallet/dev-support/blob/master/wallet-sdk-examples/example/send-btc.ts#L62 You can refer to this.

 const tx = psbt.extractTransaction(true);
 const txid = tx.getId();