### Install wget and jq (Linux/Mac) Source: https://docs.mayaprotocol.com/node-docs/mayanodes/kubernetes/setup-aws Installs the `wget` and `jq` utilities using Homebrew on Linux or macOS. `wget` is used for downloading files, and `jq` is a lightweight command-line JSON processor, both of which may be required by the EKS module. ```bash brew install wget brew install jq ``` -------------------------------- ### Streaming Swaps Memo Parameters (Examples) Source: https://docs.mayaprotocol.com/mayachain-dev-docs/introduction/swapping-guide/quickstart-guide These examples illustrate how to configure streaming swaps using the `streaming_interval` and `streaming_quantity` parameters in the swap memo. This feature breaks down large trades to minimize slippage fees. ```text `/10/0` - Let the protocol determine optimal quantity, swap every 10 blocks ``` ```text `/5/3` - Execute 3 sub-swaps, one every 5 blocks ``` -------------------------------- ### Project Setup for Maya Protocol Zcash Integration (Bash) Source: https://docs.mayaprotocol.com/llms-full.txt/1 Commands to set up a new Node.js project for integrating with Maya Protocol using Zcash and XChainJS. This includes creating a project directory, initializing npm, installing necessary dependencies (client, util, types, typescript), and setting up the TypeScript compiler. ```bash # Create project directory mkdir maya-xchain-zcash cd maya-xchain-zcash # Initialize npm project npm init -y # Install dependencies npm install @xchainjs/xchain-zcash @xchainjs/xchain-client @xchainjs/xchain-util npm install -D @types/node typescript ts-node # Create the TypeScript config and source file from above # Then run the example npm run dev ``` -------------------------------- ### Install wget with Chocolatey on Windows Source: https://context7_llms Installs the wget utility, a command-line tool for downloading files from the internet, on Windows using the Chocolatey package manager. This is useful for fetching resources needed during setup. ```bash choco install wget ``` -------------------------------- ### Configuration and Setup of a Wallet using TestBed Source: https://context7_llms Illustrates the process of configuring and setting up a wallet using the TestBed environment, likely for testing and development purposes. This setup is crucial for initializing and managing blockchain interactions within the THORChain ecosystem. ```typescript // This is a conceptual representation based on the provided link. // Actual implementation would be within the TestBed project. // Assuming TestBed provides a way to configure network, endpoints, etc. interface WalletConfig { network: string; midgard?: string; mayanode?: string; // other configuration options } function setupWallet(config: WalletConfig) { console.log('Setting up wallet with configuration:', config); // Initialize clients and wallet with provided configuration // Example: const client = new XChainClient(config); // return client; } // Example usage: // const testnetConfig = { network: 'testnet', midgard: '...' }; // const walletInstance = setupWallet(testnetConfig); ``` -------------------------------- ### Install wget with Homebrew on macOS Source: https://context7_llms Installs the wget utility, a command-line tool for downloading files from the internet, on macOS using the Homebrew package manager. This is useful for fetching resources needed during setup. ```bash brew install wget ``` -------------------------------- ### Configure Subaffiliates for Revenue Sharing (Memo Examples) Source: https://docs.mayaprotocol.com/mayachain-dev-docs/concepts/fees These examples illustrate how to set up subaffiliates and specify their revenue share percentages (basis points) using `MsgDeposit` memos. This allows for tiered revenue distribution from affiliate fees. ```text ~:wr:500:SUBA1:2000 ``` ```text ~:wr:500:SUBA2:1000 ``` -------------------------------- ### Install Go (v1.23.4) Source: https://context7_llms Installs Go version 1.23.4 in the user's home directory. This avoids the need for sudo privileges and is the required version for the latest MAYANode. ```bash # Remove any existing Go installation rm -rf ~/.go ``` -------------------------------- ### Install Maya Protocol Zcash JS SDK (JavaScript/TypeScript) Source: https://docs.mayaprotocol.com/llms-full.txt/1 This installation guide provides the npm and yarn commands to install the `@mayaprotocol/zcash-js` SDK and its dependencies, including `ecpair`, `tiny-secp256k1-asmjs`, `axios`, and development-specific packages like `@types/node`, `typescript`, and `ts-node`. ```bash # Install required packages npm install @mayaprotocol/zcash-js ecpair @bitcoin-js/tiny-secp256k1-asmjs axios # For TypeScript development npm install -D @types/node typescript ts-node # Alternative: Using Yarn yarn add @mayaprotocol/zcash-js ecpair @bitcoin-js/tiny-secp256k1-asmjs axios yarn add -D @types/node typescript ts-node ``` -------------------------------- ### Install Kubernetes Control Tool (kubectl) (Linux/Mac) Source: https://docs.mayaprotocol.com/node-docs/mayanodes/kubernetes/setup-aws Installs the `kubectl` command-line tool using Homebrew on Linux or macOS. `kubectl` is the primary tool for interacting with Kubernetes clusters. ```bash brew install kubernetes-cli ``` -------------------------------- ### Install Azure CLI and Login Source: https://context7_llms Installs the Azure CLI using Homebrew on Linux or macOS, and then logs in to Azure. The Azure CLI is used to manage Azure services. ```bash brew install azure-cli az login ``` -------------------------------- ### Install AWS IAM Authenticator (Linux/Mac) Source: https://docs.mayaprotocol.com/node-docs/mayanodes/kubernetes/setup-aws Installs the AWS IAM Authenticator tool using Homebrew on Linux or macOS. This tool is required for `kubectl` to authenticate with your AWS EKS cluster. ```bash brew install aws-iam-authenticator ``` -------------------------------- ### Install Mayansode Binary Source: https://context7_llms Builds and installs the Mayansode binary using the 'make install' command with specified network and tag configurations. This compiles the project into an executable binary. ```shell TAG=mainnet NET=mainnet make install ``` -------------------------------- ### Install Terraform CLI (Linux/Mac) Source: https://docs.mayaprotocol.com/node-docs/mayanodes/kubernetes/setup-aws Installs the Terraform CLI using the Homebrew package manager on Linux or macOS. Terraform is used to manage and provision the AWS infrastructure for the Kubernetes cluster. ```bash brew install terraform ``` -------------------------------- ### Configure MAYAName for Preferred Asset Fees (Memo Example) Source: https://docs.mayaprotocol.com/mayachain-dev-docs/concepts/fees This example demonstrates the memo format required to register a MAYAName, set a preferred asset (USDC on Ethereum), and specify payout addresses. It's used in a `MsgDeposit` transaction on the MAYAChain network. Ensure the preferred asset is supported by MAYAChain. ```text ~:wr:ETH:0x6621d872f17109d6601c49edba526ebcfd332d5d:maya1g8dzs4ywxhf8hynaddw4mhwzlwzjfccakkfch7:ETH.USDC-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48 ``` -------------------------------- ### Bitcoin Balance Query Example using xchain-client Source: https://context7_llms Provides an example of querying the balance of a Bitcoin address using the xchain-client package. This function retrieves the balance and can be adapted for other supported chains. Note that some chains require address history to be queried. ```typescript import { Client, Address, Balance } from '@xchainjs/xchain-client'; import { BitcoinClient } from '@xchainjs/xchain-bitcoin'; async function getBitcoinBalance(address: Address, network: string = 'testnet'): Promise { const btcClient = new BitcoinClient({ network }); try { const balances = await btcClient.getBalance(address); console.log(`Balance for ${address}:`, balances); return balances; } catch (error) { console.error('Error fetching Bitcoin balance:', error); throw error; } } // Example usage: const exampleAddress = 'tb1q9d5d6d5s9x9f9x9s9f9s9f9s9f9s9f9s9f9f'; // Replace with a valid testnet address // getBitcoinBalance(exampleAddress, 'testnet').catch(console.error); ``` -------------------------------- ### Download and Extract Go Source: https://context7_llms Downloads the specified Go version, extracts it to the home directory, moves it to .go, and removes the downloaded archive. This sets up the Go environment for subsequent steps. ```shell wget https://golang.org/dl/go1.23.4.linux-amd64.tar.gz tar -C ~/ -xzf go1.23.4.linux-amd64.tar.gz mv ~/go ~/.go rm go1.23.4.linux-amd64.tar.gz ``` -------------------------------- ### MAYAChain Quote Swap Response Example Source: https://docs.mayaprotocol.com/mayachain-dev-docs/introduction/swapping-guide/quickstart-guide An example JSON response from the MAYAChain quote swap endpoint. It details the expected amount out, associated fees (affiliate and outbound), and the required inbound address for the transaction. ```json { "expected_amount_out": "1851200268", "fees": { "affiliate": "1854014", "asset": "ETH.ETH", "outbound": "960000" }, "inbound_address": "bc1qqtemwlu9ju3ts3da5l82qejnzdl3xfs3lcl4wg", "inbound_confirmation_blocks": ``` -------------------------------- ### Deploy Node using Make Provider Source: https://context7_llms This command deploys a MAYANode. Replace `` with your specific cloud provider (e.g., aws, do). Ensure you have the necessary AWS/DO account and credentials set up. ```bash make ``` -------------------------------- ### Install Google Cloud SDK on Linux/Mac Source: https://context7_llms Installs the Google Cloud SDK, which provides tools for managing GCP services. It includes steps for initialization, authentication, and enabling necessary APIs. ```bash brew install google-cloud-sdk gcloud init gcloud auth application-default login gcloud services enable compute.googleapis.com gcloud services enable container.googleapis.com ``` -------------------------------- ### MAYAChain Quote Swap Endpoint Example Source: https://docs.mayaprotocol.com/mayachain-dev-docs/introduction/swapping-guide/quickstart-guide Example of requesting a swap quote from the MAYAChain API. This quote includes parameters for the amount, source and destination assets, the user's destination address, and liquidity tolerance in basis points. ```URL https://mayanode.mayachain.info/mayachain/quote/swap?amount=100000000&from_asset=BTC.BTC&to_asset=ETH.ETH&destination=0x3021c479f7f8c9f1d5c7d8523ba5e22c0bcb5430&liquidity_tolerance_bps=500 ```