This is the basic confirmation storage. For simple testing purposes
you can just use the default hash db parameter. If you do a deployment
you can probably get away with a shelf hash instead.
You can write your own version of this and use it. The confirmation
engine only cares that it gets something that supports all of these
methods.
|
|
__init__(self,
db={})
Change the db parameter to a shelf to get persistent storage. |
source code
|
|
|
|
clear(self)
Used primarily in testing, this clears out all pending confirmations. |
source code
|
|
|
|
key(self,
target,
from_address)
Used internally to construct a string key, if you write your own you
don't need this. |
source code
|
|
|
|
get(self,
target,
from_address)
Given a target and a from address, this returns a tuple of
(expected_secret, pending_message_id). |
source code
|
|
|
|
delete(self,
target,
from_address)
Removes a target+from_address from the storage. |
source code
|
|
|
|
store(self,
target,
from_address,
expected_secret,
pending_message_id)
Given a target, from_address it will store the expected_secret and
pending_message_id of later verification. |
source code
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|