### Install Dependencies Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/development_setup.md Command to install project dependencies using yarn. ```bash yarn install ``` -------------------------------- ### Install Dependencies Source: https://github.com/helium/tuktuk/blob/main/typescript-examples/README.md Installs project dependencies using yarn. ```bash yarn install ``` -------------------------------- ### Anchor.toml Configuration Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/development_setup.md Example configuration for Anchor.toml to set up a local testing environment, including cluster and wallet. ```toml [provider] cluster = "localnet" wallet = "~/.config/solana/id.json" # Your local keypair. Find address using `solana address` ``` -------------------------------- ### Local Testing Setup - Anchor.toml Configuration Source: https://github.com/helium/tuktuk/blob/main/README.md Example configuration for Anchor.toml to set up local testing with a specified cluster and wallet. ```toml [provider] cluster = "localnet" wallet = "~/.config/solana/id.json" # Your local keypair. Find address using `solana address` ``` -------------------------------- ### Run Simple Memo Task - Help Source: https://github.com/helium/tuktuk/blob/main/typescript-examples/README.md Shows help and available options for the simple memo task example. ```bash yarn memo -- --help ``` -------------------------------- ### Install OpenSSL Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/prerequisites.md Installs OpenSSL using Homebrew. ```bash brew install openssl ``` -------------------------------- ### Run Simple Memo Task - Example Source: https://github.com/helium/tuktuk/blob/main/typescript-examples/README.md Runs the simple memo task example with specified parameters. ```bash yarn memo -- \ --queueName my-queue \ --walletPath ./wallet.json \ --rpcUrl https://api.devnet.solana.com \ --message "Hello TukTuk!" ``` -------------------------------- ### Run Token Transfer Task - Help Source: https://github.com/helium/tuktuk/blob/main/typescript-examples/README.md Shows help and available options for the token transfer task example. ```bash yarn token-transfer -- --help ``` -------------------------------- ### Install the Crank Turner Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/running-a-crank-turner.md Install the crank turner using cargo. ```bash cargo install tuktuk-crank-turner ``` -------------------------------- ### Get Devnet SOL Source: https://github.com/helium/tuktuk/blob/main/typescript-examples/README.md Airdrops 2 SOL to the specified wallet address on the devnet. ```bash solana airdrop 2 $(solana address -k ./wallet.json) --url devnet ``` -------------------------------- ### Create Solana Wallet Source: https://github.com/helium/tuktuk/blob/main/typescript-examples/README.md Creates a new Solana wallet keypair file for testing. ```bash solana-keygen new --outfile ./wallet.json ``` -------------------------------- ### Install TukTuk CLI Source: https://github.com/helium/tuktuk/blob/main/README.md Command to install the tuktuk-cli using cargo. ```bash cargo install tuktuk-cli ``` -------------------------------- ### Run Token Transfer Task - Example Source: https://github.com/helium/tuktuk/blob/main/typescript-examples/README.md Runs the token transfer task example with specified parameters. ```bash yarn token-transfer -- \ --queueName my-queue \ --walletPath ./wallet.json \ --rpcUrl https://api.devnet.solana.com ``` -------------------------------- ### Install and set Rust version Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/prerequisites.md Installs and sets the default Rust compiler version to 1.85. ```bash rustup install 1.85 rustup default 1.85 ``` -------------------------------- ### Run Scheduled Memo Task (Cron) - Example Source: https://github.com/helium/tuktuk/blob/main/typescript-examples/README.md Runs the scheduled memo task example with specified parameters. ```bash yarn cron-memo -- \ --cronName my-cron \ --queueName my-queue \ --walletPath ./wallet.json \ --rpcUrl https://api.devnet.solana.com \ --message "Hello from cron!" \ --fundingAmount 1000000000 ``` -------------------------------- ### Account Not Initialized Error Log Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/troubleshooting.md Example log message for the AccountNotInitialized error. ```text Program log: AnchorError caused by account: task. Error Code: AccountNotInitialized. Error Number: 3012. Error Message: The program expected this account to be already initialized. ``` -------------------------------- ### Run Scheduled Memo Task (Cron) - Help Source: https://github.com/helium/tuktuk/blob/main/typescript-examples/README.md Shows help and available options for the scheduled memo task example. ```bash yarn cron-memo -- --help ``` -------------------------------- ### Local Testing Setup - Run Tests Source: https://github.com/helium/tuktuk/blob/main/README.md Command to run tests using Anchor, with the TESTING environment variable set to true. ```bash env TESTING=true anchor test ``` -------------------------------- ### Run Tests Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/development_setup.md Command to run tests using Anchor, with the TESTING environment variable set to true. ```bash env TESTING=true anchor test ``` -------------------------------- ### Queueing a Remote Task Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/remote_transactions.md Example of how to queue a task using `remoteV0` in the `QueueTaskV0` instruction. ```typescript await program.methods.queueTaskV0({ id: taskId, trigger: { now: {} }, transaction: { remoteV0: { url: "http://localhost:3002/remote", signer: me, }, }, }); ``` -------------------------------- ### Stop Cron Job Source: https://github.com/helium/tuktuk/blob/main/typescript-examples/README.md Stops a running cron job using the tuktuk-cli. ```bash tuktuk cron close --cron-name my-cron ``` -------------------------------- ### Get a Specific Cron Job Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/monitoring_the_cron_job.md Retrieves details of a particular cron job by its name. ```bash tuktuk -u cron get --cron-name ``` -------------------------------- ### Run Task with Skip Preflight Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/troubleshooting.md Command to run a task and see failed transactions in Solana Explorer. ```bash tuktuk -u task run --task-queue-name --task-id --skip-preflight ``` -------------------------------- ### Run the Crank Turner Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/running-a-crank-turner.md Run the crank turner using the configuration file. ```bash tuktuk-crank-turner -c config.toml ``` -------------------------------- ### Create a Task Queue Command Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/create_a_task_queue.md This command creates a new task queue with specified parameters. The `funding-amount` is for recursive task queuing fees, and the `crank-reward` incentivizes crankers. ```bash tuktuk -u task-queue create --name --capacity 10 --funding-amount 100000000 --queue-authority --crank-reward 1000000 ``` -------------------------------- ### List Tasks Command Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/troubleshooting.md Command to list tasks in a queue. ```bash tuktuk -u task list --task-queue-name ``` -------------------------------- ### Run tasks by description prefix Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/running_a_task.md This command runs tasks that match a given description prefix, useful for targeting specific types of tasks in a large queue. ```bash tuktuk -u task run --task-queue-name --description ``` -------------------------------- ### Crank Turner Configuration Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/running-a-crank-turner.md Configuration file for the crank turner. ```toml rpc_url = "https://api.mainnet-beta.solana.com" key_path = "/path/to/your/keypair.json" min_crank_fee = 10000 ``` -------------------------------- ### Run the Crank Turner with Environment Variables Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/running-a-crank-turner.md Run the crank turner using environment variables for configuration. ```bash export TUKTUK__RPC_URL="https://api.mainnet-beta.solana.com" export TUKTUK__KEY_PATH="/path/to/your/keypair.json" export TUKTUK__MIN_CRANK_FEE=10000 tuktuk-crank-turner ``` -------------------------------- ### Fund a Task Queue Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/funding_a_task_queue.md Command to fund a task queue with a specified amount of SOL. ```bash tuktuk -u task-queue fund --task-queue-name --amount 100000000 ``` -------------------------------- ### List tasks in a queue Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/monitoring_the_task_queue.md This command lists tasks in a specified queue, with an option to filter by a description prefix. ```bash tuktuk -u task list --task-queue-name --description ``` -------------------------------- ### List Cron Jobs Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/monitoring_the_cron_job.md Lists all available cron jobs. ```bash tuktuk -u cron list ``` -------------------------------- ### Run a specific task by ID Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/running_a_task.md This command runs a specific task identified by its task ID. ```bash tuktuk -u task run --task-queue-name --task-id ``` -------------------------------- ### Close tasks by prefix Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/closing_tasks.md This command closes tasks based on a description prefix, useful for bulk closing similar tasks. ```bash tuktuk -u task close --task-queue-name --description ``` -------------------------------- ### Close Task Queue Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/closing_a_task_queue.md Command to close the task queue, which refunds the SOL deposit and funding amount. ```bash tuktuk -u task-queue close --task-queue-name ``` -------------------------------- ### List Cron Job Transactions Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/monitoring_the_cron_job.md Lists all transactions associated with a specific cron job. ```bash tuktuk -u cron-transaction list --cron-name ``` -------------------------------- ### Requeue a Cron Task Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/monitoring_the_cron_job.md Requeues a cron task that may have been removed from the queue due to insufficient funding or forceful removal. ```bash tuktuk -u cron requeue --cron-name ``` -------------------------------- ### Add Queue Authority Command Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/adding_queue_authorities.md Command to add a new authority to a task queue, enabling it to queue tasks on behalf of other users. ```bash tuktuk -u task-queue add-queue-authority --task-queue-name --queue-authority ``` -------------------------------- ### Close a specific task Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/closing_tasks.md This command closes a specific task by its ID, refunding SOL fees. ```bash tuktuk -u task close --task-queue-name --task-id ``` -------------------------------- ### Check if Cron is Queued Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/monitoring_the_cron_job.md Checks the task queue to confirm if a cron job is currently queued. ```bash tuktuk -u task list --task-queue-name --description "queue " ``` -------------------------------- ### Remote Server Response Body Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/remote_transactions.md The JSON body your server should return to Tuktuk. ```json { "transaction": "", "remaining_accounts": "", "signature": "" } ``` -------------------------------- ### Remove Queue Authority Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/closing_a_task_queue.md Before closing a task queue, you must remove any queue authorities. ```bash tuktuk -u task-queue remove-queue-authority --task-queue-name --queue-authority ``` -------------------------------- ### Close Cron Transactions Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/monitoring_the_cron_job.md Closes all transactions within a cron job before closing the cron job itself. ```bash tuktuk -u cron-transaction close --cron-name --id ``` -------------------------------- ### Close a Cron Job Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/monitoring_the_cron_job.md Closes a specific cron job after all its transactions have been closed. ```bash tuktuk -u cron close --cron-name ``` -------------------------------- ### Tuktuk POST Request Body Source: https://github.com/helium/tuktuk/blob/main/docsite/src/pages/docs/learn/remote_transactions.md The JSON body Tuktuk sends to the remote server for task processing. ```json { "task": "", "task_queue": "", "task_queued_at": "" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.