Table of Contents | ||
---|---|---|
|
...
- Pico A receives a
wrangler:subscription
event which includes a wellKnown_Tx attribute. wellKnown_Tx is Pico B's wellKnown_Rx . Pico A then creates a channel for the subscription which is stored as Rx. - Pico A sends pico B
wrangler:subscription_request_needed
. Pico A sends all attributes it received with the following key attributes updated.- Tx - Pico A Rx.
- Tx_verify_key - Pico A's Rx channel verifyKey.
- Tx_public_key - Pico A's Rx channel encryptionPublicKey.
- name - name used for channel.
- channel_type - string used for channel type
- Pico B creates a Rx channel for the subscription which is stored as Rx along with Tx , Tx_verify_key, Tx_public_key in inbound subscription entity variable.
Pico A also raises an internalwrangler:new_subscription_request
event, with the corresponding attributes above which is stored in outbound subscription entity variable. - After storing pending subscriptions, Pico B and Pico A raises corresponding
wrangler:inbound_pending_subscription_added
event andwrangler:outbound_pending_subscription_added
event.
The state of each Picos subscription is static at this point. Pico A has an outgoing pending subscription and Pico B has an incoming pending subscription. - If Pico B wants to approve the subscription request, it raises the
wrangler:pending_subscription_approval
event with an attribute Rx containing the Rx channel identifier of the subscription to approve. Upon successfully storing the subscription in established entity variable. Pico B:- sends the
wrangler:outbound_pending_subscription_approved
event to Pico A on Pico B's subscriptions Tx. - raises an API internal event
wrangler:subscription_added.
- sends the
- Upon receiving the
wrangler:pending_subscription_approved
event, Pico A adds an Tx eci to the subscription and stores the subscription in established entity variable. And raises thewrangler:subscription_added
event. - If Pico B wants to reject the subscription, it raises the
wrangler:subscription_cancellation
event (internally) with an attribute named Rx - which is the Rx of the subscription to reject. Pico B:- sends the
wrangler:established_removal
event to Pico A on Picos B Tx eci, which then raises an internal APIwrangler:subscription_removed
event to itself. - raises the
wrangler:established_removal
event, which then raises an internal APIwrangler:subscription_removed
event.
- sends the
...
Events Users Could React To
- wrangler:inbound_pending_subscription_added
- wrangler:subscription_added
- wrangler:subscription_removed
...