class Bitcoin::PSBT::GlobalXpub

Attributes

info[R]
xpub[R]

Public Class Methods

new(xpub, info) click to toggle source
# File lib/bitcoin/psbt/tx.rb, line 10
def initialize(xpub, info)
  @xpub = xpub
  @info = info
end

Public Instance Methods

to_h() click to toggle source
# File lib/bitcoin/psbt/tx.rb, line 19
def to_h
  {xpub: xpub.to_hex}.merge(info.to_h)
end
to_payload() click to toggle source
# File lib/bitcoin/psbt/tx.rb, line 15
def to_payload
  PSBT.serialize_to_vector(PSBT_GLOBAL_TYPES[:xpub], key: xpub.to_payload, value: info.to_payload)
end
to_s() click to toggle source
# File lib/bitcoin/psbt/tx.rb, line 23
def to_s
  to_h.to_s
end