Phala Network Docs
  • Home
    • 👾Phala Network Docs
  • Overview
    • ⚖️Phala Network
      • 💎Phala Cloud
      • 🥷Dstack
      • 🔐GPU TEE
    • 💎PHA Token
      • 🪙Introduction
      • 👐Delegation
        • Delegate to StakePool
        • What is Vault
        • What is Share
        • WrappedBalances & W-PHA
        • Examples of Delegation
        • Use Phala App to Delegate
        • Estimate Your Reward
      • 🗳️Governance
        • Governance Mechanism
        • Join the Council
        • Voting for Councillors
        • Apply for Project Funding
        • Phala Treasury
        • Phala Governance
        • Setting Up an Account Identity
  • Phala Cloud
    • 🚀Getting Started
      • Sign-up for Cloud Account
      • Start from Cloud UI
      • Start from Cloud CLI
      • Start from Template
    • 🟧Launch an Eliza Agent
    • 📦Create CVM
      • Create CVM with Docker Compose
      • Create CVM with Private Docker Image
      • Set Secure Environment Variables
      • Access Your Applications
      • Setting Up Custom Domain
      • Debug Your Application
      • Deployment Cheat Sheet
    • ⚙️CVM Management
      • Upgrade Application
      • Resize Resources
      • Check Logs
      • Private Log Viewer
    • 🔄Deploy Docker App in TEE
      • Expose Service Port
      • Generate RA Report
      • Access Database
      • Create Crypto Wallet
    • 🛳️Setup a CI/CD Pipeline
    • 🛠️Phala Cloud CLI Reference
      • phala
        • auth
        • cvms
        • docker
        • simulator
    • Production Checklist
    • ❓FAQs
    • 🔍Troubleshooting
    • 📖Glossary
    • 📋References
    • 🔒Use Cases
      • TEE with AI
      • TEE with FHE and MPC
      • TEE with ZK and ZKrollup
  • Dstack
    • Overview
    • Getting Started
    • Hardware Requirements
    • Design Documents
      • Decentralized Root-of-Trust
      • Key Management Protocol
      • Zero Trust HTTPs (TLS)
    • Acknowledgement
  • LLM in GPU TEE
    • 👩‍💻Host LLM in GPU TEE
    • 🔐GPU TEE Inference API
    • 🏎️GPU TEE Benchmark
  • Tech Specs
    • ⛓️Blockchain
      • Blockchain Entities
      • Cluster of Workers
      • Secret Key Hierarchy
  • References
    • 🔐Setting Up a Wallet on Phala
      • Acquiring PHA
    • 🌉SubBridge
      • Cross-chain Transfer
      • Supported Assets
      • Asset Integration Guide
      • Technical Details
    • 👷Community Builders
    • 🤹Hackathon Guides
      • ETHGlobal Singapore
      • ETHGlobal San Francisco
      • ETHGlobal Bangkok
    • 🤯Advanced Topics
      • Cross Chain Solutions
      • System Contract and Drivers
      • Run Local Testnet
      • SideVM
    • 🆘Support
      • Available Phala Chains
      • Resource Limits
      • Transaction Costs
      • Compatibility Matrix
      • Block Explorers
      • Faucet
    • ⁉️FAQ
  • Compute Providers
    • 🙃Basic Info
      • Introduction
      • Gemini Tokenomics (Worker Rewards)
      • Budget balancer
      • Staking Mechanism
      • Requirements in Phala
      • Confidence Level & SGX Function
      • Rent Hardware
      • Error Summary
    • 🦿Run Workers on Phala
      • Solo Worker Deployment
      • PRBv3 Deployment
      • Using PRBv3 UI
      • PRB Worker Deployment
      • Switch Workers from Solo to PRB Mode
      • Headers-cache deployment
      • Archive node deployment
    • 🛡️Gatekeeper
      • Collator
      • Gatekeeper
  • Web Directory
    • Discord
    • GitHub
    • Twitter
    • YouTube
    • Forum
    • Medium
    • Telegram
  • Legacy
    • Information
    • ⚒️Phala SDK
    • 👨‍🚀Builders Program
    • 🥷AI Agent Contract
      • WapoJS Functions
      • Phala Agent Gateway
  • AI Agent Contract (Legacy)
    • 👩‍💻Getting Started
      • Build Your First AI Agent Contract
      • Build An Agent to Transact Onchain
      • Build Your AI Agent Contract with OpenAI
      • Build Your AI Agent Contract with LangChain
      • Integrate with 3rd Party API with HTTP Request
      • Run a Local Testnet With Docker
      • AI Agent Contract Templates
    • 🧙‍♂️Examples
      • Create a Weather Agent w/ Function Calling
    • ⛓️Supported Chains
    • FAQ
  • Agent Wars (Legacy)
    • 📜Introduction
    • 💸Tokenomics
    • ▶️Getting Started
      • Wallet Setup & Get PHA
      • Buy and Sell Keys
    • 🧑‍🏫Tutorial
Powered by GitBook
LogoLogo

Participate

  • Compute Providers
  • Node
  • Community
  • About Us

Resources

  • Technical Whitepaper
  • Token Economics
  • Docs
  • GitHub

More

  • Testnet
  • Explorer
  • Careers
  • Responsible Disclosure

COPYRIGHT © 2024 PHALA.LTD ALL RIGHTS RESERVED. May Phala be with you!

On this page
  • Phala Hackathon Guide at ETHGlobal Bangkok
  • Introduction
  • Requirements
  • Getting Started
  • Ideas to Build

Was this helpful?

Edit on GitHub
  1. References
  2. Hackathon Guides

ETHGlobal Bangkok

PreviousETHGlobal San FranciscoNextAdvanced Topics

Last updated 24 days ago

Was this helpful?

WARNING

This section is no longer recommended for deploying on Phala. To build and deploy securely and efficiently, please use the fully managed platform instead. Check out the doc on how to .

Phala Hackathon Guide at ETHGlobal Bangkok

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.

Check out the an TEE Docker SDK we deployed called the !

For a detailed guide on getting started, check out the Start From Scratch or Build From Template guides.

Introduction

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

// Tappd Client
const client = new TappdClient(endpoint)
// Remote Attestation
const getRemoteAttestation = await client.tdxQuote('dataString')
# Tappd Client
client = AsyncTappdClient(endpoint)
# Remote Attestation
result = await client.tdx_quote('dataString')
  • Derive Key Account

// Tappd Client
const client = new TappdClient(endpoint)
// Derive Key Account
const randomDeriveKey = await client.deriveKey('/', 'dataString')
# Tappd Client
client = AsyncTappdClient(endpoint)
# Derive Key Account
result = await client.derive_key('/', 'dataString')

Requirements

Getting Started

First, run the TEE Attestation Simulator:

docker run --rm -p 8090:8090 phalanetwork/tappd-simulator:v0.0.1

Next, download the dependencies with yarn

yarn

Build 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:latest

Now you can go to your browser and see a frontend UI like below:

Run the TEE Remote Attestation Simulator:

docker run --rm -p 8090:8090 phalanetwork/tappd-simulator:latest

Build the python docker container:

docker build -t your-dapp:latest .

Run the python docker container:

docker run --rm -p 3000:3000 your-dapp:latest

Now make a request to get the remote attesation and derived key account

curl http://127.0.0.1:3000

Ideas to Build

  • 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

    • 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

>= v18.18.x or 3

or for local docker deployments with a TEE Attestation simulator

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 .

Run the many LLMs written in python and available on

🤹
Phala Cloud
get started
TEE Docker SDK Cheat Sheet
node
python
Docker
OrbStack
ETH Global
huggingface