aaron
April 25, 2018, 2:33pm
#1
Currently, blockstack.js only supports transaction signing with pubkey hash addresses. This is fine for many use cases, but doesn’t cover all the supported signature types (e.g., multisig and segwit), nor will the interface work with, say, hardware wallets.
My proposal is to add a new interface type:
interface TransactionSigner {
signerVersion(): number
getAddress(): Promise<string>
signTransaction(transaction: bitcoinjs.TransactionBuilder, inputIndex: number): Promise<void>
}
The version, for now, should always return 1, but we can use the version number if we want to change the signer spec in the future.
The functions in blockstack.js transactions (txbuild.js) would accept the type inputs:
(string | TransactionSigner)
So as to be backwards compatible, and just create a simple pubkeyhash signer of the TransactionSigner interface.
2 Likes
jude
April 25, 2018, 2:35pm
#2
I like this! I’ll try to implement multisig support working in my node.js CLI using this interface.
1 Like
aaron
April 25, 2018, 2:36pm
#3
Okay cool – I can start a feature branch with this interface pretty quickly. Will tag you when its up.
1 Like
aaron
April 25, 2018, 5:17pm
#4
1 Like
aaron
May 24, 2018, 2:04pm
#5
Just updating this proposal: this was added in blockstack.js
version 17.2.0:
# Changelog
All notable changes to the project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [17.2.0]
### Added
- `encryptContent` and `decryptContent` methods for encrypting strings
and buffers with specific keys, or by default, the
appPrivateKey. Thanks to @nikkolasg and @nivas8292 for PRs on this
work.
- Functions in `transactions` to support namespace creation
(`NAMESPACE_PREORDER`, `NAMESPACE_REVEAL`, `NAMESPACE_IMPORT`,
`ANNOUNCE`, and `NAMESPACE_READY`). Thanks @jcnelson.
- Support for `NAME_REVOKE` transactions. Thanks @jcnelson.
This file has been truncated. show original
2 Likes