Skip to content

Applications and blobs

Applications are the WASM programs a context runs. Blobs are the binary objects (including application bytecode) the node stores. This guide covers both.

Install from a URL. The optional hash (a hex-encoded 32-byte digest) pins the download, and metadata is optional bytes:

result = client.install_application(
url="https://example.com/app.wasm",
hash=None, # optional hex-encoded 32-byte hash
metadata=None, # optional bytes
)

For local development, install straight from a path on the node’s filesystem:

client.install_dev_application("/path/to/app.wasm", metadata=None)
client.list_applications() # all installed applications
client.get_application("<application-id>") # one application's info
client.list_application_versions("<application-id>") # retained bytecode versions

list_application_versions returns each locally retained bytecode version — the latest install plus any older blobs still referenced by groups or context activation markers. Each row’s blobId doubles as the app_key accepted by create_namespace.

client.uninstall_application("<application-id>")

Give an application a friendly name:

client.create_application_alias("my-app", "<application-id>")
client.lookup_application_alias("my-app")
client.resolve_application_alias("my-app")
client.list_application_aliases()
client.delete_application_alias("my-app")

Upload raw bytes, optionally scoped to a context:

info = client.upload_blob(b"...raw bytes...", context_id=None)

Download returns the blob’s bytes directly:

data = client.download_blob("<blob-id>", context_id=None) # -> bytes

Inspect and manage stored blobs:

client.list_blobs() # all blobs
client.get_blob_info("<blob-id>") # one blob's metadata
client.delete_blob("<blob-id>") # remove a blob

Blob IDs are validated — an invalid ID raises ValueError.