Async file-receiving transport pairing offers, acknowledgments, and TransitReceiver.
# Source: https://github.com/magic-wormhole/magic-wormhole | License: MIT | Copyright 2015 Brian Warner
# Provided via justclaw.it.com; keep this notice with the code.
from attr import attrib, attrs
from attr.validators import instance_of
from automat import MethodicalMachine
from zope.interface import implementer
from . import _interfaces
from ._key import CryptoError, decrypt_data, derive_key, derive_phase_key
from .util import provides
@attrs
@implementer(_interfaces.IReceive)
class Receive:
_side = attrib(validator=instance_of(str))
_timing = attrib(validator=provides(_interfaces.ITiming))
m = MethodicalMachine()
set_trace = getattr(m, "_setTrace",
lambda self, f: None) # pragma: no cover
def __attrs_post_init__(self):
self._key
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key