Logo Decentralized Social Network

moeralib.node.fingerprints

Functions

create_attachment_fingerprint0(digest)

Parameters:
digest:  bytes | None – cryptographic hash of the attachment as a file
Return value:
bytes - the fingerprint in binary form

create_carte_fingerprint3(owner_name, addresses, beginning, deadline, node_name, client_scope, admin_scope, salt)

Parameters:
owner_name:  str | None
addresses:  List[str] | None – IP addresses of the client
beginning:  Timestamp | None – timestamp of the beginning of the carte's life
deadline:  Timestamp | None – timestamp of the end of the carte's life
node_name:  str | None – if set, the carte is valid for authentication on the specified node only
client_scope:  int | None – A bit mask describing which permissions should be granted to the carte. If not set, all permissions of the carte's owner are granted. Meaning of particular bits can be seen in the description of Scope enum
admin_scope:  int | None – A bit mask describing which additional administrative permissions (of those granted to the carte's owner by the target node) should be granted to the carte. Meaning of particular bits can be seen in the description of Scope enum
salt:  bytes | None – 8 random bytes
Return value:
bytes - the fingerprint in binary form

create_carte_fingerprint2(owner_name, address, beginning, deadline, node_name, client_scope, admin_scope, salt)

Parameters:
owner_name:  str | None
address:  str | None – IP address of the client
beginning:  Timestamp | None – timestamp of the beginning of the carte's life
deadline:  Timestamp | None – timestamp of the end of the carte's life
node_name:  str | None – if set, the carte is valid for authentication on the specified node only
client_scope:  int | None – A bit mask describing which permissions should be granted to the carte. If not set, all permissions of the carte's owner are granted. Meaning of particular bits can be seen in the description of Scope enum
admin_scope:  int | None – A bit mask describing which additional administrative permissions (of those granted to the carte's owner by the target node) should be granted to the carte. Meaning of particular bits can be seen in the description of Scope enum
salt:  bytes | None – 8 random bytes
Return value:
bytes - the fingerprint in binary form

create_carte_fingerprint1(owner_name, address, beginning, deadline, node_name, auth_category, salt)

Parameters:
owner_name:  str | None
address:  str | None – IP address of the client
beginning:  Timestamp | None – timestamp of the beginning of the carte's life
deadline:  Timestamp | None – timestamp of the end of the carte's life
node_name:  str | None – if set, the carte is valid for authentication on the specified node only
auth_category:  int | None – A bit mask describing which permissions should be granted to the carte. If not set, all permissions of the carte's owner are granted. The bits have the following meaning:
  • other (0x0001) - any other permission not listed below;
  • view-media (0x0002) - view media files.
salt:  bytes | None – 8 random bytes
Return value:
bytes - the fingerprint in binary form

create_carte_fingerprint0(owner_name, address, beginning, deadline, permissions, salt)

Parameters:
owner_name:  str | None
address:  str | None – IP address of the client
beginning:  Timestamp | None – timestamp of the beginning of the carte's life
deadline:  Timestamp | None – timestamp of the end of the carte's life
permissions:  int | None – 0 (reserved for future use)
salt:  bytes | None – 8 random bytes
Return value:
bytes - the fingerprint in binary form

create_comment_fingerprint1(owner_name, posting_fingerprint, replied_to_fingerprint, body_src_hash, body_src_format, body, body_format, created_at, permissions, attachments)

Parameters:
owner_name:  str | None
posting_fingerprint:  bytes | None
replied_to_fingerprint:  bytes | None
body_src_hash:  bytes | None – hash of bodySrc field
body_src_format:  str | None
body:  str | None
body_format:  str | None
created_at:  Timestamp | None – of the current revision
permissions:  int | None – 0 (reserved for future use)
attachments:  List[bytes] | None
Return value:
bytes - the fingerprint in binary form

create_comment_fingerprint0(owner_name, posting_fingerprint, replied_to_fingerprint, body_src_hash, body_src_format, body, body_format, created_at, permissions, attachments)

Parameters:
owner_name:  str | None
posting_fingerprint:  bytes | None
replied_to_fingerprint:  bytes | None – bug: if repliedTo is null, this field should be set to digest of a fingerprint containing single null value
body_src_hash:  bytes | None – hash of bodySrc field
body_src_format:  str | None
body:  str | None
body_format:  str | None
created_at:  Timestamp | None – of the current revision
permissions:  int | None – 0 (reserved for future use)
attachments:  List[bytes] | None
Return value:
bytes - the fingerprint in binary form

create_media_grant_fingerprint1(node_name, media_id, expires, download, file_name, salt)

Parameters:
node_name:  str | None – name of the node that grants media access, null for the target node itself
media_id:  str | None – ID of the accessed media on the target node
expires:  Timestamp | None – timestamp when the grant expires
download:  bool | None – whether the media should be downloaded
file_name:  str | None – the preferred name of the media file when it is downloaded
salt:  bytes | None – 8 random bytes
Return value:
bytes - the fingerprint in binary form

create_media_grant_fingerprint0(node_name, posting_id, comment_id, media_id, expires, download, file_name, salt)

Parameters:
node_name:  str | None – name of the node that grants media access, null for the target node itself
posting_id:  str | None – ID of the posting that grants media access
comment_id:  str | None – ID of the comment that grants media access, if any
media_id:  str | None – ID of the accessed media on the target node
expires:  Timestamp | None – timestamp when the grant expires
download:  bool | None – whether the media should be downloaded
file_name:  str | None – the preferred name of the media file when it is downloaded
salt:  bytes | None – 8 random bytes
Return value:
bytes - the fingerprint in binary form

create_notification_packet_fingerprint2(id, node_name, full_name, node_source_uri, created_at, type, notification)

Parameters:
id:  str | None
node_name:  str | None
full_name:  str | None
node_source_uri:  str | None
created_at:  Timestamp | None
type:  str | None
notification:  str | None
Return value:
bytes - the fingerprint in binary form

create_notification_packet_fingerprint1(id, node_name, full_name, created_at, type, notification)

Parameters:
id:  str | None
node_name:  str | None
full_name:  str | None
created_at:  Timestamp | None
type:  str | None
notification:  str | None
Return value:
bytes - the fingerprint in binary form

create_notification_packet_fingerprint0(id, node_name, created_at, type, notification)

Parameters:
id:  str | None
node_name:  str | None
created_at:  Timestamp | None
type:  str | None
notification:  str | None
Return value:
bytes - the fingerprint in binary form

create_posting_fingerprint1(receiver_name, owner_name, body_src_hash, body_src_format, body, body_format, created_at, permissions, attachments)

Parameters:
receiver_name:  str | None
owner_name:  str | None
body_src_hash:  bytes | None – hash of bodySrc field
body_src_format:  str | None
body:  str | None
body_format:  str | None
created_at:  Timestamp | None – of the current revision
permissions:  int | None – 0 (reserved for future use)
attachments:  List[bytes] | None – if the posting is linked to a media, its fingerprint should be put at the beginning of the list
Return value:
bytes - the fingerprint in binary form

create_posting_fingerprint0(receiver_name, owner_name, body_src_hash, body_src_format, body, body_format, created_at, permissions, attachments)

Parameters:
receiver_name:  str | None
owner_name:  str | None
body_src_hash:  bytes | None – hash of bodySrc field
body_src_format:  str | None
body:  str | None
body_format:  str | None
created_at:  Timestamp | None – of the current revision
permissions:  int | None – 0 (reserved for future use)
attachments:  int | None – 0 (reserved for future use)
Return value:
bytes - the fingerprint in binary form

create_push_relay_message_fingerprint0(signed_at)

Parameters:
signed_at:  Timestamp | None
Return value:
bytes - the fingerprint in binary form

create_push_relay_register_fingerprint0(client_id, lang, signed_at)

Parameters:
client_id:  str | None
lang:  str | None
signed_at:  Timestamp | None
Return value:
bytes - the fingerprint in binary form

create_reaction_fingerprint0(owner_name, entry_fingerprint, negative, emoji)

Parameters:
owner_name:  str | None
entry_fingerprint:  bytes | None – hash of Posting or Comment fingerprint
negative:  bool | None
emoji:  int | None
Return value:
bytes - the fingerprint in binary form

create_sheriff_order_fingerprint0(sheriff_name, node_name, feed_name, entry_fingerprint, category, reason_code, reason_details, created_at)

Parameters:
sheriff_name:  str | None
node_name:  str | None
feed_name:  str | None
entry_fingerprint:  bytes | None – hash of Posting or Comment fingerprint
category:  str | None
reason_code:  str | None
reason_details:  str | None
created_at:  Timestamp | None
Return value:
bytes - the fingerprint in binary form