Code Monkey home page Code Monkey logo

sats-connect-example's People

Contributors

aryzing avatar dhriaznov avatar imamah-zafar avatar m-aboelenein avatar ndanhkhoi avatar teebszet avatar victorkirov avatar yknl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sats-connect-example's Issues

How can I verify message signatures

I have the following code in my frontend, how would I verify that the signature is correct in the backend?

import {
  signMessage,
  SignMessageOptions,
} from "sats-connect";

async signMessage(
  address: string,
  msg: string,
): Promise<string> {
  return new Promise(async (resolve, reject) => {
    const signMessageOptions: SignMessageOptions = {
      payload: {
        message: "foobar",
        address,
        network: {
          type: "Mainnet",
        },
      },
      onFinish: (response) => resolve(response),
      onCancel: () => reject(new Error()),
    };

    await signMessage(signMessageOptions);
  });
}

How to form a OP_RETURN output with sats-connect

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
    })

signTransaction fails to add digital signature to TapRoot Ordinal address

When I use the sats-connect-example app as it is without any changes, and generate a PSBT and sign it it fails to broadcast it onto the network. I did some digging by copying base64 of signed transaction, and it fails to broadcast it even on Sparrow wallet:

non-mandatory-script-verify-flag (Witness program was passed an empty witness)

I checked and there is no signature for the Ordinal lock script to unlock the funds. So it means the signTransaction fails to add the signature. It does add for Paying address but not for Ordinal address.

Broadcast Psbt on testnet

i am creating a psbt following the sats connect example. i am able to create it and also sign it. If i set broadcast: false i get back the signed psbt. if i set it to true, it shows it correctly in the wallet, but then when i click confirm it shows a 400 error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.