Skip to content

dkneisly-figure/p8e-cee-api

 
 

p8e-cee-api

p8e-cee-api stands for the Provenance Contract Execution Environment API.

The p8e-cee-api allows for operations against the encrypted object store, with included support for multi-store replication, and creating and broadcasting scoped transmissions to the Provenance Blockchain.

Status

stability-release-candidate Latest Release License LOC

Overview

The Asset Originator's Guide provides contextual support for the varied use cases supported by this API. Having a fundamental understanding of the Provenance Blockchain is recommended.

Local Setup

To run this service locally, be sure to have Docker and Vault by Hashicorp installed:

brew install docker
brew tap hashicorp/tap
brew install hashicorp/tap/vault

If you plan on running smart contracts for asset classification you'll need the following:

brew install rust
brew install jq

You'll additionally need CoreUtils if your system is missing it:

brew install coreutils

Note: it's possible to install all dependencies with the following command:

./dc.sh setup

The default configuration assumes that the following ports are available:

Container Port(s)
PostgreSQL 5432
Object Store 1 5001
Object Store 2 5002
Vault 8200
Provenance 1317, 9090, 26657

If any are taken on your local machine, feel free to update the default values in the /service/docker/dependencies.yaml file and associated /service/docker/*.env files.

Once ready, all you need to do is run the included docker setup script from the root directory:

./dc.sh up

Then, run the service - either via an Intellij run configuration or via the command line with the following command:

./gradlew bootRun

Swagger Documentation

once the service is running, try out some local calls using Swagger!

http://localhost:8080/p8e-cee-api/secure/docs/api.html

Publishing p8e Contracts Locally

As a convenience, you can publish contracts from another repository without leaving this project in the command line.

./dc.sh -p <path to contracts repository> -v <version to publish> publish

For example:

./dc.sh -p ../../provenance-io/loan-package-contracts -v 0.3.2 publish

Note: This convenience method uses preset environment variables found in /service/docker/bootstrap.env and assumes the address used to sign the transactions associated with publishing the contracts is listed in the genesis block (/service/docker/prov-init/config/genesis.json).

About

The p8e-cee-api allows for operations against the encrypted object store, with included support for multi-store replication, and creating and broadcasting scoped transmissions to the Provenance Blockchain.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Kotlin 93.5%
  • Shell 6.1%
  • Dockerfile 0.4%