{"id":16563219,"url":"https://github.com/benthecarman/wasm-dvm","last_synced_at":"2025-10-28T23:31:11.299Z","repository":{"id":219657011,"uuid":"749566686","full_name":"benthecarman/wasm-dvm","owner":"benthecarman","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-26T10:18:08.000Z","size":655,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T13:53:41.798Z","etag":null,"topics":["dvm","extism","nostr","wasm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benthecarman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-28T23:34:30.000Z","updated_at":"2025-01-18T12:06:44.000Z","dependencies_parsed_at":"2024-02-21T11:54:50.723Z","dependency_job_id":null,"html_url":"https://github.com/benthecarman/wasm-dvm","commit_stats":null,"previous_names":["benthecarman/wasm-dvm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benthecarman%2Fwasm-dvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benthecarman%2Fwasm-dvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benthecarman%2Fwasm-dvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benthecarman%2Fwasm-dvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benthecarman","download_url":"https://codeload.github.com/benthecarman/wasm-dvm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238737958,"owners_count":19522284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dvm","extism","nostr","wasm"],"created_at":"2024-10-11T20:39:08.503Z","updated_at":"2025-10-28T23:31:05.995Z","avatar_url":"https://github.com/benthecarman.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WASM DVM\n\n## Introduction\n\nWASM DVM is a WebAssembly-based [data vending machine](https://www.data-vending-machines.org/).\n\nCurrently, this uses [extism](https://extism.org/) as the execution environment. The Wasm code is executed in a\nWebAssembly runtime environment. If you want to develop a wasm plugin, you can use the [extism](https://extism.org/)\nPDK for developing and testing your wasm code.\n\n## Currently Supported Features\n\n- [x] Pay per time execution\n- [x] Pre-paid execution with zaps\n- [x] Encrypted input and output\n- [x] Scheduled execution\n- [x] DLC announcement based execution\n\n## Nostr Events\n\n### Input\n\nClients must provide the Wasm code in the `i` tag field. The Wasm code must be directly accessible at the provided URL.\nIt must also provide the input data and the provided function name to be executed.\n\nThe input should be a stringified JSON object with the following fields:\n\n- `url` (string): The URL of the Wasm binary.\n- `function` (string): The name of the function to be executed.\n- `input` (string): The input data for the function.\n- `time` (number): The maximum time in milliseconds to execute the function.\n- `checksum` (string): The sha256 hash of the Wasm binary in hex.\n- `shedule` (object): Scheduling parameters for the execution. The object should have the following fields:\n    - `run_date` (number): The date in seconds since the epoch to execute the function.\n    - `name` (optional string): Name of the event. Only used for DLC announcement\n    - `expected_outputs` (optional string array): The list of expected outputs from the function. Only used for DLC\n      announcement.\n\n### Output\n\nThe result of the execution is returned in the `content` field.\n\n### Example\n\nCount number of vowels in a string.\n\n#### Request\n\n```json\n{\n  \"content\": \"\",\n  \"kind\": 5600,\n  \"tags\": [\n    [\n      \"i\",\n      \"{\\\"url\\\":\\\"https://github.com/extism/plugins/releases/download/v0.5.0/count_vowels.wasm\\\",\\\"function\\\":\\\"count_vowels\\\",\\\"input\\\":\\\"Hello World\\\",\\\"time\\\": 1000, \\\"checksum\\\": \\\"93898457953d30d016f712ccf4336ce7e9971db5f7f3aff1edd252764f75d5d7\\\"}\",\n      \"text\"\n    ]\n  ]\n}\n```\n\n#### Response\n\n```json\n{\n  \"content\": \"{\\\"count\\\":3,\\\"total\\\":3,\\\"vowels\\\":\\\"aeiouAEIOU\\\"}\",\n  \"kind\": 6600\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenthecarman%2Fwasm-dvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenthecarman%2Fwasm-dvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenthecarman%2Fwasm-dvm/lists"}