Since the release of
beacon-sdk version 3.0, Beacon supports multiple blockchains.
Currently, 3 separate blockchain packages are available:
- Substrate (@airgap/beacon-blockchain-substrate)
- Tezos (@airgap/beacon-blockchain-tezos)
- Tezos Sapling (@airgap/beacon-blockchain-tezos-sapling)
Every blockchain can define their own messages. Those messages are then wrapped in a message with additional metadata from the beacon protocol.
See the docs about the individual packages for more information about the messages specific to certain blockchains.
In the Beacon protocol, every message is wrapped in the following wrapper.
The layout for the basic message is the same for all blockchains.
One core concept of Beacon is that as a first step (after establishing the connection), the dApp needs to request permissions to receive information about accounts and execute certain actions.
For this reason, there are two messages,
PermissionResponse, that are used to do the permission management.
Those messages are handled differently from the generic
BlockchainResponse messages because they have to be completed first before any other action can take place.
Following are the generic messages of the Beacon Protocol. They can be extended by every blockchain to add blockchain specific data and behaviour.
Please see the docs about the specific blockchain messages for examples.