at_demo_data 1.1.0 at_demo_data: ^1.1.0 copied to clipboard
A Dart library that contains testable atSign credentials and demo variables which can be used for testing with the local test environment.
at_demo_data #
Overview #
The at_demo_data package is for Flutter developers who would like use The Virtual Environment (VE) for running demo apps and testing on the atPlatform. The VE provides a full stack private atPlatform environment to build and test applications offline. A number preset atSigns are included in the VE and the secrets and keys are provided in this package for those test atSigns.
This open source package is written in Dart, supports Flutter and follows the atPlatform's decentralized, edge computing model with the following features:
- Cryptographic control of data access through personal data stores
- No application backend needed
- End to end encryption where only the data owner has the keys
- Private and surveillance free connectivity
We call giving people control of access to their data “flipping the internet” and you can learn more about how it works by reading this overview.
Get started #
There are two options to get started using this package.
1. Clone it from GitHub #
Feel free to fork a copy of the source from the GitHub repo. The example code contained there is the same as the template that is used by at_app above.
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
2. Manually add the package to a project #
Instructions on how to manually add this package to you project can be found on pub.dev here.
Usage #
For more information, please see the API documentation listed on pub.dev.
How to retrieve test environment values
// Production environment
String prodRoot = at_demo_data.prodRoot;
int prodPort = at_demo_data.prodPort;
// Local environment
String virtualRoot = at_demo_data.virtualRoot;
int virtualPort = at_demo_data.virtualPort;
How to access sample data:
// List of all atsigns
List<String> atSigns = at_demo_data.allAtsigns;
// PKAM public key String for a particular atSign can be retrieved from
// the pkamPublicKeyMap
String pkamPublicKey = at_demo_data.pkamPublicKeyMap['@alice🛠'];
// PKAM private key String for a particular atSign can be retrieved from
// the pkamPrivateKeyMap
String pkamPrivate = at_demo_data.pkamPrivateKeyMap['@alice🛠'];
// CRAM key String for a particular atSign can be retrieved from
// the cramKeyMap
String cramKey = at_demo_data.cramKeyMap['@alice🛠'];
Open source usage and contributions #
This is open source code, so feel free to use it as is, suggest changes or enhancements or create your own version. See CONTRIBUTING.md for detailed guidance on how to setup tools, tests and make a pull request.