### Install Foundry and Initialize Project Source: https://docs.oasis.io/build/tools/foundry Installs Foundry using foundryup, creates a new Forge project, and navigates into the project directory. This is the initial setup for any Foundry project. ```shell curl -L https://foundry.paradigm.xyz | bash foundryup source ~/.bashrc forge init sapphire_demo cd sapphire_demo ``` -------------------------------- ### Initialize and Start ElizaOS Agent Source: https://docs.oasis.io/build/use-cases/trustless-agent Commands to install the ElizaOS CLI, initialize a new project, and start the agent locally for testing. ```shell bun --version || curl -fsSL https://bun.sh/install | bash bun install -g @elizaos/cli elizaos create -t project rofl-eliza cd rofl-eliza elizaos start ``` -------------------------------- ### Install ElizaOS CLI and Create Agent Source: https://docs.oasis.io/llms-full.txt Installs the ElizaOS CLI using bun and creates a new Eliza agent project configured for ROFL. It prompts for database selection and OpenAI model/key. Finally, it starts the agent locally for testing. ```shell # Install bun and ElizaOS CLI bun --version || curl -fsSL https://bun.sh/install | bash bun install -g @elizaos/cli # Create and configure the agent elizaos create -t project rofl-eliza # 1) Select Pqlite database # 2) Select the OpenAI model and enter your OpenAI key # Test the agent locally cd rofl-eliza elizaos start # Visiting http://localhost:3000 with your browser should open Eliza UI ``` -------------------------------- ### Install jemalloc from source Source: https://docs.oasis.io/core/development-setup/prerequisites Downloads, verifies, configures, and installs jemalloc 5.2.1 from source. This is required for BadgerDB support and must be installed to the default /usr/local prefix. ```bash JEMALLOC_VERSION=5.2.1 JEMALLOC_CHECKSUM=34330e5ce276099e2e8950d9335db5a875689a4c6a56751ef3b1d8c537f887f6 JEMALLOC_GITHUB=https://github.com/jemalloc/jemalloc/releases/download/ pushd $(mktemp -d) wget -O jemalloc.tar.bz2 "${JEMALLOC_GITHUB}/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2" echo "${JEMALLOC_CHECKSUM} jemalloc.tar.bz2" | sha256sum -c tar -xf jemalloc.tar.bz2 cd jemalloc-${JEMALLOC_VERSION} EXTRA_CXXFLAGS=-ffile-prefix-map=$(pwd -L)=. EXTRA_CFLAGS=-ffile-prefix-map=$(pwd -L)=. ./configure --with-jemalloc-prefix='je_' --with-malloc-conf='background_thread:true,metadata_thp:auto' make sudo make install popd ``` -------------------------------- ### Install Go Development Utilities Source: https://docs.oasis.io/core/development-setup/prerequisites Installs optional Go tools for formatting, linting, and protocol buffer generation. ```bash ${OASIS_GO:-go} install mvdan.cc/gofumpt@v0.8.0 ${OASIS_GO:-go} install golang.org/x/tools/cmd/goimports@v0.36.0 curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(${OASIS_GO:-go} env GOPATH)/bin v2.8.0 ${OASIS_GO:-go} install google.golang.org/protobuf/cmd/protoc-gen-go@v1.21.0 ``` -------------------------------- ### Setup Python Telegram Bot Environment Source: https://docs.oasis.io/llms-full.txt Steps to set up a Python virtual environment, install the python-telegram-bot library, and create a basic bot script. The bot responds to the /hello command. ```shell python -m venv my_env source my_env/bin/activate echo python-telegram-bot > requirements.txt pip install -r requirements.txt ``` ```python import os from telegram import Update from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes async def hello(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: await update.message.reply_text(f'Hello {update.effective_user.first_name}') app = ApplicationBuilder().token(os.getenv("TOKEN")).build() app.add_handler(CommandHandler("hello", hello)) app.run_polling() ``` -------------------------------- ### Unmnemonic Tool Interactive Prompt Example Source: https://docs.oasis.io/llms-full.txt This example demonstrates the interactive prompt of the unmnemonic tool when recovering Oasis Network signing keys from mnemonics. It guides the user through selecting the algorithm, entering mnemonic words, specifying the wallet index, and writing keys to disk. ```shell unmnemonic - Recover Oasis Network signing keys from mnemonics ? Which algorithm does your wallet use Ledger WARNING: Entering your Ledger device mnemonic into any non-Leger device can COMPROMISE THE SECURITY OF ALL ACCOUNTS TIED TO THE MNEMONIC. Use of this tool is STRONGLY DISCOURAGED. ? Have you read and understand the warning Yes ? How many words is your mnemonic 24 ? Enter word 1 ***** ? Enter word 2 **** ? Enter word 3 **** ? Enter word 4 ****** ? Enter word 5 **** ? Enter word 6 ***** ? Enter word 7 **** ? Enter word 8 ******* ? Enter word 9 ****** ? Enter word 10 ***** ? Enter word 11 *** ? Enter word 12 ***** ? Enter word 13 ***** ? Enter word 14 **** ? Enter word 15 **** ? Enter word 16 ****** ? Enter word 17 **** ? Enter word 18 ***** ? Enter word 19 **** ? Enter word 20 ******* ? Enter word 21 ****** ? Enter word 22 ***** ? Enter word 23 *** ? Enter word 24 ***** ? Wallet index(es) (comma separated) 4 Index[4]: oasis1qqwkm23pyg638xvl2nu00frxhapusjjv8qhh3p77 ? Write the keys to disk Yes ? Output directory /home/oa/tmp/wallet-export-2023-11-28 Index[4]: oasis1qqwkm23pyg638xvl2nu00frxhapusjjv8qhh3p77.private.pem - done Done writing wallet keys to disk, goodbye. ``` -------------------------------- ### Build Bubblewrap from Source Source: https://docs.oasis.io/node/run-your-node/paratime-node Instructions for building and installing Bubblewrap from its source code, including installing necessary development tools and headers. This method is for systems where direct package installation is not suitable or available. ```bash sudo apt install build-essential libcap-dev tar -xf bubblewrap-0.4.1.tar.xz cd bubblewrap-0.4.1 ./configure --prefix=/usr make sudo make install ``` -------------------------------- ### Install @oasislabs/opengsn-cli using npm, pnpm, or Yarn Source: https://docs.oasis.io/build/sapphire/develop/gasless Installs the Oasis fork of the GSN command-line tool. This is the first step to setting up GSN for your project. Ensure you have Node.js and a package manager installed. ```shell npm init -y npm install -D @oasislabs/opengsn-cli ``` ```shell pnpm init pnpm add -D @oasislabs/opengsn-cli ``` ```shell yarn init -y yarn add --dev @oasislabs/opengsn-cli ``` -------------------------------- ### Install OPL SDK Dependencies Source: https://docs.oasis.io/build/opl/opl-sdk Commands to install the @oasisprotocol/sapphire-contracts package using various Node.js package managers. ```bash npm install @oasisprotocol/sapphire-contracts ``` ```bash pnpm add @oasisprotocol/sapphire-contracts ``` ```bash yarn add @oasisprotocol/sapphire-contracts ``` -------------------------------- ### Install Foundry and Initialize Project Source: https://docs.oasis.io/llms-full.txt Installs Foundry using curl and bash, then initializes a new Forge project named 'sapphire_demo'. It also includes sourcing the bashrc to ensure Foundry commands are available in the current session. ```shell curl -L https://foundry.paradigm.xyz | bash foundryup source ~/.bashrc forge init sapphire_demo cd sapphire_demo ``` -------------------------------- ### Workaround Podman Compose DependsOn Bug Source: https://docs.oasis.io/build/rofl/troubleshooting Illustrates a scenario where the `depends_on` directive in Podman compose is ignored, causing services to start in parallel. The example shows a `contracts` service that should complete before the `oracle` service starts, but due to the bug, they run concurrently. ```yaml services: contracts: image: "ghcr.io/foundry-rs/foundry:latest" platform: linux/amd64 volumes: - ./contracts:/contracts entrypoint: /bin/sh -c 'cd contracts && forge create' oracle: platform: linux/amd64 entrypoint: /bin/sh -c 'python main.py' restart: on-failure depends_on: contracts: condition: service_completed_successfully ``` -------------------------------- ### Configure Hardhat TypeScript Project Source: https://docs.oasis.io/build/use-cases/key-generation Setup steps for a Hardhat project including dependency installation and tsconfig.json configuration for output directory management. ```shell npx hardhat init npm i @oasisprotocol/rofl-client ethers dotenv @types/node npm i -D tsx ``` ```json { "compilerOptions": { "rootDir": "./src", "outDir": "./dist" }, "include": ["src"] } ``` -------------------------------- ### Get App ID via ROFL Appd REST API Source: https://docs.oasis.io/llms-full.txt This example shows how to make a GET request to the `/rofl/v1/app/id` endpoint to retrieve the unique identifier for the running application. The response is a plain text string representing the app ID. ```http GET /rofl/v1/app/id HTTP/1.1 Host: localhost ``` -------------------------------- ### Example Prompts for Context7 MCP Source: https://docs.oasis.io/build/tools/llms Example prompts demonstrating how to query Oasis documentation using the Context7 MCP server. ```text Use context7 MCP to fetch Oasis Sapphire quickstart docs. Use library ID: llmstxt/oasis_io_llms_txt ``` ```text Using context7, show me how to implement encrypted events on Sapphire. Use library ID: llmstxt/oasis_io_llms_txt ``` -------------------------------- ### Implement Oasis Runtime Client in Go Source: https://docs.oasis.io/build/tools/build-paratime/minimal-runtime A complete example showing how to connect to an Oasis runtime node, query account balances, and perform a token transfer. It utilizes the Oasis Runtime SDK to handle gRPC connections and transaction signing. ```go package main import ( "context" "fmt" "os" "time" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "github.com/oasisprotocol/oasis-core/go/common" cmnGrpc "github.com/oasisprotocol/oasis-core/go/common/grpc" "github.com/oasisprotocol/oasis-core/go/common/logging" "github.com/oasisprotocol/oasis-core/go/common/quantity" "github.com/oasisprotocol/oasis-sdk/client-sdk/go/client" "github.com/oasisprotocol/oasis-sdk/client-sdk/go/modules/accounts" "github.com/oasisprotocol/oasis-sdk/client-sdk/go/testing" "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" ) const ( runtimeIDHex = "8000000000000000000000000000000000000000000000000000000000000000" nodeAddress = "unix:/tmp/minimal-runtime-test/net-runner/network/client-0/internal.sock" ) var logger = logging.GetLogger("minimal-runtime-client") type Client struct { client.RuntimeClient Accounts accounts.V1 } func showBalances(ctx context.Context, rc *Client, address types.Address) error { rsp, err := rc.Accounts.Balances(ctx, client.RoundLatest, address) if err != nil { return fmt.Errorf("failed to fetch account balances: %w", err) } fmt.Printf("=== Balances for %s ===\n", address) for denom, balance := range rsp.Balances { fmt.Printf("%s: %s\n", denom, balance) } fmt.Printf("\n") return nil } func tokenTransfer() error { if err := logging.Initialize(os.Stdout, logging.FmtLogfmt, logging.LevelDebug, nil); err != nil { return fmt.Errorf("unable to initialize logging: %w", err) } var runtimeID common.Namespace if err := runtimeID.UnmarshalHex(runtimeIDHex); err != nil { return fmt.Errorf("malformed runtime ID: %w", err) } conn, err := cmnGrpc.Dial(nodeAddress, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { return fmt.Errorf("failed to establish connection to %s: %w", nodeAddress, err) } defer conn.Close() c := client.New(conn, runtimeID) rc := &Client{ RuntimeClient: c, Accounts: accounts.NewV1(c), } ctx, cancelFn := context.WithTimeout(context.Background(), 30*time.Second) defer cancelFn() if err = showBalances(ctx, rc, testing.Alice.Address); err != nil { return err } if err = showBalances(ctx, rc, testing.Bob.Address); err != nil { return err } nonce, err := rc.Accounts.Nonce(ctx, client.RoundLatest, testing.Alice.Address) if err != nil { return fmt.Errorf("failed to fetch account nonce: %w", err) } tb := rc.Accounts.Transfer( testing.Bob.Address, types.NewBaseUnits(*quantity.NewFromUint64(10), types.NativeDenomination), ).SetFeeGas(100).AppendAuthSignature(testing.Alice.SigSpec, nonce) if err = tb.AppendSign(ctx, testing.Alice.Signer); err != nil { return err } return nil } ``` -------------------------------- ### Install Debugging Tools for TDX Source: https://docs.oasis.io/llms-full.txt Installs the 'msr-tools' package, which provides utilities for reading Model-Specific Registers (MSRs), and clones the canonical TDX repository to access system report scripts. These tools aid in debugging TDX setup issues. ```shell apt install msr-tools git clone https://github.com/canonical/tdx && ./tdx/system-report.sh ``` -------------------------------- ### Setup Oasis CLI in GitHub Actions Source: https://docs.oasis.io/llms-full.txt Configuration for setting up the Oasis CLI within GitHub Actions CI/CD workflows using the official setup-cli-action. This allows automated builds and tests to utilize the Oasis CLI. It shows a basic setup and an example with a specific version. ```yaml steps: - name: Setup Oasis CLI uses: oasisprotocol/setup-cli-action - name: Check Oasis CLI version run: oasis --version steps: - name: Setup Oasis CLI uses: oasisprotocol/setup-cli-action with: version: '0.14.3' ``` -------------------------------- ### Install Go Client SDK Version 1.20.2 Source: https://docs.oasis.io/llms-full.txt Instructions for installing a specific version of the Go client SDK. This is required for using the Go Client SDK. Ensure your Go version is at least 1.20.2 and that your GOPATH/bin is in your PATH. ```bash go get golang.org/dl/go1.20.2 go1.20.5 download ``` -------------------------------- ### Start Local Network (Non-SGX) Source: https://docs.oasis.io/core/development-setup/oasis-net-runner Launches a simple Oasis network in an unsafe non-SGX environment using the default network fixture and the `simple-keyvalue` runtime. This command specifies the binaries for the node, runtime, and key manager. ```bash ./go/oasis-net-runner/oasis-net-runner \ --fixture.default.node.binary go/oasis-node/oasis-node \ --fixture.default.runtime.binary target/default/release/simple-keyvalue \ --fixture.default.runtime.loader target/default/release/oasis-core-runtime-loader \ --fixture.default.keymanager.binary target/default/release/simple-keymanager ``` -------------------------------- ### Get Multiple Exchange Rates Source: https://docs.oasis.io/llms-full.txt Retrieves multiple exchange rates in a single call. For example, WBTC/USD and ETH/USD. The returned values are multiplied by 1e18. ```APIDOC ## POST /getMultiPrices ### Description Retrieves multiple exchange rates in a single call. You can specify multiple base currencies and a single quote currency. ### Method POST ### Endpoint /getMultiPrices ### Parameters #### Request Body - **bases** (array of strings) - Required - An array of base currency symbols (e.g., ["WBTC", "ETH"]). - **quote** (string) - Required - The quote currency symbol (e.g., "USD"). ### Request Example ```json { "bases": ["WBTC", "ETH"], "quote": "USD" } ``` ### Response #### Success Response (200) - **rates** (array of integers) - An array of exchange rates, where each rate is multiplied by 1e18. #### Response Example ```json { "rates": [39567000000000000000000, 2500000000000000000000] } ``` ``` -------------------------------- ### Start Oasis Node Source: https://docs.oasis.io/node/run-your-node/non-validator-node Launches the Oasis node using the specified configuration file. This command initiates the node's operation, connecting it to the network based on the provided settings. ```bash oasis-node --config /node/etc/config.yml ``` -------------------------------- ### Retrieve App ID from ROFL Appd API Source: https://docs.oasis.io/build/rofl/features/appd This example demonstrates how to make a GET request to the ROFL Appd API to retrieve the unique application identifier. The endpoint is /rofl/v1/app/id. ```http GET /rofl/v1/app/id ``` -------------------------------- ### Initialize and Create ROFL Application Source: https://docs.oasis.io/build/use-cases/tgbot Commands to initialize the project directory structure and register the application on the Oasis Testnet. ```shell oasis rofl init rofl-tgbot cd rofl-tgbot oasis rofl create --network testnet ``` -------------------------------- ### Initialize ROFL App Manifest with `rofl init` Source: https://docs.oasis.io/build/tools/cli/rofl Prepares a new ROFL manifest file (`rofl.yaml`) in the specified directory. This file defines components, upgrade policies, and other necessary information for managing, building, and deploying ROFL apps. The `--reset` flag can be used to create a new manifest based on an existing one, removing user-specific deployment data while retaining hardware requirements. ```shell oasis rofl init ``` ```text Creating a new ROFL app with default policy... Name: myapp Version: 0.1.0 TEE: tdx Kind: container Created manifest in 'rofl.yaml'. Run `oasis rofl create` to register your ROFL app and configure an app ID. ``` -------------------------------- ### Get ROFL Replica Metadata Response (JSON) Source: https://docs.oasis.io/llms-full.txt Example JSON response when retrieving ROFL replica metadata. It includes a key fingerprint and the version of the metadata. ```json { "key_fingerprint": "a54027bff15a8726", "version": "1.0.0" } ``` -------------------------------- ### Pruning Info Log Message Source: https://docs.oasis.io/llms-full.txt An example log message indicating the start of consensus database pruning. This message is informational and shows the timestamp, module, and a descriptive message about the pruning process. ```json {"caller":"storage.go:433","level":"info","module":"cmd/storage", "msg":"Starting consensus databases pruning. This may take a while...", "ts":"2025-10-23T11:02:11.129822974Z"} ``` -------------------------------- ### Tools & Services / Oasis CLI: Setup Source: https://docs.oasis.io/llms.txt Instructions for setting up the Oasis CLI on various operating systems and for CI/CD. ```APIDOC ## Oasis CLI Setup ### Description Instructions for installing and setting up the Oasis CLI on Linux, macOS, and Windows, including details for CI/CD integration with GitHub Actions. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Initialize Hardhat Project and Install Dependencies (Shell) Source: https://docs.oasis.io/build/sapphire/quickstart Commands to create a new project directory, initialize a Hardhat project with TypeScript, and install the Sapphire Hardhat plugin using npm, pnpm, or Yarn. ```shell mkdir quickstart && cd quickstart npx hardhat@2 init ``` ```shell npm install -D @oasisprotocol/sapphire-hardhat ``` ```shell pnpm add -D @oasisprotocol/sapphire-hardhat ``` ```shell yarn add --dev @oasisprotocol/sapphire-hardhat ``` -------------------------------- ### Create Hello World Smart Contract on Oasis Cipher (Wasm) Source: https://docs.oasis.io/llms.txt A guide to creating, building, and testing a minimal WebAssembly smart contract on the Oasis Cipher ParaTime. This example serves as a basic introduction to smart contract development on Oasis. ```rust use oasis_std::prelude::* #[derive(oasis_std::state::State, Default)] struct HelloWorldState { message: String, } #[oasis_std::module(name = "hello", version = "1.0.0")] struct HelloWorldModule; impl HelloWorldModule { #[init] fn init(&mut self, initial_message: String) { self.state().message = initial_message; } #[query] fn get_message(&self) -> String { self.state().message.clone() } } #[cfg(test)] mod tests { use super::*; #[test] fn test_hello_world() { // Test logic for the Hello World contract } } ``` -------------------------------- ### Initialize Go Module for Oasis Client Source: https://docs.oasis.io/build/tools/build-paratime/minimal-runtime Commands to initialize a new Go module and fetch dependencies for the Oasis runtime client. ```shell go mod init example.com/oasisprotocol/minimal-runtime-client go mod tidy ``` -------------------------------- ### Run Oasis Localnet Docker Container Source: https://docs.oasis.io/build/tools/localnet Command to run the Oasis Localnet Docker image. This command maps the necessary ports and starts the local network environment. Ensure Docker is installed and running. Hardware requirements include at least 16GB of RAM. ```sh docker run -it --rm -p8544-8549:8544-8549 ghcr.io/oasisprotocol/sapphire-localnet ``` ```sh docker run -it --rm -p8544-8549:8544-8549 --platform linux/x86_64 ghcr.io/oasisprotocol/sapphire-localnet ``` -------------------------------- ### Troubleshoot QGS Daemon: No Certificate Data for Platform Source: https://docs.oasis.io/llms-full.txt Resolves '[QPL] No certificate data for this platform.' errors on multi-CPU systems. This occurs when MPA is not installed or configured. Follow the 'Set up TEE - Multi-socket system' guide to correctly configure your TEE. ```log May 09 13:24:16 oasis-node-1 qgsd[6732]: call tee_att_init_quote May 09 13:24:16 oasis-node-1 qgsd[6732]: [QPL] No certificate data for this platform. May 09 13:24:16 oasis-node-1 qgsd[6732]: [get_platform_quote_cert_data ../td_ql_logic.cpp:302] Error returned from the p_sgx_get_quote_config API. 0xe011 May 09 13:24:16 oasis-node-1 qgsd[6732]: tee_att_init_quote return 0x11001 May 09 13:24:16 oasis-node-1 qgsd[6732]: tee_att_get_quote_size return 0x1100f ``` -------------------------------- ### Initialize Go Module and Dependencies Source: https://docs.oasis.io/llms-full.txt Initializes a new Go module and tidies up dependencies for the minimal runtime client project. This is a prerequisite for building the client. ```shell go mod init example.com/oasisprotocol/minimal-runtime-client go mod tidy ``` -------------------------------- ### Staking Total Supply Query Implementation in Go Source: https://docs.oasis.io/llms-full.txt Provides an example implementation for querying the total supply of staking tokens. This function utilizes a QueryFactory to get a specific query interface for a given block height and then calls the TotalSupply method on that interface. ```go package staking import ( "context" "github.com/oasisprotocol/oasis-core/go/common/quantity" ) // Assuming 's' is a struct that holds the querier and implements the staking service. type staking struct { querier QueryFactory // Assume QueryFactory is defined elsewhere } func (s *staking) TotalSupply(ctx context.Context, height int64) (*quantity.Quantity, error) { q, err := s.querier.QueryAt(ctx, height) if err != nil { return nil, err } return q.TotalSupply(ctx) } ``` -------------------------------- ### Initialize Project and Install Dependencies Source: https://docs.oasis.io/build/opl/hyperlane/pingpong-example Commands to create a new Hardhat project directory and install the required Hyperlane core dependencies using various package managers. ```shell mkdir hyperlane-pingpong && cd hyperlane-pingpong npx hardhat init ``` ```npm npm install -D @hyperlane-xyz/core ``` ```pnpm pnpm add -D @hyperlane-xyz/core ``` ```yarn yarn add --dev @hyperlane-xyz/core ``` -------------------------------- ### Shell: Fetch Dependencies and Build Project Source: https://docs.oasis.io/llms-full.txt These shell commands are used to fetch project dependencies and build the project. 'go get' downloads and installs the necessary Go packages, while 'go build' compiles the Go source files into an executable binary. ```shell go get go build ``` -------------------------------- ### Install Viem and Sapphire Viem Wrapper Source: https://docs.oasis.io/llms-full.txt Installs the @oasisprotocol/sapphire-viem-v2 and viem@2.x libraries using npm, pnpm, or Yarn. This is necessary for integrating Sapphire with Viem. ```shell npm install @oasisprotocol/sapphire-viem-v2 viem@2.x ``` ```shell pnpm add @oasisprotocol/sapphire-viem-v2 viem@2.x ``` ```shell yarn add @oasisprotocol/sapphire-viem-v2 viem@2.x ``` -------------------------------- ### Fix 'AESM: error 30' in TEE Node Logs Source: https://docs.oasis.io/llms-full.txt An 'aesm: error 30' in your node's logs indicates an issue with initializing the TEE or getting quote information from AESMD. Ensure all required SGX driver libraries are installed as per the DCAP Attestation section. ```text failed to initialize TEE: error while getting quote info from AESMD: aesm: error 30 ``` -------------------------------- ### Provision Validator Network with oasis-net-runner Source: https://docs.oasis.io/llms-full.txt Initializes a validator node network using oasis-net-runner. This command sets up a temporary directory for the network, specifies the node binary, disables runtime setup, and configures deterministic entities with initial funding. It requires the oasis-net-runner tool to be installed and accessible. ```bash mkdir /tmp/runtime-example oasis-net-runner \ --basedir.no_temp_dir \ --basedir /tmp/runtime-example \ --fixture.default.node.binary go/oasis-node/oasis-node \ --fixture.default.setup_runtimes=false \ --fixture.default.deterministic_entities \ --fixture.default.fund_entities \ --fixture.default.num_entities 2 ``` -------------------------------- ### Install Oasis CLI on Windows (Manual) Source: https://docs.oasis.io/llms-full.txt Manual installation of the Oasis CLI on Windows by downloading and extracting the ZIP file, then copying the executable to a directory on the system's PATH. This method requires ensuring the chosen directory is included in the PATH environment variable. ```powershell New-Item -ItemType Directory -Force "$env:USERPROFILE\bin" Copy-Item .\oasis.exe "$env:USERPROFILE\bin\" oasis --version ``` -------------------------------- ### Verify Oasis CLI Installation Source: https://docs.oasis.io/build/tools/cli/setup Checks the installed version of the Oasis CLI to confirm a successful installation. This command should be run after installation on any platform. ```shell oasis --version ``` -------------------------------- ### Create Runtime Binary Entrypoint in src/main.rs Source: https://docs.oasis.io/llms-full.txt This Rust code provides the main entry point for building a runtime binary. It uses the `start` method from the `Runtime` trait defined in the `oasis-runtime-sdk` to launch the minimal runtime. ```rust use oasis_runtime_sdk::Runtime; fn main() { minimal_runtime::Runtime::start(); } ``` -------------------------------- ### Install Go Client SDK Source: https://docs.oasis.io/llms-full.txt Installs a specific version of the Go programming language, required for the Go Client SDK. This involves downloading the desired version and ensuring the Go binary directory is in the system's PATH. ```bash go get golang.org/dl/go1.22.5 go1.22.5 download ``` -------------------------------- ### Install Rust using rustup Source: https://docs.oasis.io/llms-full.txt Installs and manages Rust versions using rustup, following the Rust upstream recommendation. Ensure no distribution-packaged Rust is installed beforehand. This process downloads and installs the latest stable Rust version. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Create Runtime Binary Entry Point in src/main.rs Source: https://docs.oasis.io/build/tools/build-paratime/minimal-runtime This Rust code provides the main entry point for the runtime binary. It imports the `Runtime` defined in `src/lib.rs` and calls its `start` method to initialize and run the Oasis node. ```rust use oasis_runtime_sdk::Runtime; fn main() { minimal_runtime::Runtime::start(); } ``` -------------------------------- ### Build Minimal Runtime with Oasis SDK (Rust) Source: https://docs.oasis.io/llms.txt Demonstrates how to create, build, and test a minimal runtime using the Oasis SDK. This example utilizes the accounts module for inter-account transfers. It requires the Oasis Runtime SDK and Rust toolchain. ```rust use oasis_std::prelude::*; mod accounts; #[derive(Debug, Default)] pub struct MyRuntime; impl oasis_std::Runtime for MyRuntime { // ... runtime implementation details ... } #[cfg(test)] mod tests { use super::*; #[test] fn test_minimal_runtime() { // Test logic for the minimal runtime } } ``` -------------------------------- ### Create a Hardware Wallet Account Reference Source: https://docs.oasis.io/build/tools/cli/wallet Shows how to link a hardware wallet (e.g., Ledger) to the Oasis CLI. The CLI stores a reference to the hardware account rather than the private key. ```shell oasis wallet create logan --kind ledger ```