Class: Sdp::Token
- Inherits:
-
Struct
- Object
- Struct
- Sdp::Token
- Defined in:
- lib/sdp/resources/issuance.rb
Overview
A token as SDP’s issuance API reports it. Like every SDP resource, optional fields are OMITTED (absent, not null), so each member is nil when SDP didn’t send it. extensions is passed through as the raw snake_cased hash — the Token-2022 extension set is large and provider-shaped, so this gem surfaces it untyped rather than modelling it.
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#decimals ⇒ Object
Returns the value of attribute decimals.
-
#deployed_at ⇒ Object
Returns the value of attribute deployed_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#freezable ⇒ Object
Returns the value of attribute freezable.
-
#freeze_authority ⇒ Object
Returns the value of attribute freeze_authority.
-
#id ⇒ Object
Returns the value of attribute id.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#max_supply ⇒ Object
Returns the value of attribute max_supply.
-
#mint_address ⇒ Object
Returns the value of attribute mint_address.
-
#mint_authority ⇒ Object
Returns the value of attribute mint_authority.
-
#mintable ⇒ Object
Returns the value of attribute mintable.
-
#name ⇒ Object
Returns the value of attribute name.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#requires_allowlist ⇒ Object
Returns the value of attribute requires_allowlist.
-
#signing_wallet_id ⇒ Object
Returns the value of attribute signing_wallet_id.
-
#status ⇒ Object
Returns the value of attribute status.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
-
#template ⇒ Object
Returns the value of attribute template.
-
#total_supply ⇒ Object
Returns the value of attribute total_supply.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#uri ⇒ Object
Returns the value of attribute uri.
Class Method Summary collapse
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def created_at @created_at end |
#decimals ⇒ Object
Returns the value of attribute decimals
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def decimals @decimals end |
#deployed_at ⇒ Object
Returns the value of attribute deployed_at
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def deployed_at @deployed_at end |
#description ⇒ Object
Returns the value of attribute description
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def description @description end |
#extensions ⇒ Object
Returns the value of attribute extensions
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def extensions @extensions end |
#freezable ⇒ Object
Returns the value of attribute freezable
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def freezable @freezable end |
#freeze_authority ⇒ Object
Returns the value of attribute freeze_authority
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def @freeze_authority end |
#id ⇒ Object
Returns the value of attribute id
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def id @id end |
#image_url ⇒ Object
Returns the value of attribute image_url
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def image_url @image_url end |
#max_supply ⇒ Object
Returns the value of attribute max_supply
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def max_supply @max_supply end |
#mint_address ⇒ Object
Returns the value of attribute mint_address
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def mint_address @mint_address end |
#mint_authority ⇒ Object
Returns the value of attribute mint_authority
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def @mint_authority end |
#mintable ⇒ Object
Returns the value of attribute mintable
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def mintable @mintable end |
#name ⇒ Object
Returns the value of attribute name
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def name @name end |
#project_id ⇒ Object
Returns the value of attribute project_id
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def project_id @project_id end |
#requires_allowlist ⇒ Object
Returns the value of attribute requires_allowlist
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def requires_allowlist @requires_allowlist end |
#signing_wallet_id ⇒ Object
Returns the value of attribute signing_wallet_id
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def signing_wallet_id @signing_wallet_id end |
#status ⇒ Object
Returns the value of attribute status
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def status @status end |
#symbol ⇒ Object
Returns the value of attribute symbol
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def symbol @symbol end |
#template ⇒ Object
Returns the value of attribute template
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def template @template end |
#total_supply ⇒ Object
Returns the value of attribute total_supply
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def total_supply @total_supply end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def updated_at @updated_at end |
#uri ⇒ Object
Returns the value of attribute uri
11 12 13 |
# File 'lib/sdp/resources/issuance.rb', line 11 def uri @uri end |
Class Method Details
.from_hash(hash) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/sdp/resources/issuance.rb', line 17 def self.from_hash(hash) hash ||= {} new( id: hash[:id], project_id: hash[:project_id], signing_wallet_id: hash[:signing_wallet_id], mint_address: hash[:mint_address], mint_authority: hash[:mint_authority], freeze_authority: hash[:freeze_authority], name: hash[:name], symbol: hash[:symbol], decimals: hash[:decimals], description: hash[:description], uri: hash[:uri], image_url: hash[:image_url], template: hash[:template], extensions: hash[:extensions], total_supply: hash[:total_supply], max_supply: hash[:max_supply], mintable: hash[:is_mintable], freezable: hash[:is_freezable], requires_allowlist: hash[:requires_allowlist], status: hash[:status], deployed_at: hash[:deployed_at], created_at: hash[:created_at], updated_at: hash[:updated_at] ) end |