### Starting SSRI Executor Locally with Rust Source: https://github.com/alive24/ssri-server/blob/master/README.md This command starts the SSRI Executor JSON RPC server locally using `cargo run`. The `RUST_LOG` environment variable is set to `ssri_server=debug` to enable debug-level logging for the server, useful for development and troubleshooting. ```shell RUST_LOG=ssri_server=debug cargo run ``` -------------------------------- ### Running SSRI Executor with Docker Source: https://github.com/alive24/ssri-server/blob/master/README.md This command starts the SSRI Executor JSON RPC server using Docker, mapping port 9090 from the container to the host. It provides a quick and isolated way to run the server. ```shell docker run -p 9090:9090 hanssen0/ckb-ssri-server ``` -------------------------------- ### SSRI Executor Server Configuration (TOML) Source: https://github.com/alive24/ssri-server/blob/master/README.md This TOML snippet demonstrates the basic configuration for the SSRI Executor server. It specifies the CKB RPC endpoint, the server's listening address, and a flag for script debugging. This file (`config.toml` or `config.mainnet.toml`) is used to customize server behavior. ```toml ckb_rpc = "https://testnet.ckb.dev/" server_addr = "0.0.0.0:9090" script_debug = false ``` -------------------------------- ### Obtaining SSRI Method Parameters in Rust Source: https://github.com/alive24/ssri-server/blob/master/README.md This Rust snippet illustrates how to derive the correct hexadecimal parameter for an SSRI method call, specifically `SSRI.get_methods`. It uses `method_path`, `to_le_bytes`, and `encode_hex` to convert a method path into a byte array and then into a hexadecimal string, which is required for direct executor calls. ```rust let get_methods_path = method_path("SSRI.get_methods"); let get_methods_path_in_bytes = get_methods_path.to_le_bytes(); let get_methods_path_path_hex = encode_hex(&get_methods_path_in_bytes); // get_methods_path_hex is `0x58f02409de9de7b1` ``` -------------------------------- ### Calling SSRI Executor Directly via cURL (JSON RPC) Source: https://github.com/alive24/ssri-server/blob/master/README.md This shell command demonstrates how to directly interact with the SSRI Executor via cURL, sending a JSON RPC request. It calls the `run_script_level_code` method with specific parameters, useful for debugging or resource-constrained environments where a full SDK is not used. ```shell echo '{ "id": 2, "jsonrpc": "2.0", "method": "run_script_level_code", "params": ["0xb442eda5c133387c345d1e081d36b5163e09fd665d20b8ae0abe5a2366b851ee", 0, ["0x58f02409de9de7b1", "0x0000000000000000", "0x0a00000000000000"]] }' \ | curl -H 'content-type: application/json' -d @- \ http://localhost:9090 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.