sdk/ruby/lib/chain/hsm_signer.rb
def sign(tx_template)
      return tx_template if @xpubs_by_signer.empty?

      @xpubs_by_signer.each do |signer_conn, xpubs|
        tx_template = signer_conn.singleton_batch_request(
          '/sign-transaction',
          transactions: [tx_template],
          xpubs: xpubs,
        ) { |item| Transaction::Template.new(item) }
      end

      tx_template
    end
def sign(tx_template)
      return tx_template if @xpubs_by_signer.empty?

      @xpubs_by_signer.each do |signer_conn, xpubs|
        tx_template = signer_conn.singleton_batch_request(
          '/sign-transaction',
          transactions: [tx_template],
          xpubs: xpubs,
        ) { |item| Transaction::Template.new(item) }
      end

      tx_template
    end
def sign ( tx_template ) return tx_template if @xpubs_by_signer . empty? @xpubs_by_signer . each do | signer_conn , xpubs | tx_template = signer_conn . singleton_batch_request ( '/sign-transaction' , transactions : [ tx_template ] , xpubs : xpubs , ) { | item | Transaction :: Template . new ( item ) } end tx_template end
Sign a single transaction
 @param [Hash] tx_template	A single transaction template.
Sign a single transaction