Project initialized using @stackr/sdk
Presentation: https://drive.google.com/drive/folders/1AnQq3-L6scJ5i2VFYQ-_oLemnFttZijj?usp=sharing
Tech used: Avail + Stackr Chronicle used as Oracle on-chain XMTP Message Lit queries Stackr for the intents, broadcasts it to friends (with decryption key) Lit protocol for key management, onboarding, etc LayerZero for cross chain communication
Step by step:
- Users use Lit protocol to encrypt messages
- Encryted message sent to stackr (using Avail DA) chain
- Message propogated to other chains (Rootstock) using LayerZero
- Friends get told about the decryption key via MessageKit group chat
- Any friend (using Lit decryption) can fill the intent!
.
├── .env.example
├── .gitignore
├── Dockerfile
├── genesis-state.json
├── package-lock.json
├── package.json
├── src
│ ├── index.ts ## -> starting point, everything gets imported here.
│ ├── server.ts ## -> server setup if any in the example.
│ ├── cli.ts ## -> CLI interaction setup if any in the example.
│ ├── contract ## -> place to keep your utility Contracts (like Bridge contract)
│ │ └──Contract.sol
│ ├── stackr
│ ├── machine.ts ## -> preferred place to keep your State Machine(s) and export from
│ ├── mru.ts ## -> place to initialize your MicroRollup
│ ├── state.ts ## -> file to define your State class, can be omitted if state is trivial.
│ └── transitions.ts ## -> one place to store all your transitions & hooks _(hooks can have separate hooks.ts file too.)_
├── stackr.config.ts
├── tests
│ └── some.test.ts
└── tsconfig.jsonNote: Some files are specific to certain examples, as mentioned in the tree above.
npm start- Build the image using the following command:
# For Linux
docker build -t FriendlyIntents:latest .
# For Mac with Apple Silicon chips
docker buildx build --platform linux/amd64,linux/arm64 -t FriendlyIntents:latest .- Run the Docker container using the following command:
# If using SQLite as the datastore
docker run --env-file .env -v ./db.sqlite:/app/db.sqlite -p <HOST_PORT>:<CONTAINER_PORT> --name=FriendlyIntents -it FriendlyIntents:latest
# If using other URI based datastores
docker run --env-file .env -p <HOST_PORT>:<CONTAINER_PORT> --name=FriendlyIntents -it FriendlyIntents:latestTo leverage examples and test the SDK, you can use Stackr's Playground hosted at: https://playground.stackrlabs.xyz.
In you application, add Playground by importing the following:
import { Playground } from "@stackr/sdk/plugins";
const rollup = ...
await rollup.init();
Playground.init(rollup);
// this will start a server at http://localhost:42069, which is taken as input by the PlaygroundFull instructions can be found at here
To explore your submitted blocks and batches, you can use the Vulcan Explorer hosted at: https://explorer.vulcan.stf.xyz/.