pybitmessage.network.bmobject module¶
BMObject and it’s exceptions.
-
class
BMObject
(nonce, expiresTime, objectType, version, streamNumber, data, payloadOffset)[source]¶ Bases:
object
Bitmessage Object as a class.
-
checkAlreadyHave
()¶ Check if we already have the object (so that we don’t duplicate it in inventory or advertise it unnecessarily)
-
checkBroadcast
()¶ “Broadcast” object type checks.
-
checkEOLSanity
()¶ Check if object’s lifetime isn’t ridiculously far in the past or future.
-
checkGetpubkey
()¶ “Getpubkey” object type checks.
-
checkMessage
()¶ “Message” object type checks.
-
checkObjectByType
()¶ Call a object type specific check (objects can have additional checks based on their types)
-
checkProofOfWorkSufficient
()¶ Perform a proof of work check for sufficiency.
-
checkPubkey
()¶ “Pubkey” object type checks.
-
checkStream
()¶ Check if object’s stream matches streams we are interested in
-
maxTTL
= 2430000¶
-
minTTL
= -3600¶
-
-
exception
BMObjectAlreadyHaveError
[source]¶ Bases:
exceptions.Exception
We received a duplicate object (one we already have)
-
errorCodes
= 'Already have this object'¶
-
-
exception
BMObjectExpiredError
[source]¶ Bases:
exceptions.Exception
Exception indicating the object’s lifetime has expired.
-
errorCodes
= 'Object expired'¶
-
-
exception
BMObjectInsufficientPOWError
[source]¶ Bases:
exceptions.Exception
Exception indicating the object doesn’t have sufficient proof of work.
-
errorCodes
= 'Insufficient proof of work'¶
-
-
exception
BMObjectInvalidDataError
[source]¶ Bases:
exceptions.Exception
Exception indicating the data being parsed does not match the specification.
-
errorCodes
= 'Data invalid'¶
-
-
exception
BMObjectInvalidError
[source]¶ Bases:
exceptions.Exception
The object’s data does not match object specification.
-
errorCodes
= 'Invalid object'¶
-
-
exception
BMObjectUnwantedStreamError
[source]¶ Bases:
exceptions.Exception
Exception indicating the object is in a stream we didn’t advertise as being interested in.
-
errorCodes
= 'Object in unwanted stream'¶
-