From 63b1ec89ad4d94c7bc2b268ac34d4bc8c9e014a3 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Wed, 7 Jan 2026 16:46:27 -0500 Subject: [PATCH] docs(readme): update build and test commands for Go 1.25+ and TinyGo removal --- README.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9840f66..45b629d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Motr Enclave -Motr Enclave is an [Extism](https://extism.org) plugin that provides encrypted key storage for the Nebula wallet. Built with Go and compiled with TinyGo for the `wasip1` target, it embeds a SQLite database for managing sensitive identity and cryptographic material. +Motr Enclave is an [Extism](https://extism.org) plugin that provides encrypted key storage for the Nebula wallet. Built with Go 1.25+ and compiled for the `wasip1` target, it embeds a SQLite database for managing sensitive identity and cryptographic material. ## Overview @@ -15,7 +15,7 @@ The enclave runs as a portable WASM plugin with an embedded SQLite database. All │ │ │ ┌──────────────────────┐ ┌──────────────────────────────────┐ │ │ │ Extism Plugin │ │ API Clients (Live Data) │ │ -│ │ (TinyGo/wasip1) │ │ │ │ +│ │ (Go/wasip1) │ │ │ │ │ ├──────────────────────┤ ├──────────────────────────────────┤ │ │ │ • WebAuthn Creds │ │ • Token Balances │ │ │ │ • MPC Key Shares │ │ • Transaction History │ │ @@ -93,35 +93,46 @@ motr-enclave/ ├── db/ │ ├── schema.sql # Database schema (12 tables) │ └── query.sql # SQLC query definitions +├── example/ +│ ├── index.html # Browser test UI +│ └── test.js # Extism JS SDK test harness ├── sqlc.yaml # SQLC configuration ├── Makefile # Build commands -└── main.go # Plugin entry point (TBD) +└── main.go # Plugin entry point ``` ## Development ### Prerequisites -- [Go](https://go.dev/doc/install) 1.21+ -- [TinyGo](https://tinygo.org/getting-started/install/) 0.30+ +- [Go](https://go.dev/doc/install) 1.25+ - [SQLC](https://sqlc.dev/) for database code generation - [Extism CLI](https://extism.org/docs/install) (optional, for testing) ### Building ```bash -make build # Build with TinyGo for wasip1 +make build # Build WASM for wasip1 make generate # Regenerate SQLC database code -make test # Run tests (requires Go, not TinyGo) +make test # Run tests ``` ### Testing the Plugin +**CLI Testing:** ```bash -extism call ./build/enclave.wasm generate --input '{"credential": "..."}' -extism call ./build/enclave.wasm query --input 'did:sonr:abc123' +extism call ./build/enclave.wasm generate --input '{"credential": "dGVzdA=="}' --wasi +extism call ./build/enclave.wasm query --input '{"did": "did:sonr:abc123"}' --wasi ``` +**Browser Testing:** +```bash +make serve +# Open http://localhost:8080/example/ in your browser +``` + +The browser test UI provides interactive testing of all plugin functions with real-time output. + ## Tables | Table | Description |