Class: Sdp::TokenTransaction
- Inherits:
-
Struct
- Object
- Struct
- Sdp::TokenTransaction
- Defined in:
- lib/sdp/resources/issuance.rb
Overview
An issuance transaction — the action record SDP returns for mint/burn —distinct from a payments Transfer (different shape, different endpoints). token_account is the associated token account SDP returns alongside a mint (a sibling of the transaction in the envelope, folded in here); nil when SDP didn’t send one (e.g. burn).
Instance Attribute Summary collapse
-
#block_time ⇒ Object
Returns the value of attribute block_time.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#error ⇒ Object
Returns the value of attribute error.
-
#fee ⇒ Object
Returns the value of attribute fee.
-
#id ⇒ Object
Returns the value of attribute id.
-
#params ⇒ Object
Returns the value of attribute params.
-
#serialized_tx ⇒ Object
Returns the value of attribute serialized_tx.
-
#signature ⇒ Object
Returns the value of attribute signature.
-
#slot ⇒ Object
Returns the value of attribute slot.
-
#status ⇒ Object
Returns the value of attribute status.
-
#token_account ⇒ Object
Returns the value of attribute token_account.
-
#token_id ⇒ Object
Returns the value of attribute token_id.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Attribute Details
#block_time ⇒ Object
Returns the value of attribute block_time
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def block_time @block_time end |
#created_at ⇒ Object
Returns the value of attribute created_at
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def created_at @created_at end |
#error ⇒ Object
Returns the value of attribute error
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def error @error end |
#fee ⇒ Object
Returns the value of attribute fee
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def fee @fee end |
#id ⇒ Object
Returns the value of attribute id
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def id @id end |
#params ⇒ Object
Returns the value of attribute params
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def params @params end |
#serialized_tx ⇒ Object
Returns the value of attribute serialized_tx
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def serialized_tx @serialized_tx end |
#signature ⇒ Object
Returns the value of attribute signature
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def signature @signature end |
#slot ⇒ Object
Returns the value of attribute slot
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def slot @slot end |
#status ⇒ Object
Returns the value of attribute status
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def status @status end |
#token_account ⇒ Object
Returns the value of attribute token_account
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def token_account @token_account end |
#token_id ⇒ Object
Returns the value of attribute token_id
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def token_id @token_id end |
#type ⇒ Object
Returns the value of attribute type
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
52 53 54 |
# File 'lib/sdp/resources/issuance.rb', line 52 def updated_at @updated_at end |
Class Method Details
.from_hash(hash, token_account: nil) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/sdp/resources/issuance.rb', line 56 def self.from_hash(hash, token_account: nil) hash ||= {} new( id: hash[:id], token_id: hash[:token_id], type: hash[:type], status: hash[:status], signature: hash[:signature], serialized_tx: hash[:serialized_tx], params: hash[:params], slot: hash[:slot], block_time: hash[:block_time], fee: hash[:fee], error: hash[:error], token_account: token_account, created_at: hash[:created_at], updated_at: hash[:updated_at] ) end |