Welcome to the Phala Hackathon Guide! This guide will provide you with all the necessary information to get started building on our platform. Whether you're a seasoned developer or new to the ecosystem, this guide will help you navigate through the essential steps and resources to build on our TEE Docker SDK.
{% hint style="info" %} Check out the an TEE Docker SDK we deployed called the TEE Docker SDK Cheat Sheet!
For a detailed guide on getting started, check out the Start From Scratch or Build From Template guides. {% endhint %}
Welcome to the Hackathon guide for Phala's TEE Docker SDK. If you are a Docker expert then this new developer-friendly SDK is your oyster. You now have the ability to deploy your docker containers within a TEE and utilize the JS & Python SDKs to have TEE functions to do:
- Remote Attestations
{% tabs %} {% tab title="JS SDK" %}
// Tappd Client
const client = new TappdClient(endpoint)
// Remote Attestation
const getRemoteAttestation = await client.tdxQuote('dataString')
{% endtab %}
{% tab title="Python SDK" %}
# Tappd Client
client = AsyncTappdClient(endpoint)
# Remote Attestation
result = await client.tdx_quote('dataString'){% endtab %} {% endtabs %}
- Derive Key Account
{% tabs %} {% tab title="JS SDK" %}
// Tappd Client
const client = new TappdClient(endpoint)
// Derive Key Account
const randomDeriveKey = await client.deriveKey('/', 'dataString'){% endtab %}
{% tab title="Python SDK" %}
# Tappd Client
client = AsyncTappdClient(endpoint)
# Derive Key Account
result = await client.derive_key('/', 'dataString'){% endtab %} {% endtabs %}
- node >= v18.18.x or python 3
- Docker or OrbStack for local docker deployments with a TEE Attestation simulator
{% tabs %} {% tab title="JS SDK" %}
First, run the TEE Attestation Simulator:
docker run --rm -p 8090:8090 phalanetwork/tappd-simulator:v0.0.1Next, download the dependencies with yarn
yarnBuild the docker image
docker build -t your-dapp:latest .After the build is successful, run your docker image to connect to the TEE Attestation Simulator
NOTE: Your docker image hash will be different than the one listed below.
docker run --rm -p 3000:3000 your-dapp:latestNow you can go to your browser and see a frontend UI like below:
{% endtab %}{% tab title="Python SDK" %} Run the TEE Remote Attestation Simulator:
docker run --rm -p 8090:8090 phalanetwork/tappd-simulator:latestBuild the python docker container:
docker build -t your-dapp:latest .Run the python docker container:
docker run --rm -p 3000:3000 your-dapp:latestNow make a request to get the remote attesation and derived key account
curl http://127.0.0.1:3000{% endtab %} {% endtabs %}
With the ability to deploy docker in TEE, you are now free to use Phala as your base to exploring the many different prizes available at ETH Global.
- Web2 in, Web3 out
- Build a product that takes a Web2 technology and make it Web3 with the use of TEE functions Remote Attestation & Derive Key Account
- Encumber Web2 Accounts for delegated access
- Bind Web2 business logic onchain
- What Do You Meme-coin??
- Build an innovative product that solves a key memecoin funnel issue and convert users to your memecoins easier
- Launch a unique memecoin that aims to solve something for a good cause
- Create the end all, be all of memecoins that will last decades down the road
- Use AI to enhance the Web3 Experience
- Run the many LLMs written in python and available on huggingface
- Build a competitor to the infamous AI memecoins with an objective to provide misinformation to the competition, and surpass the current leaders in AI memecoins
- Train your own small LLM and push attestations onchain for proof of training, etc.
- Launch Verifiable Products
- Use Remote Attestation and Derive Key Account signatures to harden the connection between a user and onchain smart contracts
- Add AI to be able to detect if a frontend is malicious or not
- Build a product for data provenance based on attested data pipelines
- Put ZK in TEE
- zkTLS in TEE
- ZK Prover/Verifier in TEE
.png)