Skip to content

Domain

Modules:

Name Description
cis
credential
generic
mongo

Classes:

Name Description
AccountStatementEntry

AccountStatementEntry represents an entry in an account statement.

AccountStatementEntryType

AccountStatementEntryType represents the structure of an account statement entry.

AccountStatementTransferType

AccountStatementTransferType represents a transfer type in an account statement.

MongoImpactedAddress

MongoImpactedAddress is a data model representing an impacted address in a MongoDB collection.

MongoLabeledAccount

MongoLabeledAccount represents a labeled account in a MongoDB collection.

MongoTokensImpactedAddress

MongoTokensImpactedAddress is a Pydantic model representing a MongoDB document for tokens impacted by an address.

MongoTypeBlockPerDay

Block Per Day. This type is stored in the collection blocks_per_day.

MongoTypeInvolvedAccount

Involved Account. This type is stored in the collections involved_accounts_all and

PLTTransferType

PLTTransferType represents a transfer type in an account statement.

burnEvent

A burn event from a CIS-2 compliant smart contract.

credentialMetadataEvent

A credential metadata event from a CIS-4 compliant smart contract.

credentialSchemaRefEvent

A credential schema reference event from a CIS-4 compliant smart contract.

depositCCDEvent

A CCD deposit event from a CIS-5 compliant smart contract.

depositCIS2TokensEvent

A CIS-2 token deposit event from a CIS-5 compliant smart contract.

fiveStarsRegisterAccessEvent

A custom event for registering access for 5tars.

issuerMetadataEvent

An issuer metadata event from a CIS-4 compliant smart contract.

itemCreatedEvent

An item created event from a CIS-6 compliant smart contract.

itemStatusChangedEvent

An item status change event from a CIS-6 compliant smart contract.

mintEvent

A mint event from a CIS-2 compliant smart contract.

nonceEventCIS3

A nonce event from a CIS-3 compliant smart contract.

nonceEventCIS5

A nonce event from a CIS-5 compliant smart contract.

registerCredentialEvent

A register credential event from a CIS-4 compliant smart contract.

revocationKeyEvent

A revocation key event from a CIS-4 compliant smart contract.

revokeCredentialEvent

A revoke credential event from a CIS-4 compliant smart contract.

tokenMetadataEvent

A metadata event from a CIS-2 compliant smart contract.

transferCCDEvent

A CCD transfer event from a CIS-5 compliant smart contract.

transferCIS2TokensEvent

A CIS-2 token transfer event from a CIS-5 compliant smart contract.

transferEvent

A transfer event from a CIS-2 compliant smart contract.

updateOperatorEvent

An operator update event from a CIS-2 compliant smart contract.

withdrawCCDEvent

A CCD withdraw event from a CIS-5 compliant smart contract.

withdrawCIS2TokensEvent

A CIS-2 token withdraw event from a CIS-5 compliant smart contract.

AccountStatementEntry

AccountStatementEntry represents an entry in an account statement.

Attributes:

Name Type Description
block_height int

The height of the block in the blockchain.

slot_time datetime

The timestamp of the slot.

entry_type str

The type of the entry (e.g., transaction, reward).

amount microCCD

The amount involved in the entry.

balance microCCD

The balance after the entry.

AccountStatementEntryType

AccountStatementEntryType represents the structure of an account statement entry.

Attributes:

Name Type Description
amount_decrypted Optional[microCCD]

The decrypted amount in the account statement entry.

amount_encrypted Optional[microCCD]

The encrypted amount in the account statement entry.

baker_reward Optional[microCCD]

The reward received from baking.

finalization_reward Optional[microCCD]

The reward received from finalization.

foundation_reward Optional[microCCD]

The reward received from the foundation.

transaction_fee Optional[microCCD]

The transaction fee associated with the account statement entry.

transaction_fee_reward Optional[microCCD]

The reward received from transaction fees.

transfer_in Optional[list[AccountStatementTransferType]]

List of incoming transfers.

transfer_out Optional[list[AccountStatementTransferType]]

List of outgoing transfers.

AccountStatementTransferType

AccountStatementTransferType represents a transfer type in an account statement.

Attributes:

Name Type Description
amount microCCD

The amount of the transfer in microCCD.

counterparty str

The counterparty involved in the transfer.

MongoImpactedAddress

MongoImpactedAddress is a data model representing an impacted address in a MongoDB collection.

Attributes:

Name Type Description
id str

The unique identifier for the impacted address, mapped from the MongoDB "_id" field.

tx_hash Optional[str]

The transaction hash associated with the impacted address. Rewards do not have a transaction hash.

impacted_address str

The impacted address.

impacted_address_canonical str

The canonical form of the impacted address.

effect_type str

The type of effect on the impacted address.

balance_movement Optional[AccountStatementEntryType]

The balance movement associated with the impacted address.

block_height int

The block height at which the impact occurred.

included_in_flow Optional[bool]

Indicates whether the impacted address is included in the flow.

date Optional[str]

The date when the impact occurred.

MongoLabeledAccount

MongoLabeledAccount represents a labeled account in a MongoDB collection.

Attributes:

Name Type Description
id str

The unique identifier for the account, mapped from the MongoDB "_id" field.

account_index Optional[CCD_AccountIndex]

The index of the account, if available.

label str

The label associated with the account.

label_group str

The group to which the label belongs.

MongoTokensImpactedAddress

MongoTokensImpactedAddress is a Pydantic model representing a MongoDB document for tokens impacted by an address.

Attributes:

Name Type Description
id str

The unique identifier for the document, mapped from MongoDB's "_id" field.

tx_hash str

The transaction hash associated with the impacted address.

impacted_address str

The address that was impacted.

impacted_address_canonical str

The canonical form of the impacted address.

event_type str

The type of event that impacted the address.

token_address Optional[str]

The address of the token, if applicable.

plt_token_id Optional[str]

The ID of the PLT token, if applicable.

contract Optional[str]

The contract associated with the token, if applicable.

block_height int

The block height at which the event occurred.

date str

The date when the event occurred.

MongoTypeBlockPerDay

Block Per Day. This type is stored in the collection blocks_per_day.

:Parameters: - _id: the date of the day that ended - date: the date of the day that ended - height_for_first_block: height of the first block in the day - height_for_last_block: height of the last block in the day - slot_time_for_first_block: time of the first block in the day - slot_time_for_last_block: time of the last block in the day - hash_for_first_block: hash of the first block in the day - hash_for_last_block: hash of the last block in the day

MongoTypeInvolvedAccount

Involved Account. This type is stored in the collections involved_accounts_all and involved_accounts_transfer.

:Parameters: - _id: the hash of the transaction - sender: the sender account address - receiver: the receiver account address, might be null - sender_canonical: the canonical sender account address - receiver_canonical: the canonical receiver account address, might be null - amount: amount of the transaction, might be null - type: dict with transaction type and contents - block_height: height of the block in which the transaction is executed

PLTTransferType

PLTTransferType represents a transfer type in an account statement.

burnEvent

A burn event from a CIS-2 compliant smart contract.

See: burnEvent

Attributes:

Name Type Description
tag int

The event tag (253 for burn events).

token_id Optional[str]

The ID of the token being burned.

token_amount Optional[int]

The amount of tokens being burned.

from_address Optional[str]

The address tokens are being burned from.

credentialMetadataEvent

A credential metadata event from a CIS-4 compliant smart contract.

See: credentialMetadataEvent

Attributes:

Name Type Description
tag int

The event tag (246 for credential metadata events).

id str

The credential holder identifier.

metadata MetadataUrl

The URL and optional hash of the credential metadata.

credentialSchemaRefEvent

A credential schema reference event from a CIS-4 compliant smart contract.

See: credentialSchemaRefEvent

Attributes:

Name Type Description
tag int

The event tag (245 for credential schema reference events).

type Optional[str]

The type of credential this schema is for.

schema_ref Optional[str]

The reference to the schema definition.

depositCCDEvent

A CCD deposit event from a CIS-5 compliant smart contract.

See: depositCCDEvent

Attributes:

Name Type Description
tag int

The event tag (249 for deposit CCD events).

ccd_amount Optional[microCCD]

The amount of CCD being deposited.

from_address Optional[str]

The address from which CCD is being deposited.

to_public_key_ed25519 Optional[str]

The public key of the recipient's account.

depositCIS2TokensEvent

A CIS-2 token deposit event from a CIS-5 compliant smart contract.

See: depositCIS2TokensEvent

Attributes:

Name Type Description
tag int

The event tag (248 for deposit CIS2 tokens events).

token_amount Optional[int]

The amount of CIS-2 tokens being deposited.

token_id Optional[str]

The ID of the token being deposited.

cis2_token_contract_address Optional[str]

The contract address of the CIS-2 token.

from_address Optional[str]

The address from which tokens are being deposited.

to_public_key_ed25519 Optional[str]

The public key of the recipient's account.

fiveStarsRegisterAccessEvent

A custom event for registering access for 5tars.

Attributes:

Name Type Description
tag int

The event tag (0 for 5tars register access events).

public_key Optional[str]

The public key being registered.

timestamp Optional[int]

Unix timestamp of the registration.

issuerMetadataEvent

An issuer metadata event from a CIS-4 compliant smart contract.

See: issuerMetadataEvent

Attributes:

Name Type Description
tag int

The event tag (247 for issuer metadata events).

metadata MetadataUrl

The URL and optional hash of the issuer's metadata.

itemCreatedEvent

An item created event from a CIS-6 compliant smart contract.

See: itemCreatedEvent

Attributes:

Name Type Description
tag int

The event tag (237 for item created events).

item_id str

The unique identifier of the item being created.

metadata MetadataUrl

The URL and optional hash of the item's metadata.

initial_status str | int

The initial status of the created item.

itemStatusChangedEvent

An item status change event from a CIS-6 compliant smart contract.

See: itemStatusChangedEvent

Attributes:

Name Type Description
tag int

The event tag (236 for item status changed events).

item_id str

The unique identifier of the item being updated.

new_status str | int

The new status of the item.

additional_data str

Additional data associated with the status change.

mintEvent

A mint event from a CIS-2 compliant smart contract.

See: mintEvent

Attributes:

Name Type Description
tag int

The event tag (254 for mint events).

token_id Optional[str]

The ID of the token being minted.

token_amount Optional[int]

The amount of tokens being minted.

to_address Optional[str]

The address receiving the minted tokens.

nonceEventCIS3

A nonce event from a CIS-3 compliant smart contract.

See: nonceEvent

Attributes:

Name Type Description
tag int

The event tag (250 for nonce events).

nonce Optional[str]

The generated nonce value.

sponsoree Optional[str]

The address of the account being sponsored.

nonceEventCIS5

A nonce event from a CIS-5 compliant smart contract.

See: nonceEvent

Attributes:

Name Type Description
tag int

The event tag (250 for nonce events).

nonce Optional[str]

The generated nonce value.

sponsoree Optional[str]

The public key being sponsored.

registerCredentialEvent

A register credential event from a CIS-4 compliant smart contract.

See: registerCredentialEvent

Attributes:

Name Type Description
tag int

The event tag (249 for register credential events).

credential_id Optional[str]

The unique identifier of the credential.

schema_ref Optional[SchemaRef]

The reference to the schema definition.

credential_type Optional[str]

The type of the credential being registered.

revocationKeyEvent

A revocation key event from a CIS-4 compliant smart contract.

See: revocationKeyEvent

Attributes:

Name Type Description
tag int

The event tag (244 for revocation key events).

public_key_ed25519 Optional[str]

The public key being registered or removed.

action Optional[str]

The action being performed ("Register" or "Remove").

revokeCredentialEvent

A revoke credential event from a CIS-4 compliant smart contract.

See: revokeCredentialEvent

Attributes:

Name Type Description
tag int

The event tag (248 for revoke credential events).

credential_id Optional[str]

The unique identifier of the credential being revoked.

revoker Optional[str]

The entity revoking the credential (Issuer, Holder, or Other).

reason Optional[str]

The reason for revoking the credential.

tokenMetadataEvent

A metadata event from a CIS-2 compliant smart contract.

See: tokenMetadataEvent

Attributes:

Name Type Description
tag int

The event tag (251 for metadata events).

token_id str

The ID of the token whose metadata is being set.

metadata MetadataUrl

The URL and optional hash of the token's metadata.

transferCCDEvent

A CCD transfer event from a CIS-5 compliant smart contract.

See: transferCCDEvent

Attributes:

Name Type Description
tag int

The event tag (245 for transfer CCD events).

ccd_amount Optional[microCCD]

The amount of CCD being transferred.

from_public_key_ed25519 Optional[str]

The public key from which CCD is being transferred.

to_public_key_ed25519 Optional[str]

The public key to which CCD is being transferred.

transferCIS2TokensEvent

A CIS-2 token transfer event from a CIS-5 compliant smart contract.

See: transferCIS2TokensEvent

Attributes:

Name Type Description
tag int

The event tag (244 for transfer CIS2 tokens events).

token_amount Optional[int]

The amount of CIS-2 tokens being transferred.

token_id Optional[str]

The ID of the token being transferred.

cis2_token_contract_address Optional[str]

The contract address of the CIS-2 token.

from_public_key_ed25519 Optional[str]

The public key from which tokens are being transferred.

to_public_key_ed25519 Optional[str]

The public key to which tokens are being transferred.

transferEvent

A transfer event from a CIS-2 compliant smart contract.

See: transferEvent

Attributes:

Name Type Description
tag int

The event tag (255 for transfer events).

token_id Optional[str]

The ID of the token being transferred.

token_amount Optional[int]

The amount of tokens being transferred.

from_address Optional[str]

The address tokens are being transferred from.

to_address Optional[str]

The address tokens are being transferred to.

updateOperatorEvent

An operator update event from a CIS-2 compliant smart contract.

See: updateOperatorEvent

Attributes:

Name Type Description
tag int

The event tag (252 for operator update events).

operator_update Optional[str]

The type of update ("Add operator" or "Remove operator").

owner Optional[str]

The address of the token owner.

operator Optional[str]

The address of the operator being updated.

withdrawCCDEvent

A CCD withdraw event from a CIS-5 compliant smart contract.

See: withdrawCCDEvent

Attributes:

Name Type Description
tag int

The event tag (247 for withdraw CCD events).

ccd_amount Optional[microCCD]

The amount of CCD being withdrawn.

from_public_key_ed25519 Optional[str]

The public key from which CCD is being withdrawn.

to_address Optional[str]

The address receiving the withdrawn CCD.

withdrawCIS2TokensEvent

A CIS-2 token withdraw event from a CIS-5 compliant smart contract.

See: withdrawCIS2TokensEvent

Attributes:

Name Type Description
tag int

The event tag (246 for withdraw CIS2 tokens events).

token_amount Optional[int]

The amount of CIS-2 tokens being withdrawn.

token_id Optional[str]

The ID of the token being withdrawn.

cis2_token_contract_address Optional[str]

The contract address of the CIS-2 token.

from_public_key_ed25519 Optional[str]

The public key from which tokens are being withdrawn.

to_address Optional[str]

The address receiving the withdrawn tokens.