Skip to content

Fetches a document and prints its structure for debugging.

Usage

amsync_inspect(url, doc_id, timeout = 5000L, tls = NULL, max_depth = 2)

Arguments

url

WebSocket URL of the sync server.

doc_id

Document ID (base58check encoded string).

timeout

Timeout in milliseconds. Default 5000.

tls

(optional) for secure wss:// connections to servers with self-signed or custom CA certificates, a TLS configuration object created by nanonext::tls_config().

max_depth

Maximum depth to recurse into nested structures. Default 2.

Value

Invisibly returns the fetched automerge document.

Examples

if (FALSE) { # \dontrun{
# Inspect document structure from public server
amsync_inspect("wss://sync.automerge.org/", "4F63WJPDzbHkkfKa66h1Qrr1sC5U")
} # }