11from typing import Any , Dict , List , Optional , Union
22
3- from aleph_message .models import AlephMessage , ItemHash , ChainRef , ItemType , Chain , MessageConfirmation
3+ from aleph_message .models import (
4+ AlephMessage ,
5+ Chain ,
6+ ItemHash ,
7+ ItemType ,
8+ MessageConfirmation ,
9+ )
410from pydantic import BaseModel , Field
511
612
@@ -23,24 +29,37 @@ class Post(BaseModel):
2329 A post is a type of message that can be updated. Over the get_posts API
2430 we get the latest version of a post.
2531 """
32+
2633 chain : Chain = Field (description = "Blockchain this post is associated with" )
2734 item_hash : ItemHash = Field (description = "Unique hash for this post" )
2835 sender : str = Field (description = "Address of the sender" )
2936 type : str = Field (description = "Type of the POST message" )
3037 channel : Optional [str ] = Field (description = "Channel this post is associated with" )
3138 confirmed : bool = Field (description = "Whether the post is confirmed or not" )
3239 content : Dict [str , Any ] = Field (description = "The content of the POST message" )
33- item_content : Optional [str ] = Field (description = "The POSTs content field as serialized JSON, if of type inline" )
34- item_type : ItemType = Field (description = "Type of the item content, usually 'inline' or 'storage' for POSTs" )
35- signature : Optional [str ] = Field (description = "Cryptographic signature of the message by the sender" )
40+ item_content : Optional [str ] = Field (
41+ description = "The POSTs content field as serialized JSON, if of type inline"
42+ )
43+ item_type : ItemType = Field (
44+ description = "Type of the item content, usually 'inline' or 'storage' for POSTs"
45+ )
46+ signature : Optional [str ] = Field (
47+ description = "Cryptographic signature of the message by the sender"
48+ )
3649 size : int = Field (description = "Size of the post" )
3750 time : float = Field (description = "Timestamp of the post" )
38- confirmations : List [MessageConfirmation ] = Field (description = "Number of confirmations" )
51+ confirmations : List [MessageConfirmation ] = Field (
52+ description = "Number of confirmations"
53+ )
3954 original_item_hash : ItemHash = Field (description = "Hash of the original content" )
40- original_signature : Optional [str ] = Field (description = "Cryptographic signature of the original message" )
55+ original_signature : Optional [str ] = Field (
56+ description = "Cryptographic signature of the original message"
57+ )
4158 original_type : str = Field (description = "The original type of the message" )
4259 hash : ItemHash = Field (description = "Hash of the original item" )
43- ref : Optional [Union [str , Any ]] = Field (description = "Other message referenced by this one" )
60+ ref : Optional [Union [str , Any ]] = Field (
61+ description = "Other message referenced by this one"
62+ )
4463
4564
4665class PostsResponse (PaginationResponse ):
0 commit comments