Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sending btc transactions with schnorr multi-signature #72

Open
robertcc0410 opened this issue Dec 15, 2023 · 5 comments
Open

sending btc transactions with schnorr multi-signature #72

robertcc0410 opened this issue Dec 15, 2023 · 5 comments
Assignees

Comments

@robertcc0410
Copy link

l2-->l1 sending btc transactions with schnorr multi-signature

@robertcc0410 robertcc0410 added this to the b2 testnet v1.0.0 milestone Dec 15, 2023
@robertcc0410 robertcc0410 self-assigned this Dec 15, 2023
@robertcc0410 robertcc0410 moved this to In Progress in b2network Dec 15, 2023
@oxf71
Copy link
Collaborator

oxf71 commented Jan 2, 2024

@oxf71
Copy link
Collaborator

oxf71 commented Jan 4, 2024

schnorr musig2 demo:

https://github.com/oxf71/musig2-demo

@oxf71
Copy link
Collaborator

oxf71 commented Jan 8, 2024

taproot transaction use musig2 example:
https://github.com/oxf71/musig2-demo/blob/main/example/taprootmusig/main.go

todo:

  • Research the use of schnorr musig2 for transfers: @robertcc0410
  • Improve the method of schnorr musig2: @oxf71

@github-project-automation github-project-automation bot moved this from In Progress to Done in b2network Jan 12, 2024
@robertcc0410 robertcc0410 reopened this Jan 12, 2024
@robertcc0410
Copy link
Author

robertcc0410 commented Jan 12, 2024

schnorr multi-signature done(n-n)
Notice:

	unspentOutputs := make([]*btcapi.UnspentOutput, 0)
	for _, utxo := range utxos {
		txHash, err := chainhash.NewHashFromStr(utxo.Txid)
		if err != nil {
			return nil, err
		}
		pkScript, err := txscript.PayToAddrScript(address)
		if err != nil {
			return nil, err
		}

		unspentOutputs = append(unspentOutputs, &btcapi.UnspentOutput{
			Outpoint: wire.NewOutPoint(txHash, uint32(utxo.Vout)),
			Output:   wire.NewTxOut(utxo.Value, pkScript),
		})
	}
	return unspentOutputs, nil

Need to implement psbt multi-signature transactions(m-n)

@robertcc0410 robertcc0410 moved this from Done to In Progress in b2network Jan 12, 2024
@oxf71
Copy link
Collaborator

oxf71 commented Jan 12, 2024

@oxf71 oxf71 moved this from In Progress to Done in b2network Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants