Atomic Classes
Classes in the atomic_classes module are used for instantiate classes from the corresponding API data.
Atomic Classes
Classes for instantizing Atomic Asset data structures
- class daltonapi.tools.atomic_classes.Asset(api_data)
Class for instantizing Atomic Assets
- __init__(api_data)
Creates an Asset from API data
- Parameters
api_data (dict) – Data from the AtomicAssets API
- __str__()
Pretty prints basic asset information in format Asset [Asset ID]: [Collection Name] - [Asset Name] #[Mint/Total Supply] (Max Supply: [Max Supply])
- Returns
String representation of the class
- Return type
str
- property all_media: Dict[str, str]
Returns a dict of all media properties of the asset
- Returns
key:image_link pairs
- Return type
dict
- property burnable: bool
Is the asset burnable?
- Returns
bool
- property burned: Tuple[str, str, str]
Burn information of the asset. Returns (None,None,None) if unburned.
- Returns
(block, timestamp, account)
- Return type
tuple
- property collection: daltonapi.tools.atomic_classes.Collection
Returns the Asset’s collection
- Returns
The collection of the Asset
- Return type
- property image: str
Returns the primary image of the asset
- Returns
direct link to the image
- Return type
str
- property last_transferred: Tuple[str, str]
Information about the last transfer of the asset
- Returns
(block,timestamp)
- Return type
tuple
- property last_updated: Tuple[str, str]
Information about the last update to the asset
- Returns
(block,timestamp)
- Return type
tuple
- property mint: Tuple[int, int, int]
Method to obtain mint information of the asset if max supply (list[2]) returns 0, there is no maximum limit
- Returns
[mint number, total in circulation, max supply]
- Return type
tuple(int,int,int)
- property name: str
Returns the asset’s name
- Returns
Asset name
- Return type
str
- property owner: str
Returns the Asset’s owner
- Returns
Asset Owner
- Return type
str
- property schema: daltonapi.tools.atomic_classes.Schema
Returns the Asset’s schema
- Returns
The schema of the Asset
- Return type
- property template: daltonapi.tools.atomic_classes.Template
Returns the Asset’s template Returns None if no template
- Returns
The template of the Asset
- Return type
- property transferable: bool
Is the asset transferable?
- Returns
bool
- class daltonapi.tools.atomic_classes.AtomicBaseClass(api_data)
Template class for AtomicAssets API data
- __init__(api_data)
Creates the Atomic Object
- Parameters
api_data (dict) – Data from the AtomicAssets API
- get_id() str
Returns the primary atomic assets identifier of the object E.g. For an asset, returns asset id. For a schema, returns schema name
- Returns
id
- Return type
str
- class daltonapi.tools.atomic_classes.Collection(api_data)
Class for instantizing Atomic Asset Collections
- __init__(api_data)
Creates a Collection from API data
- Parameters
api_data (dict) – Data from the AtomicAssets API
- property image: str
Returns the primary image of the collection
- Returns
direct link to the image
- Return type
str
- class daltonapi.tools.atomic_classes.Offer(api_data)
Class for instantizing Atomic Asset Offer Data
More features coming soon
- __init__(api_data)
Creates an Offer data object from API data
- Parameters
api_data (dict) – Data from the AtomicAssets API
- class daltonapi.tools.atomic_classes.Schema(api_data)
Class for instantizing Atomic Asset Schemas
- __init__(api_data)
Creates Schema from API data
- Parameters
api_data (dict) – Data from the AtomicAssets API
- class daltonapi.tools.atomic_classes.Template(api_data)
Class for instantizing Atomic Asset Templates
- __init__(api_data)
Creates a Template from API data
- Parameters
api_data (dict) – Data from the AtomicAssets API
- property all_media: Dict[str, str]
Returns a dict of all media properties of the asset
- Returns
key:image_link pairs
- Return type
dict
- property image: str
Returns the primary image of the asset
- Returns
direct link to the image
- Return type
str
- property name: str
Returns template name
- Returns
Template name
- Return type
str
- class daltonapi.tools.atomic_classes.Transfer(api_data)
Class for instantizing Atomic Asset Transfer Data
- __init__(api_data)
Creates a Transfer data object from API data
- Parameters
api_data (dict) – Data from the AtomicAssets API
- __str__()
Pretty prints Transfer information in the format [DateAndTime]: [Sender] —> [Recipient]
- Parameters
api_data (dict) – Data from the AtomicAssets API
- property assets: List[daltonapi.tools.atomic_classes.Asset]
Returns a list of assets transferred in the transfer
- Returns
List of Asset
- Return type
List
- property contract: str
Returns contract type of transfer
- Returns
contract type
- Return type
str
- property memo: str
Returns memo of transfer
- Returns
Memo text
- Return type
str
- property timestamp: int
Returns timestamp of transfer
- Returns
timestamp to millisecond precision
- Return type
int