autodidaddict/echo-example - wapm
Wapm logo
search

The search results will appear here

autodidaddict/echo-exampleWascap

0.0.4 Public • Published a month ago413.42 KB

An example echo server built for Waxosuit

Copy and paste to install this package
wapm install autodidaddict/echo-example

homeHomepage

launchGithub (grade - call_split - error_outline - open issues/PRs)

Waxosuit Echo Example

This example WebAssembly module provides a demonstration of a Wasm module built according to the Wascap specification. You can run this module using Waxosuit.

This sample returns the incoming request as a JSON object so you can verify that the request/response pattern is working properly in your WebAssembly module. For example, when this is running on port 8080:

$ curl localhost:8080/foo/bar?a=b | jq
{
  "method": "GET",
  "path": "/foo/bar",
  "query_string": "a=b",
  "headers": {
    "accept": "*/*",
    "host": "localhost:8080",
    "user-agent": "curl/7.58.0"
  },
  "body": []
}

This WebAssembly module is signed with multiple capabilities, but you will need to provide at least the HTTP server capability for this module to work properly.

Signature

This module has been signed by the wascap CLI, ensuring that the module identity and the identity of the issuer are indisputable. If you want to verify the authenticity of this module, you can use wascap caps <target> from your terminal. You should see the following information:

╔════════════════════════════════════════════════════════════════════════════╗
║                                WASCAP Module                               ║
╠═══════════════╦════════════════════════════════════════════════════════════╣
║ Account       ║   ABHUOCYPSFAYVQXEVMOSGQKABFF4LUS35EFE3VCEG3BIEJBGI5GUOCUN ║
╠═══════════════╬════════════════════════════════════════════════════════════╣
║ Module        ║   MBY3SLBLMVLQY7KBULCUK3L2GVPPFY5AIWF3P5UBM2OON6NE3HW4JKRJ ║
╠═══════════════╬════════════════════════════════════════════════════════════╣
║ Expires       ║                                                      never ║
╠═══════════════╬════════════════════════════════════════════════════════════╣
║ Can Be Used   ║                                                immediately ║
╠═══════════════╩════════════════════════════════════════════════════════════╣
║                                Capabilities                                ║
╠════════════════════════════════════════════════════════════════════════════╣
║ K/V Store                                                                  ║
║ Messaging                                                                  ║
║ HTTP Server                                                                ║
╠════════════════════════════════════════════════════════════════════════════╣
║                                    Tags                                    ║
╠════════════════════════════════════════════════════════════════════════════╣
║ None                                                                       ║
╚════════════════════════════════════════════════════════════════════════════╝

If the account public key or the module public key do not match what you see after downloading/installing this module, then the module has been tampered with.