Logo Decentralized Social Network

moeralib.node.fingerprints

Functions

create_attachment_fingerprint0(digest)

Parameters:
digestbytes | None – cryptographic hash of the attachment as a file
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_namestr | None
addressstr | None – IP address of the client
beginningTimestamp | None – timestamp of the beginning of the carte's life
deadlineTimestamp | None – timestamp of the end of the carte's life
node_namestr | None – if set, the carte is valid for authentication on the specified node only
client_scopeint | 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_scopeint | 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
saltbytes | 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_namestr | None
addressstr | None – IP address of the client
beginningTimestamp | None – timestamp of the beginning of the carte's life
deadlineTimestamp | None – timestamp of the end of the carte's life
node_namestr | None – if set, the carte is valid for authentication on the specified node only
auth_categoryint | 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.
saltbytes | None – 8 random bytes
Return value:
bytes - the fingerprint in binary form

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

Parameters:
owner_namestr | None
addressstr | None – IP address of the client
beginningTimestamp | None – timestamp of the beginning of the carte's life
deadlineTimestamp | None – timestamp of the end of the carte's life
permissionsint | None – 0 (reserved for future use)
saltbytes | None – 8 random bytes
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_namestr | None
posting_fingerprintbytes | None
replied_to_fingerprintbytes | None
body_src_hashbytes | None – hash of bodySrc field
body_src_formatstr | None
bodystr | None
body_formatstr | None
created_atTimestamp | None – of the current revision
permissionsint | None – 0 (reserved for future use)
attachmentsList[bytes] | None
Return value:
bytes - the fingerprint in binary form

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

Parameters:
idstr | None
node_namestr | None
full_namestr | None
created_atTimestamp | None
typestr | None
notificationstr | None
Return value:
bytes - the fingerprint in binary form

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

Parameters:
idstr | None
node_namestr | None
created_atTimestamp | None
typestr | None
notificationstr | 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_namestr | None
owner_namestr | None
body_src_hashbytes | None – hash of bodySrc field
body_src_formatstr | None
bodystr | None
body_formatstr | None
created_atTimestamp | None – of the current revision
permissionsint | None – 0 (reserved for future use)
attachmentsList[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_namestr | None
owner_namestr | None
body_src_hashbytes | None – hash of bodySrc field
body_src_formatstr | None
bodystr | None
body_formatstr | None
created_atTimestamp | None – of the current revision
permissionsint | None – 0 (reserved for future use)
attachmentsint | None – 0 (reserved for future use)
Return value:
bytes - the fingerprint in binary form

create_push_relay_message_fingerprint0(signed_at)

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

create_push_relay_register_fingerprint0(client_id, lang, signed_at)

Parameters:
client_idstr | None
langstr | None
signed_atTimestamp | None
Return value:
bytes - the fingerprint in binary form

create_reaction_fingerprint0(owner_name, entry_fingerprint, negative, emoji)

Parameters:
owner_namestr | None
entry_fingerprintbytes | None – hash of Posting or Comment fingerprint
negativebool | None
emojiint | 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_namestr | None
node_namestr | None
feed_namestr | None
entry_fingerprintbytes | None – hash of Posting or Comment fingerprint
categorystr | None
reason_codestr | None
reason_detailsstr | None
created_atTimestamp | None
Return value:
bytes - the fingerprint in binary form