hyperledger / iroha-javascript

JavaScript library for Iroha, a Distributed Ledger Technology (blockchain) platform.
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
94 stars 64 forks source link

Expose "append signature" utility #165

Open 0x009922 opened 1 year ago

0x009922 commented 1 year ago

Description

Appending signature to an existing SignedTransaction is a common operation for multisignature workflows.

The API should look like this:

import { Signer, appendTransactionSignature } from '@iroha2/client'
import { datamodel } from '@iroha2/data-model'

/** @type {datamodel.VersionedSignedTransaction} */
let tx

tx = appendTransactionSignature(tx, keypair)

// or through `Signer`
tx = new Signer(keypair).appendTransactionSignature(tx)