hirosystems / connect

A library for building excellent user experiences with Stacks.
https://connect.stacks.js.org
MIT License
76 stars 40 forks source link

feat: allow transaction as hex for signing #338

Closed fess-v closed 10 months ago

fess-v commented 10 months ago

Description

Currently, it is not possible to sign a multisig transaction through Stacks wallets using Stacks.js. I added this functionality for Hiro Wallet with this pull request. This PR is an initial draft to extend this functionality for Xverse and other potential wallets within Stacks.

This code adds new methods to sign a transaction hex, which should be parsed and displayed on the wallet side. With this method, it will be possible to sign any transaction on Stacks, including sponsored and multisig ones.

Type of Change

Does this introduce a breaking change?

This is not a breaking change.

Are documentation updates required?

New hex transaction signing methods like openSignTransaction and doSignTransaction require documentation updates.

Testing information

Tests are required on the wallet side to check the correctness of the new methods.

Checklist

changeset-bot[bot] commented 10 months ago

⚠️ No Changeset found

Latest commit: 06c119304cf4bf6948698f86748c7c0af36f6e13

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 10 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
connect-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2023 9:22am
janniks commented 10 months ago

I really like this proposal! ✨

Some thoughts:

fess-v commented 10 months ago

Hey @janniks! thanks for the review, just fixed names that you pointed, agree with it