### Project Setup and Development Commands Source: https://github.com/richtera/lukso-siwe-demo Commands to set up the project, install dependencies, generate typechain wrappers, and start the development server for local development. ```bash pnpm install ``` ```bash pnpm run typegen ``` ```bash pnpm run dev ``` -------------------------------- ### Quickstart localtunnel using npx Source: https://github.com/localtunnel/localtunnel Demonstrates how to quickly start localtunnel by exposing a specified local port (e.g., 8000) using npx, which allows running npm package executables without global installation. ```Bash npx localtunnel --port 8000 ``` -------------------------------- ### Getting Started with ERC725 Inspect Development Source: https://github.com/lukso-network/tools-erc725-inspect These commands provide the necessary steps to set up and run the ERC725 Inspect project locally. 'npm install' fetches all required dependencies, and 'npm run dev' starts the local development server. ```Shell npm install ``` ```Shell npm run dev ``` -------------------------------- ### Setup and Run EIP-6963 DApp Locally Source: https://github.com/lukso-network/example-eip-6963-test-dapp Provides the necessary shell commands to install dependencies, build the project, and start the local development server for an EIP-6963 compatible dApp. This ensures the application is ready for local testing and development. ```Shell npm install ``` ```Shell npm run build ``` ```Shell npm run dev ``` -------------------------------- ### Run EIP-6963 Test Dapp Locally Source: https://github.com/lukso-network/example-eip-6963-test-dapp These commands guide you through setting up and running the EIP-6963 example application on your local machine. Ensure you have Node.js and npm installed. The build step is optional unless changes are made or to verify no build errors exist. ```Shell npm install npm run build npm run dev ``` -------------------------------- ### Project Setup and Testing Commands Source: https://github.com/Arachnid/deterministic-deployment-proxy/tree/master These commands are used to set up the project by installing necessary dependencies, build the project, and then execute the test suite for the Deterministic Deployment Proxy. ```Shell npm install npm run build ./scripts/test.sh ``` -------------------------------- ### Start Bundler on Testnet with Mnemonic File Source: https://github.com/eth-infinitism/bundler Configures and starts the bundler service for a specified network, typically a testnet, by providing a mnemonic file for account access. This is necessary when operating outside of a local development environment. ```bash yarn run bundler --network localhost --mnemonic file.txt ``` -------------------------------- ### Start the Local Bundler Service Source: https://github.com/eth-infinitism/bundler Activates the bundler service on a local URL. The `--unsafe` option can be used when working with a 'hardhat node' for potentially less strict security checks during development. ```bash yarn run bundler ``` ```bash yarn run bundler --unsafe ``` -------------------------------- ### Install LUKSO Playground Repository Source: https://github.com/lukso-network/lukso-playground This snippet provides the necessary shell commands to set up the LUKSO Playground project. It involves cloning the repository from GitHub and then installing its dependencies using the Bun package manager. This is the initial step required to run any of the LUKSO code examples locally. ```shell git clone https://github.com/lukso-network/lukso-playground.git cd lukso-playground && bun install ``` -------------------------------- ### Install Bun on Windows using PowerShell Source: https://bun.sh/docs/installation This command uses PowerShell's `Invoke-RestMethod` (irm) to download and execute the Bun installation script directly from bun.sh. It's a quick way to get Bun set up on Windows systems. ```PowerShell powershell -c "irm bun.sh/install.ps1|iex" ``` -------------------------------- ### Setup Local Environment Variables Source: https://github.com/lukso-network/tools-dapp-boilerplate This command copies the example environment file to create a local environment configuration. This is crucial for setting up parameters like Wallet Connect Project ID, if applicable. ```Shell cp .env.local.example .env.local ``` -------------------------------- ### Install Project Dependencies with Bun Source: https://github.com/lukso-network/lukso-playground/tree/main/smart-contracts-hardhat This command installs all necessary project dependencies using the Bun package manager. Ensure Bun is installed on your system before running this command. ```shell bun install ``` -------------------------------- ### Bun CLI and Runtime Features Reference Source: https://bun.sh/docs/installation This section lists various Bun CLI commands and runtime features, including quickstart, TypeScript support, templating, file types, environment variables, Bun/Web/Node.js APIs, single-file executables, plugins, watch mode, module resolution, auto-install, bunfig.toml, and debugger functionalities. ```APIDOC Quickstart TypeScript Templating bun init bun create Runtime bun run File types TypeScript JSX Environment variables Bun APIs Web APIs Node.js compatibility Single-file executable Plugins Watch mode Module resolution Auto-install bunfig.toml Debugger Framework APISOON ``` -------------------------------- ### Quickstart localtunnel with npx Source: https://github.com/localtunnel/localtunnel This command quickly starts localtunnel using npx, exposing a local port (e.g., 8000) to the public internet. It's useful for testing local development servers with external services or sharing work without full deployment, eliminating the need for DNS configuration. ```bash npx localtunnel --port 8000 ``` -------------------------------- ### Install and Manage Foundry Tools with foundryup Source: https://book.getfoundry.sh/ This snippet provides commands to download and install the `foundryup` installer, which then allows you to install the core Foundry tools like `forge`, `cast`, `anvil`, and `chisel`. It also shows how to install the latest nightly release for cutting-edge features. ```Shell # Download foundry installer `foundryup` curl -L https://foundry.paradigm.xyz | bash # Install forge, cast, anvil, chisel foundryup # Install the latest nightly release foundryup -i nightly ``` -------------------------------- ### Web3-Onboard Core and Injected Wallets Installation Source: https://onboard.blocknative.com/ This command installs the fundamental Web3-Onboard library and the module specifically for injected wallets (e.g., browser extensions like MetaMask). It represents the recommended minimal installation for most Web3-Onboard integrations. ```shell npm i @web3-onboard/core @web3-onboard/injected-wallets ``` -------------------------------- ### Install Bun on Windows using Scoop Source: https://bun.sh/docs/installation This command installs Bun via Scoop, a command-line installer for Windows. Scoop manages software installations without UAC popups and handles dependencies. ```Scoop scoop install bun ``` -------------------------------- ### Install LUKSO LSP Smart Contracts by Cloning Repository Source: https://github.com/lukso-network/lsp-smart-contracts/ This sequence of commands allows users to clone the LUKSO LSP smart contracts repository from GitHub, navigate into the project directory, and install all necessary dependencies, providing a local development setup for direct interaction with the source code. ```bash $ git clone https://github.com/lukso-network/lsp-smart-contracts.git $ cd ./lsp-smart-contracts $ npm install ``` -------------------------------- ### Install Bun on Windows using npm Source: https://bun.sh/docs/installation This command installs Bun globally using the Node Package Manager (npm). It's suitable for developers already using npm and provides a familiar installation experience. ```npm npm install -g bun # the last `npm` command you'll ever need ``` -------------------------------- ### Installing @lukso/lsp-smart-contracts via npm Source: https://context7_llms This command demonstrates the standard way to install the `@lukso/lsp-smart-contracts` library using npm. Installing this package provides access to all LUKSO smart contracts in Solidity, their JSON ABIs, and various constants, facilitating development with LUKSO's ecosystem. ```Bash npm install @lukso/lsp-smart-contracts ``` -------------------------------- ### Initialize Project and Preprocess Assets Source: https://github.com/eth-infinitism/bundler This command initializes project dependencies and runs necessary preprocessing steps before deployment or execution. It's typically the first step after cloning the repository. ```bash yarn && yarn preprocess ``` -------------------------------- ### Install jq on FreeBSD using pkg and Ports Source: https://jqlang.github.io/jq/download/ This section outlines the methods for installing jq on FreeBSD. Users can either install a pre-built binary package using 'pkg' or compile from source using the 'ports' system, providing flexibility based on system requirements and preferences. ```Shell pkg install jq ``` ```Shell make -C /usr/ports/textproc/jq install clean ``` -------------------------------- ### Install and Initialize LUKSO IPFS URL Resolver Source: https://context7_llms This snippet demonstrates how to install the `@lukso/data-provider-urlresolver` package and initialize the `UrlResolver` class. It provides examples for resolving standard IPFS URLs via a universal profile gateway and customizing the resolution logic for different proxy setups. ```bash npm install @lukso/data-provider-urlresolver ``` ```ts import { UrlResolver } from '@lukso/data-provider-urlresolver'; // Example to resolve standard IPFS URL const urlResolver = new UrlResolver([ ['ipfs://', 'https://api.universalprofile.cloud/ipfs/'], ]); // Example to customize URL resolution const customResolver = new UrlResolver([ ['ipfs://', 'https://some.proxy?cid='], ]); ``` -------------------------------- ### Execute a Simple Test with runop Script Source: https://github.com/eth-infinitism/bundler Runs a basic operational test using the `runop` script. This command deploys a wallet deployer, creates and funds a wallet, and sends transactions to test the bundler's functionality. It targets a specific entry point and network. ```bash yarn run runop --deployFactory --network http://localhost:8545/ --entryPoint 0x0000000071727De22E5E9d8BAf0edAc6f37da032 ``` -------------------------------- ### JavaScript for Copying Bun Windows Install Command to Clipboard Source: https://bun.sh/docs/installation This client-side JavaScript snippet adds an event listener to a designated DOM element. When activated by a click, it copies the PowerShell command for Bun installation on Windows to the user's clipboard and offers brief visual confirmation of the copy operation. ```javascript document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#XsBWbNxKdyFq");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`iex "& {$(irm https://bun.sh/install.ps1)} -Version 1.2.17"`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})}); ``` -------------------------------- ### Install up-provider Library Source: https://context7_llms Install the @lukso/up-provider package, which assists in building Universal Everything integrated mini-applications for Grid. ```bash npm install @lukso/up-provider ``` -------------------------------- ### Use setupChannel Utility Function for Bulk Configuration Source: https://github.com/lukso-network/tools-up-provider/ Explains the `channel.setupChannel` utility function, which allows for setting multiple channel properties (enable, accounts, contextAccounts, and chainId) simultaneously in a single call, simplifying the configuration process. ```JavaScript // There is also a utility function called setupChannel which can supply // all enable, accounts, contextAccounts and chainId at the same time channel.setupChannel(enable, [profileAddress], [contextAddress], chainId) ``` -------------------------------- ### Install Project Dependencies with Bun Source: https://context7_llms Command to install all required project dependencies for the Hardhat setup using the Bun package manager. Ensure Bun is installed before running this command. ```bash bun install ``` -------------------------------- ### Clone and Set Up LUKSO LSP-Utils Repository Source: https://github.com/lukso-network/lsp-utils These commands provide an alternative method to obtain and set up the `@lukso/lsp-utils` library. It involves cloning the official GitHub repository, navigating into the project directory, and then installing all necessary dependencies using npm. This approach is useful for development, contributing to the project, or exploring the source code. ```shell $ git clone https://github.com/lukso-network/lsp-utils.git $ cd ./lsp-utils $ npm install ``` -------------------------------- ### Start localtunnel CLI with a specified port Source: https://github.com/localtunnel/localtunnel Basic command to start localtunnel, exposing a local port (e.g., 8000) to the internet after the 'lt' command has been installed globally. ```Bash lt --port 8000 ``` -------------------------------- ### Install Required Libraries for Standard Detection Source: https://context7_llms This snippet provides the command to install the necessary Node.js packages (`web3`, `@erc725/erc725.js`, `@lukso/lsp-smart-contracts`) required to run the subsequent code examples for detecting LSP standards. ```shell npm install web3 @erc725/erc725.js @lukso/lsp-smart-contracts ``` -------------------------------- ### Install Web3 Modal with Ethers.js Source: https://context7_llms Installs the Web3 Modal library along with Ethers.js, which is used as the default package for Web3 Modal configurations. This setup is suitable for dApps utilizing Ethers.js for blockchain interactions. ```shell npm i @web3modal/ethers ethers ``` -------------------------------- ### SvelteKit Application Initialization Script Source: https://onboard.blocknative.com/ This JavaScript snippet shows a typical SvelteKit client-side initialization process. It sets up the base URL, environment variables, and then dynamically imports and starts the SvelteKit application, passing necessary data and configuration to the framework. ```javascript {"status":200,"statusText":"","headers":{},"body":""} { __sveltekit_dxcebc = { base: new URL(".", location).pathname.slice(0, -1), env: {} }; const element = document.currentScript.parentElement; const data = [null,null]; Promise.all([ import("./_app/immutable/entry/start.adeac028.js"), import("./_app/immutable/entry/app.56510f8e.js") ]).then(([kit, app]) => { kit.start(app, element, { node_ids: [0, 2], data, form: null, error: null }); }); } ``` -------------------------------- ### Install all LUKSO LSP Smart Contracts Source: https://context7_llms Instructions to install the complete suite of LUKSO LSP smart contracts using npm, yarn, or pnpm. This package provides all necessary LSP contracts for a comprehensive setup. ```bash npm install @lukso/lsp-smart-contracts ``` ```bash yarn add @lukso/lsp-smart-contracts ``` ```bash pnpm add @lukso/lsp-smart-contracts ``` -------------------------------- ### Bun Bundler Features Reference Source: https://bun.sh/docs/installation This section describes Bun's bundling functionalities, including `Bun.build`, support for HTML & static sites, CSS, fullstack dev server, hot reloading, loaders, plugins, macros, and a comparison with esbuild. ```APIDOC Bundler Bun.build HTML & static sites CSS Fullstack Dev Server Hot reloading Loaders Plugins Macros vs esbuild ``` -------------------------------- ### Bun.js Test Suite Example Source: https://bun.sh/ This example illustrates how to write and structure tests in Bun.js using the built-in `bun:test` module. It includes `beforeAll` for setup, `describe` to group related tests, and `test` with `expect` for assertions, demonstrating basic unit testing patterns. ```typescript import { describe, expect, test, beforeAll } from "bun:test"; beforeAll(() => { // setup tests }); describe("math", () => { test("addition", () => { expect(2 + 2).toBe(4); expect(7 + 13).toMatchSnapshot(); }); }); ``` -------------------------------- ### Web3-Onboard Full Module Installation Source: https://onboard.blocknative.com/ These commands demonstrate how to install the core Web3-Onboard library along with essential modules for injected wallets and transaction preview using both npm and yarn package managers. These packages provide comprehensive functionality for wallet connection and transaction display. ```shell npm i @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/transaction-preview ``` ```shell yarn add @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/transaction-preview ``` -------------------------------- ### Yarn Commands for Project Setup and Operations Source: https://github.com/eth-infinitism/bundler A collection of Yarn commands used for initializing the project, deploying smart contracts to a local network, running the bundler service, and executing test operations. These commands are essential for local development and testing workflows within the project. ```Yarn yarn && yarn preprocess ``` ```Yarn yarn hardhat-deploy --network localhost ``` ```Yarn yarn run bundler ``` ```Yarn yarn run bundler --unsafe ``` ```Yarn yarn run runop --deployFactory --network http://localhost:8545/ --entryPoint 0x0000000071727De22E5E9d8BAf0edAc6f37da032 ``` ```Yarn yarn run bundler --network localhost --mnemonic file.txt ``` -------------------------------- ### Wallet Network Query and Transaction Sending Source: https://docs.ethers.io/v5/api/signer/ Demonstrates how to connect a Wallet to a provider and interact with the network. Examples include querying the account balance, getting the transaction count, and sending a transaction, showing the structure of the returned transaction receipt. ```JavaScript // The connect method returns a new instance of the // Wallet connected to a provider wallet = walletMnemonic.connect(provider) // Querying the network await wallet.getBalance(); // { BigNumber: "6846" } await wallet.getTransactionCount(); // 3 // Sending ether await wallet.sendTransaction(tx) // { // accessList: [], // chainId: 123456, // confirmations: 0, // data: '0x', // from: '0x46E0726Ef145d92DEA66D38797CF51901701926e', // gasLimit: { BigNumber: "21000" }, // gasPrice: null, // hash: '0x1c4913f6e06a8b48443dbe3169acb6701b558ed6d3b478723eb6b137d2418792', // maxFeePerGas: { BigNumber: "1500000014" }, // maxPriorityFeePerGas: { BigNumber: "1500000000" }, // nonce: 5, // r: '0xb58e9234bf734f5bab14634ca21e35c3fa163562930d782424e78120cfcc9b8f', // s: '0x690c4b1c3d2b6e519340b2f0f3fc80ccea47e3c2a077f9771aaa2e1d7552aa24', // to: '0x8ba1f109551bD432803012645Ac136ddd64DBA72', // type: 2, // v: 0, // value: { BigNumber: "1000000000000000000" }, // wait: [Function (anonymous)] // } ``` -------------------------------- ### Initialize UP-Provider with Viem Source: https://github.com/lukso-network/tools-up-provider/ Demonstrates how to set up the LUKSO UP-Provider with Viem, including creating a wallet client to connect to the provider and a public client for direct RPC connections. ```typescript import { createClientUPProvider } from '@lukso/up-provider' import { createWalletClient, createPublicClient, custom } from 'viem' import { lukso } from 'viem/chains' // Construct the up-provider const provider = createClientUPProvider() // Create public client if you need direct connection to RPC const publicClient = createPublicClient({ chain: lukso, transport: http(), }) // Create wallet client to connect to provider const walletClient = createWalletClient({ chain: lukso, transport: custom(provider), }) ``` -------------------------------- ### Configure wagmi with Injected Connector Source: https://wagmi.sh/react/api/connectors/injected Illustrates a complete wagmi configuration using `createConfig`, integrating the `injected` connector alongside `mainnet` and `sepolia` chains with `http` transports. This setup provides a foundational example for connecting to injected Ethereum providers. ```TypeScript import { createConfig, http } from 'wagmi' import { mainnet, sepolia } from 'wagmi/chains' import { injected } from 'wagmi/connectors' export const config = createConfig({ chains: [mainnet, sepolia], connectors: [injected()], transports: { [mainnet.id]: http(), [sepolia.id]: http(), }, }) ``` -------------------------------- ### Get Follower and Following Counts in Follower System Source: https://context7_llms Provides examples for retrieving the total number of followers and followed addresses using the `followerCount` and `followingCount` functions on a follower system contract. Both functions take an address as input and return a `uint256` count. ```solidity function followerCount(address addr) external view returns (uint256); function followingCount(address addr) external view returns (uint256); ``` ```javascript const followers = await followerSystemContract.followerCount(address); const following = await followerSystemContract.followingCount(address); ``` -------------------------------- ### Start Development Server Source: https://github.com/lukso-network/tools-dapp-boilerplate This command initiates the Next.js development server. It compiles the application and makes it accessible locally, enabling developers to view changes in real-time and test the application during development. ```npm npm run dev ``` -------------------------------- ### Install Bun via cURL on macOS/Linux Source: https://bun.sh/docs/installation Instructions to install Bun using the curl command, which is suitable for macOS, Linux, and WSL. This section includes commands for both the standard installation and installing a specific version of Bun. ```bash curl -fsSL https://bun.sh/install | bash ``` ```bash curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.17" ``` -------------------------------- ### Deploy Contracts to Local Hardhat Network Source: https://github.com/eth-infinitism/bundler Deploys the project's smart contracts to a local Hardhat network instance. This is a prerequisite for running the bundler or tests against deployed contracts. ```bash yarn hardhat-deploy --network localhost ``` -------------------------------- ### Get Issued Assets from Universal Profile using erc725.js Source: https://context7_llms This JavaScript example illustrates how to query a Universal Profile for assets it has issued. It leverages the `@erc725/erc725.js` library to connect to the LUKSO testnet and retrieve the `LSP12IssuedAssets[]` data key, which lists the addresses of assets created by the profile. ```js import { ERC725 } from '@erc725/erc725.js'; import profileSchema from '@erc725/erc725.js/schemas/LSP3ProfileMetadata.json'; const erc725js = new ERC725( profileSchema, '0xFF7E89acaBce3ed97Ed528288D3b8F113557A8c8', 'https://rpc.testnet.lukso.network', ); const issuedAssetsValue = await erc725js.getData('LSP12IssuedAssets[]'); console.log(issuedAssetsValue); // { // key: '0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd', // name: 'LSP12IssuedAssets[]', // value: [], // }, ``` -------------------------------- ### Install Project Dependencies with pnpm Source: https://github.com/richtera/lukso-siwe-demo This command installs all required project dependencies using the pnpm package manager. It should be executed once after cloning the repository to set up the development environment. ```Shell pnpm install ``` -------------------------------- ### Examples: Dynamic-size ERC725Y Data Keys Source: https://docs.lukso.tech/standards/access-control/lsp6-key-manager/ Demonstrates various data keys that would be allowed if a controller is granted a dynamic-size key permission starting with a specific prefix (e.g., `0xbeefbeefbeefbeef`). This allows the controller to modify any data key that begins with the specified prefix. ```APIDOC 0xbeefbeefbeefbeefcafecafecafecafecafecafecafecafecafecafecafecafe 0xbeefbeefbeefbeef0000000000000000000000000000000000000000c629dfa8 0xbeefbeefbeefbeef000000000000000000000000000000000000000000001253 ``` -------------------------------- ### Install Specific Bun Version on Windows via PowerShell Source: https://bun.sh/docs/installation This PowerShell command executes a remote installation script for Bun, enabling users to install a desired version number. It's the recommended and most straightforward method for installing Bun on Windows systems. ```powershell iex "& {$(irm https://bun.sh/install.ps1)} -Version 1.2.17" ``` -------------------------------- ### Install LSP Utils via npm Source: https://github.com/lukso-network/lsp-utils Use this command to install the `@lukso/lsp-utils` package from the npm registry. This package provides helper functions for interacting with LUKSO's LSP smart contracts. As it is in early development, it is recommended for testing and experimentation purposes only. ```Bash npm install @lukso/lsp-utils ``` -------------------------------- ### React Application Entry Point for Wallet Discovery Source: https://github.com/lukso-network/example-eip-6963-test-dapp This `App.tsx` file serves as the main entry point for the React application. It imports and renders the `DiscoverWalletProviders` component, demonstrating how to integrate the EIP-6963 wallet discovery functionality into a root application component. ```TypeScript React import "./App.css"; import { DiscoverWalletProviders } from "~/components/DiscoverWalletProviders"; function App() { return ( <> ); } export default App; ``` -------------------------------- ### Deploy Universal Receiver Delegate for Universal Profile Source: https://context7_llms Provides complete asynchronous functions for deploying a Universal Receiver Delegate (URD) contract. It illustrates the setup of contract factories or instances and the deployment process, returning the deployed contract's address. Examples are provided for both ethers.js and web3.js. ```typescript const deployUniversalProfileURD = async () => { // create a LSP1UniversalReceiverDelegateUP Contract Factory let universalProfileURDFactory = new ethers.ContractFactory( LSP1UniversalReceiverDelegateUP.abi, LSP1UniversalReceiverDelegateUP.bytecode, ); // deploy the Universal Receiver Delegate UP contract const universalProfileURD = await universalProfileURDFactory .connect(EOA) .deploy(); return testnetuniversalProfileURD.address; }; // deploy a new Universal Profile URD and retrieve its address const universalProfileURDAddress = await deployUniversalProfileURD(); ``` ```typescript const deployUniversalProfileURD = async () => { // create an instance of the LSP1UniversalReceiverDelegateUP const universalProfileURD = new web3.eth.Contract( LSP1UniversalReceiverDelegateUP.abi, ); let universalProfileURDAddress; // deploy the Universal Receiver Delegate UP contract await universalProfileURD .deploy({ data: LSP1UniversalReceiverDelegateUP.bytecode, }) .send({ from: EOA.address, gas: 5_000_000, gasPrice: '1000000000', }) .on('receipt', (receipt) => { universalProfileURDAddress = receipt.contractAddress; }); return universalProfileURDAddress; }; // deploy a new Universal Profile URD and retrieve its address const universalProfileURDAddress = await deployUniversalProfileURD(); ``` -------------------------------- ### Install Bun via Homebrew Source: https://bun.sh/docs/installation Command to install Bun using Homebrew, a popular package manager for macOS and Linux. This method simplifies the installation and management of software packages. ```bash brew install oven-sh/bun/bun ``` -------------------------------- ### Bun Core API Modules Reference Source: https://bun.sh/docs/installation This section lists the comprehensive set of core API categories and modules available within the Bun runtime. It covers functionalities ranging from HTTP and WebSockets to file I/O, database interactions, and system-level operations, providing a quick reference to Bun's built-in capabilities. ```APIDOC API Modules: - HTTP server - HTTP client - WebSockets - Workers - Binary data - Streams - SQL - S3 Object Storage - File I/O - Redis client - import.meta - SQLite - FileSystemRouter - TCP sockets - UDP sockets - Globals - $ Shell - Child processes - HTMLRewriter - Hashing - Console - Cookie - FFI - C Compiler - Testing - Utils - Node-API - Glob - DNS - Semver - Color - Transpiler ``` -------------------------------- ### Initialize Environment Configuration Source: https://github.com/lukso-network/tools-mock-relayer Copies the example environment configuration file to a new '.env' file. This file will hold sensitive parameters like 'SIGNER_PRIVATE_KEY' required for the relayer service to operate. ```Shell cp .env.example .env ``` -------------------------------- ### Copy Environment Variables for Configuration Source: https://github.com/lukso-network/lukso-playground/tree/main/smart-contracts-hardhat This command copies the example environment variables file to create a new .env file. This file will contain private keys for deployment and other sensitive configurations. Users should populate it with their EOA private key and optionally, a controller's private key and Universal Profile address. ```shell cp .env.example .env ``` -------------------------------- ### Build and Test Deterministic Deployment Proxy Source: https://github.com/Arachnid/deterministic-deployment-proxy/tree/master Instructions to set up, build, and run tests for the deterministic deployment proxy contract. This involves installing dependencies, building the project, and executing the test script. ```shell npm install npm run build ./scripts/test.sh ``` -------------------------------- ### Create Ethereum Accounts with web3.js Examples Source: https://web3js.readthedocs.io/en/v1.8.0/web3-eth-accounts.html Provides practical examples of using `web3.eth.accounts.create()` to generate new Ethereum accounts. Demonstrates creating accounts without arguments, with a passphrase, and with a random hex string, showing the resulting account object structure. ```JavaScript web3.eth.accounts.create(); > { address: "0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01", privateKey: "0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709", signTransaction: function(tx){...}, sign: function(data){...}, encrypt: function(password){...} } web3.eth.accounts.create('2435@#@#@±±±±!!!!678543213456764321§34567543213456785432134567'); > { address: "0xF2CD2AA0c7926743B1D4310b2BC984a0a453c3d4", privateKey: "0xd7325de5c2c1cf0009fac77d3d04a9c004b038883446b065871bc3e831dcd098", signTransaction: function(tx){...}, sign: function(data){...}, encrypt: function(password){...} } web3.eth.accounts.create(web3.utils.randomHex(32)); > { address: "0xe78150FaCD36E8EB00291e251424a0515AA1FF05", privateKey: "0xcc505ee6067fba3f6fc2050643379e190e087aeffe5d958ab9f2f3ed3800fa4e", signTransaction: function(tx){...}, sign: function(data){...}, encrypt: function(password){...} } ``` -------------------------------- ### Initialize a New Smart Contract Project with Forge Source: https://book.getfoundry.sh/ Learn how to quickly set up a new smart contract project using the `forge init` command. This command creates a new directory with a basic project structure, ready for contract development. ```Shell # Initializes a project called `Counter` forge init Counter ``` -------------------------------- ### Initialize Environment Configuration for LSP15 Relayer Source: https://github.com/lukso-network/tools-mock-relayer This command initializes the environment configuration for the Transaction Relayer Service. It copies the example `.env` file, which serves as a template, to create the actual `.env` file where specific configuration parameters, such as the `SIGNER_PRIVATE_KEY`, will be stored. This step is crucial for setting up the service with the necessary blockchain credentials. ```shell cp .env.example .env ``` -------------------------------- ### Connect Wallet using Web3-Onboard Source: https://www.npmjs.com/package/@lukso/web3-onboard-config This code shows how to initiate the wallet connection process using the `connectWallet()` method from the Web3-Onboard component. It triggers the connection window, allowing users to select their wallet, and then logs the details of the newly connected wallets. ```JavaScript // Trigger the connection process and screen const connectedWallets = await web3OnboardComponent.connectWallet(); // Debug console.log(connectedWallets); ``` -------------------------------- ### Check Bun Installation Version and Revision Source: https://bun.sh/docs/installation Commands to verify the installed Bun version and retrieve its precise commit hash. These are essential for confirming a successful installation and for debugging purposes, providing detailed information about the Bun runtime. ```Shell bun --version ``` ```Shell bun --revision ``` -------------------------------- ### Verify Bun Installation on Windows Source: https://bun.sh/docs/installation This PowerShell command checks if the Bun binary is correctly installed and accessible on a Windows system by attempting to execute it and display its version. ```PowerShell & "$env:USERPROFILE\.bun\bin\bun" --version ``` -------------------------------- ### Install Bun via npm Source: https://bun.sh/docs/installation Command to globally install Bun using the npm package manager. This is a straightforward method for developers familiar with the Node.js ecosystem. ```bash npm install -g bun ``` -------------------------------- ### Connect Wallet and Send Transaction with Web3-Onboard and Ethers.js Source: https://onboard.blocknative.com/ This code demonstrates how to initialize Web3-Onboard to connect to a user's wallet, configure supported blockchain networks (Ethereum Mainnet, Base), and then use Ethers.js to create a provider and signer from the connected wallet to send a simple transaction. It shows how to handle the wallet connection and transaction signing process. ```javascript import Onboard from '@web3-onboard/core' import injectedModule from '@web3-onboard/injected-wallets' import { ethers } from 'ethers' const MAINNET_RPC_URL = 'https://mainnet.infura.io/v3/' const injected = injectedModule() const onboard = Onboard({ wallets: [injected], chains: [ { id: '0x1', token: 'ETH', label: 'Ethereum Mainnet', rpcUrl: MAINNET_RPC_URL }, { id: '0x2105', token: 'ETH', label: 'Base', rpcUrl: 'https://mainnet.base.org' } ] }) const wallets = await onboard.connectWallet() console.log(wallets) if (wallets[0]) { // create an ethers provider with the last connected wallet provider const ethersProvider = new ethers.providers.Web3Provider(wallets[0].provider, 'any') // if using ethers v6 this is: // ethersProvider = new ethers.BrowserProvider(wallet.provider, 'any') const signer = ethersProvider.getSigner() // send a transaction with the ethers provider const txn = await signer.sendTransaction({ to: '0x', value: 100000000000000 }) const receipt = await txn.wait() console.log(receipt) } ``` -------------------------------- ### MDX Content Rendering Function for AppKit Documentation Source: https://docs.walletconnect.com/web3modal/about A JavaScript function, likely compiled from MDX (Markdown/JSX), responsible for rendering the 'Reown AppKit' documentation content. It leverages React's JSX for structuring elements like paragraphs, lists, and custom components (Card, CardGroup, Heading) to present features, a demo, and quickstart guides for various SDKs. ```JavaScript "use strict"; const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; const {useMDXComponents: _provideComponents} = arguments[0]; function _createMdxContent(props) { const _components = { a: "a", img: "img", li: "li", p: "p", strong: "strong", ul: "ul", ..._provideComponents(), ...props.components }, {Card, CardGroup, Frame, Heading} = _components; if (!Card) _missingMdxReference("Card", true); if (!CardGroup) _missingMdxReference("CardGroup", true); if (!Frame) _missingMdxReference("Frame", true); if (!Heading) _missingMdxReference("Heading", true); return _jsxs(_Fragment, { children: [_jsxs(_components.p, { children: [_jsx(_components.strong, { children: "Reown AppKit" }), " is a free and open-source all-in-one SDK and the official gateway to the WalletConnect Network for delivering smooth wallet connections, transactions, logins, and more within your app - designed to onboard millions and scale with data-driven precision. It abstracts the complexity of blockchain infrastructure so you can focus on building apps that users love."] }), "\n", _jsx(_components.p, { children: _jsx(_components.strong, { children: "AppKit includes:" }) }), "\n", _jsxs(_components.ul, { children: ["\n", _jsx(_components.li, { children: "Onboarding through email, social logins, and wallet connections" }), "\n", _jsx(_components.li, { children: "Multichain compatible (EVM, Solana, Bitcoin, etc.)" }), "\n", _jsx(_components.li, { children: "Access 600+ wallets with millions of users" }), "\n", _jsx(_components.li, { children: "Transaction UX flows (automated onchain actions, gas sponsorship, and chain/stablecoin abstraction)" }), "\n", _jsx(_components.li, { children: "Payment solutions (Pay with Wallet, Pay with Exchange, and Subscriptions)" }), "\n", _jsx(_components.li, { children: "Mobile and mini-app support" }), "\n", _jsx(_components.li, { children: "Built-in security (transaction screening and domain verification)" }), "\n", _jsxs(_components.li, { children: ["SDKs for ", _jsx(_components.strong, { children: "React, React Native, Flutter, Kotlin, Swift, Unity" }), ", and more"] }), "\n"] }), "\n", _jsx("video ``` -------------------------------- ### Serve jq Documentation Locally Source: https://jqlang.github.io/jq/download/ This Python command starts a simple HTTP server to serve the compiled jq documentation from the `output` directory. This allows for local previewing of the generated website content in a web browser. ```Shell python3 -m http.server -d output ``` -------------------------------- ### Install Specific Bun Version on Linux/macOS via Curl Source: https://bun.sh/docs/installation This command utilizes `curl` to download and execute the official Bun installation script, allowing users to specify a precise version (e.g., `bun-v1.2.17`) as an argument. This method is the standard approach for installing Bun on Linux and macOS environments. ```bash curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.17" ``` -------------------------------- ### Bun CLI: Install Dependencies Source: https://bun.sh/ The command to use Bun as a package manager to install project dependencies. Bun is npm-compatible and offers significantly faster installation times. ```Shell bun install ``` -------------------------------- ### Clone and Install LUKSO Playground Repository Source: https://github.com/lukso-network/lukso-playground Instructions to clone the LUKSO Playground repository from GitHub and install its dependencies using the Bun package manager. Ensure Bun is installed before running these commands. ```Shell git clone https://github.com/lukso-network/lukso-playground.git cd lukso-playground && bun install ```