The mobile bindings make use of gomobile which is Golang's official mobile support tool.
As gomobile is experimental, these bindings have been developed within its constraints of which the most notable are type restrictions.
The Golang code in this project contains wrappers for all Aries-Framework-Go controllers. The structs and method signatures used in these wrappers have been designed to optimise the user experience regardless of gomobile's limitations.
The entrypoint of this project is main.go
.
A mobile app that uses the generated SDK from this project has the option to use a local agent or a remote agent.
A local agent will handle all operations within the generated SDK.
A remote agent will forward all operations to an Aries agent deployed on an external server.
Here are examples for:
The AriesController
interface defines all operations that a wrapped Aries agent must implement.
It uses the following interfaces:
- DIDExchangeController
- IntroduceController
- IssueCredentialController
- KMSController
- MediatorController
- MessagingController
- OutOfBandController
- PresentProofController
- VDRIController
- VerifiableController
Aries
implements the AriesController
interface.
It contains an Aries Framework
object from the Aries-Framework-Go library and a map of handlers for all controllers and their operations that are implemented in
controller/command
.
The full implementation of the local agent's wrappers can be found in
pkg/wrappers/command
.
Aries
implements the AriesController
interface.
It contains a map of controller names to the endpoints of their operations. It also holds a URL to which it sends HTTP requests.
The full implementation of the remote agent's wrappers can be found in
pkg/wrappers/rest
.
A UML diagram illustrating the relationship between the interfaces and their implementations can be generated here using the following steps:
- Set
Repository URL
to https://github.com/hyperledger/aries-framework-go - Set the project root in "Rendering options" to cmd/aries-agent-mobile