Method: Filecoin::Types::DataRef#as_json
- Defined in:
- lib/filecoin/types/data_ref.rb
#as_json ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/filecoin/types/data_ref.rb', line 15 def as_json hash = { "Root" => root.as_json, } hash["TransferType"] = transfer_type unless transfer_type.nil? hash["PieceCID"] = piece_cid.as_json unless piece_cid.nil? hash["PieceSize"] = piece_size unless piece_size.nil? hash end |