secretkeylabs / sats-connect-example

38 stars 28 forks source link

How to form a OP_RETURN output with sats-connect #7

Closed abhishek-Kumar009 closed 11 months ago

abhishek-Kumar009 commented 1 year ago

Hey guys i have been trying to form OP_RETURN output using sats-connect

I have to send an EVM address (20bytes) in OP_RETURN data for my dApp

Please help me here: I've reached this far in figuring this out

tx.addOutput({
      script: btc.Script.encode([
        'RETURN',
        new TextEncoder().encode('abc')
      ]),
      amount: 0n
    })
yknl commented 11 months ago

Added in https://github.com/secretkeylabs/sats-connect-example/pull/6