sdk/ruby/lib/chain/hsm_signer.rb
def add_key(xpub_or_key, signer_conn)
      xpub = xpub_or_key.is_a?(MockHSM::Key) ? xpub_or_key.xpub : xpub_or_key
      @xpubs_by_signer[signer_conn] ||= []
      @xpubs_by_signer[signer_conn] << xpub
      @xpubs_by_signer[signer_conn].uniq!
    end
def add_key(xpub_or_key, signer_conn)
      xpub = xpub_or_key.is_a?(MockHSM::Key) ? xpub_or_key.xpub : xpub_or_key
      @xpubs_by_signer[signer_conn] ||= []
      @xpubs_by_signer[signer_conn] << xpub
      @xpubs_by_signer[signer_conn].uniq!
    end
Add a new key/signer pair to the HSM signer.
 @param [MockHsm::Key || String] xpub_or_key An object with an xpub key, or an xpub as a string.
 @param [Connection] signer_conn Authenticated connection to a specific HSM instance.