Logo Decentralized Social Network

moeralib/node/fingerprints

Functions

createAttachmentFingerprint0(objectType, digest)

Parameters:
objectTypestring | nullATTACHMENT
digestBuffer | null – cryptographic hash of the attachment as a file
Return value:
Buffer - the fingerprint in binary form

createCarteFingerprint2(objectType, ownerName, address, beginning, deadline, nodeName, clientScope, adminScope, salt)

Parameters:
objectTypestring | nullCARTE
ownerNamestring | null
addressstring | null – IP address of the client
beginningnumber | null – timestamp of the beginning of the carte's life
deadlinenumber | null – timestamp of the end of the carte's life
nodeNamestring | null – if set, the carte is valid for authentication on the specified node only
clientScopenumber | null – 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
adminScopenumber | null – 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
saltBuffer | null – 8 random bytes
Return value:
Buffer - the fingerprint in binary form

createCarteFingerprint1(objectType, ownerName, address, beginning, deadline, nodeName, authCategory, salt)

Parameters:
objectTypestring | nullCARTE
ownerNamestring | null
addressstring | null – IP address of the client
beginningnumber | null – timestamp of the beginning of the carte's life
deadlinenumber | null – timestamp of the end of the carte's life
nodeNamestring | null – if set, the carte is valid for authentication on the specified node only
authCategorynumber | null – 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.
saltBuffer | null – 8 random bytes
Return value:
Buffer - the fingerprint in binary form

createCarteFingerprint0(objectType, ownerName, address, beginning, deadline, permissions, salt)

Parameters:
objectTypestring | nullCARTE
ownerNamestring | null
addressstring | null – IP address of the client
beginningnumber | null – timestamp of the beginning of the carte's life
deadlinenumber | null – timestamp of the end of the carte's life
permissionsnumber | null – 0 (reserved for future use)
saltBuffer | null – 8 random bytes
Return value:
Buffer - the fingerprint in binary form

createCommentFingerprint0(objectType, ownerName, postingFingerprint, repliedToFingerprint, bodySrcHash, bodySrcFormat, body, bodyFormat, createdAt, permissions, attachments)

Parameters:
objectTypestring | nullCOMMENT
ownerNamestring | null
postingFingerprintBuffer | null
repliedToFingerprintBuffer | null
bodySrcHashBuffer | null – hash of bodySrc field
bodySrcFormatstring | null
bodystring | null
bodyFormatstring | null
createdAtnumber | null – of the current revision
permissionsnumber | null – 0 (reserved for future use)
attachmentsBuffer[] | null
Return value:
Buffer - the fingerprint in binary form

createNotificationPacketFingerprint1(objectType, id, nodeName, fullName, createdAt, type, notification)

Parameters:
objectTypestring | nullNOTIFICATION_PACKET
idstring | null
nodeNamestring | null
fullNamestring | null
createdAtnumber | null
typestring | null
notificationstring | null
Return value:
Buffer - the fingerprint in binary form

createNotificationPacketFingerprint0(objectType, id, nodeName, createdAt, type, notification)

Parameters:
objectTypestring | nullNOTIFICATION_PACKET
idstring | null
nodeNamestring | null
createdAtnumber | null
typestring | null
notificationstring | null
Return value:
Buffer - the fingerprint in binary form

createPostingFingerprint1(objectType, receiverName, ownerName, bodySrcHash, bodySrcFormat, body, bodyFormat, createdAt, permissions, attachments)

Parameters:
objectTypestring | nullPOSTING
receiverNamestring | null
ownerNamestring | null
bodySrcHashBuffer | null – hash of bodySrc field
bodySrcFormatstring | null
bodystring | null
bodyFormatstring | null
createdAtnumber | null – of the current revision
permissionsnumber | null – 0 (reserved for future use)
attachmentsBuffer[] | null – if the posting is linked to a media, its fingerprint should be put at the beginning of the list
Return value:
Buffer - the fingerprint in binary form

createPostingFingerprint0(objectType, receiverName, ownerName, bodySrcHash, bodySrcFormat, body, bodyFormat, createdAt, permissions, attachments)

Parameters:
objectTypestring | nullPOSTING
receiverNamestring | null
ownerNamestring | null
bodySrcHashBuffer | null – hash of bodySrc field
bodySrcFormatstring | null
bodystring | null
bodyFormatstring | null
createdAtnumber | null – of the current revision
permissionsnumber | null – 0 (reserved for future use)
attachmentsnumber | null – 0 (reserved for future use)
Return value:
Buffer - the fingerprint in binary form

createPushRelayMessageFingerprint0(objectType, signedAt)

Parameters:
objectTypestring | nullPUSH_RELAY_MESSAGE
signedAtnumber | null
Return value:
Buffer - the fingerprint in binary form

createPushRelayRegisterFingerprint0(objectType, clientId, lang, signedAt)

Parameters:
objectTypestring | nullPUSH_RELAY_REGISTER
clientIdstring | null
langstring | null
signedAtnumber | null
Return value:
Buffer - the fingerprint in binary form

createReactionFingerprint0(objectType, ownerName, entryFingerprint, negative, emoji)

Parameters:
objectTypestring | nullREACTION
ownerNamestring | null
entryFingerprintBuffer | null – hash of Posting or Comment fingerprint
negativeboolean | null
emojinumber | null
Return value:
Buffer - the fingerprint in binary form

createSheriffOrderFingerprint0(objectType, sheriffName, nodeName, feedName, entryFingerprint, category, reasonCode, reasonDetails, createdAt)

Parameters:
objectTypestring | nullSHERIFF_ORDER
sheriffNamestring | null
nodeNamestring | null
feedNamestring | null
entryFingerprintBuffer | null – hash of Posting or Comment fingerprint
categorystring | null
reasonCodestring | null
reasonDetailsstring | null
createdAtnumber | null
Return value:
Buffer - the fingerprint in binary form