iov-core
                                
                                 iov-core copied to clipboard
                                
                                    iov-core copied to clipboard
                            
                            
                            
                        Allow MultiChainSigner.signAndPost to take multiple transactions
This is required by the faucet (refilling distributors) to remove the need to wait for a block just to get an updated nonce
This is how an overload for one or many can work:
/**
   * Queries the nonce, signs the transaction and posts it to the blockchain.
   *
   * The transaction signer is determined by the transaction content. A lookup for
   * the private key for the signer in the given wallet ID is done automatically.
   */
  public async signAndPost(transaction: UnsignedTransaction, walletId: WalletId): Promise<PostTxResponse>;
  public async signAndPost(transactions: ReadonlyArray<UnsignedTransaction>, walletId: WalletId): Promise<ReadonlyArray<Promise<PostTxResponse>>>;
  public async signAndPost(tx: UnsignedTransaction | ReadonlyArray<UnsignedTransaction>, walletId: WalletId): Promise<PostTxResponse | ReadonlyArray<Promise<PostTxResponse>>> {
    if (isUnsignedTransaction(tx)) {
      const firstResult = (await this.signAndPost([tx], walletId))[0];
      return firstResult;
    }
However, implementing this is too complicated as long as one identity can be in a profile multiple times
However, implementing this is too complicated as long as one identity can be in a profile multiple times
Yes, I would love to enforce uniqueness and then remove need for WalletId in many of these methods, where an identity (public key and chain) is sufficient. Did you have another issue for that one as well?
Seems like a good thing shortly post-v0.12
Did you have another issue for that one as well?
Jap, but was not on the board before: https://github.com/iov-one/iov-core/issues/652