### Progress Display Example Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Show the progress of the onboarding or setup process based on the preflight's `progress` field. This example shows a four-step process. ```text [1/4] wallet ✓ [2/4] registered ✓ (free, no AWP required) [3/4] worknet #1 "Benchmark" (free) [4/4] ready ✓ ``` -------------------------------- ### Install AWP Wallet Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md This command installs the awp-wallet by cloning the official repository and running its install script. Use this when the wallet binary is not found. ```bash git clone https://github.com/awp-core/awp-wallet.git /tmp/awp-wallet-install \ && bash /tmp/awp-wallet-install/install.sh ``` -------------------------------- ### Install Worknet Skill Source: https://github.com/awp-core/awp-skill/blob/main/README.md Fetches a worknet's SKILL.md file and installs it for the agent to use. This action is read-only and does not require a wallet. ```bash Q6 ``` -------------------------------- ### Install AWP Skill Source: https://github.com/awp-core/awp-skill/blob/main/README.md Use this command to install the AWP Skill. It will also install the AWP Wallet dependency if it's missing. ```bash skill install https://github.com/awp-core/awp-skill ``` -------------------------------- ### Correct Agent Wallet Setup Flow Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md This sequence demonstrates the complete and secure setup flow for an AWP agent wallet, resulting in a functional wallet with zero user-supplied secrets. ```bash awp-wallet init → creates ~/.awp-wallet/ with auto-generated keys awp-wallet receive → prints {"eoaAddress": "0x..."} (the NEW agent address) ``` -------------------------------- ### Install AWP Skill as a Dependency Source: https://github.com/awp-core/awp-skill/blob/main/README.md When installing the AWP Skill as a dependency for another skill, ensure you also install the AWP Wallet CLI and make its binary discoverable in your PATH. ```bash # 1. Install awp-skill itself skill install https://github.com/awp-core/awp-skill # 2. Install the awp-wallet CLI dependency skill install https://github.com/awp-core/awp-wallet # 3. Make the wallet binary discoverable. Installers commonly drop it in # ~/.local/bin / ~/.npm-global/bin / ~/.yarn/bin, none of which are in PATH # on a fresh shell. Check all common locations: WALLET_BIN="$(command -v awp-wallet 2>/dev/null \ || ls -1 "$HOME/.local/bin/awp-wallet" "$HOME/.npm-global/bin/awp-wallet" \ "$HOME/.yarn/bin/awp-wallet" "/usr/local/bin/awp-wallet" 2>/dev/null \ | head -n1)" if [ -n "$WALLET_BIN" ] && ! command -v awp-wallet >/dev/null 2>&1; then export PATH="$(dirname "$WALLET_BIN"):$PATH" fi ``` -------------------------------- ### Install Worknet Skill Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Installs a skill for a specified worknet. Handles third-party sources with a confirmation step. ```APIDOC ## POST /v2 (subnets.getSkills) ### Description Installs a skill for a given worknet. For awp-worknet sources, installation is direct. For third-party sources, a confirmation prompt is displayed before installation. ### Method POST ### Endpoint https://api.awp.sh/v2 ### Parameters #### Request Body - **jsonrpc** (string) - Required - JSON-RPC version, should be "2.0". - **method** (string) - Required - The method to call, should be "subnets.getSkills". - **params** (object) - Required - Parameters for the method. - **worknetId** (string) - Required - The ID of the worknet for which to install the skill. - **id** (integer) - Required - Request ID. ### Request Example ```json { "jsonrpc": "2.0", "method": "subnets.getSkills", "params": { "worknetId": "ID" }, "id": 1 } ``` ### Response #### Success Response (200) - **result** (string) - Confirmation message indicating successful installation or status. - **id** (integer) - The request ID. #### Response Example ```json { "result": "Installed ✓", "id": 1 } ``` ``` -------------------------------- ### Quick Start Commands for Solo Mining Source: https://github.com/awp-core/awp-skill/blob/main/README.md Commands to initiate solo mining and onboarding process. ```bash 1. "start working" or "awp onboard" 2. Option A: Quick Start → auto-register 3. Pick a worknet → skill auto-installs 4. Start working immediately (min_stake=0 worknets) ``` -------------------------------- ### Setup Contract Addresses and Wallet Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-governance.md Reference contract addresses and obtain a wallet address. These are handled automatically by bundled scripts for actual operations. ```bash # Reference only — actual operations are handled automatically by scripts/*.py # Contract addresses (same on all chains) AWP_REGISTRY="0x0000F34Ed3594F54faABbCb2Ec45738DDD1c001A" AWP_TOKEN="0x0000A1050AcF9DEA8af9c2E74f0D7CF43f1000A1" VE_AWP="0x0000b534C63D78212f1BDCc315165852793A00A8" AWP_WORKNET="0x00000bfbdEf8533E5F3228c9C846522D906100A7" DAO_ADDR="0x00006879f79f3Da189b5D0fF6e58ad0127Cc0DA0" TREASURY="0x82562023a053025F3201785160CaE6051efD759e" WALLET_ADDR=$(awp-wallet receive | jq -r '.eoaAddress') ``` -------------------------------- ### Raw Contract Call Example (grantDelegate) Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-staking.md Example of sending raw contract calls using `wallet-raw-call.mjs`. This is used for functions like grantDelegate, revokeDelegate, and setRecipient when bundled scripts are not available. Ensure the correct contract address and calldata are provided. ```javascript # node scripts/wallet-raw-call.mjs --token {T} --to {awpRegistryAddr} \ # --data $(cast calldata "grantDelegate(address)" {delegateAddr}) ``` -------------------------------- ### Start Delegated Mining (Agent Mode) Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Starts delegated mining by binding the agent to a specified root address. This command is part of the gasless relay operations. ```bash python3 scripts/relay-start.py --token $TOKEN --mode agent --target ``` -------------------------------- ### Check awp-wallet Dependency Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Detects the awp-wallet in the system's PATH or common installation locations. This is crucial to prevent 'command not found' errors for users after a successful installation. ```bash which awp-wallet ``` -------------------------------- ### Start AWP Status Monitor Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Initializes the background daemon to poll the AWP API every 5 minutes. Requires the script path to be resolved relative to the skill directory. ```bash mkdir -p ~/.awp && pgrep -f "python3.*awp-daemon" >/dev/null 2>&1 || \ nohup python3 scripts/awp-daemon.py --interval 300 >> ~/.awp/daemon.log 2>&1 & ``` -------------------------------- ### Get User Portfolio Overview Source: https://context7.com/awp-core/awp-skill/llms.txt Retrieve a comprehensive user portfolio including identity, staking balances, veAWP positions, allocations, and delegates in one request. ```bash curl -s -X POST https://api.awp.sh/v2 \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"users.getPortfolio","params":{"address":"0x1234567890abcdef1234567890abcdef12345678","chainId":8453},"id":1}' # Response: # { # "jsonrpc": "2.0", # "result": { # "identity": {"isRegistered": true, "boundTo": "0x...", "recipient": "0x..."}, # "balance": {"totalStaked": "5000000000000000000000", "totalAllocated": "3000000000000000000000", "unallocated": "2000000000000000000000"}, # "positions": [{"tokenId": "1", "amount": "5000000000000000000000", "lockEndTime": 1735689600, "createdAt": 1704153600}], # "allocations": [{"agent": "0x...", "worknetId": "845300000001", "amount": "3000000000000000000000"}], # "delegates": ["0xDelegate1...", "0xDelegate2..."] # }, # "id": 1 # } ``` -------------------------------- ### Fetch Registry via JSON-RPC Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-staking.md Example of fetching the registry contract address using a JSON-RPC request via curl. ```bash # Reference only — actual operations are handled automatically by scripts/*.py # Fetch registry via JSON-RPC REGISTRY=$(curl -s -X POST https://api.awp.sh/v2 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"registry.get","params":{},"id":1}' | jq -r '.result') # Contract addresses (same on all chains) AWP_REGISTRY="0x0000F34Ed3594F54faABbCb2Ec45738DDD1c001A" AWP_TOKEN="0x0000A1050AcF9DEA8af9c2E74f0D7CF43f1000A1" VE_AWP="0x0000b534C63D78212f1BDCc315165852793A00A8" AWP_ALLOCATOR="0x0000D6BB5e040E35081b3AaF59DD71b21C9800AA" AWP_WORKNET="0x00000bfbdEf8533E5F3228c9C846522D906100A7" DAO_ADDR="0x00006879f79f3Da189b5D0fF6e58ad0127Cc0DA0" LP_MANAGER="0x00001961b9AcCD86b72DE19Be24FaD6f7c5b00A2" WALLET_ADDR=$(awp-wallet receive | jq -r '.eoaAddress') ``` -------------------------------- ### Display Welcome Banner Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md This is the welcome banner displayed on the first interaction in a new session. It confirms the AWP skill is active and provides quick start commands. ```text ╭──────────────╮ │ │ │ > < │ │ ‿ │ │ │ ╰──────────────╯ agent · work · protocol welcome to awp. one protocol. infinite jobs. nonstop earnings. ── quick start ────────────────── "awp start" → register + join (free, no AWP needed) "awp balance" → staking overview "awp worknets" → browse active worknets "awp watch" → real-time monitor "awp help" → all commands ────────────────────────────────── no AWP tokens needed to start. register for free → pick a worknet → start earning. ``` -------------------------------- ### Transaction Summary and Confirmation Prompt Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Before executing any on-chain transaction, display a summary including the action, target, chain, and estimated cost, then wait for explicit user confirmation. This example shows a deposit action. ```text [TX] deposit 1,000 AWP → new position (lock: 90 days) contract: veAWP (0x4E11...ba2d) | chain: Base (8453) | gas: ~0.001 ETH Proceed? (yes/no) ``` -------------------------------- ### subnets.get - Get Worknet Details Source: https://context7.com/awp-core/awp-skill/llms.txt Fetches comprehensive details for a specific worknet, including configuration and token addresses. ```bash curl -s -X POST https://api.awp.sh/v2 \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"subnets.get","params":{"worknetId":"845300000001"},"id":1}' ``` -------------------------------- ### API Request Example - POST Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md All API calls are made via JSON-RPC 2.0 using POST requests to the specified endpoint. Ensure the Content-Type header is set to application/json. ```http POST https://api.awp.sh/v2 Content-Type: application/json ``` -------------------------------- ### GET /api/vanity/salts/count Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-worknet.md Get the count of available salts. ```APIDOC ## GET /api/vanity/salts/count ### Description Returns the count of available (unclaimed) salts. ### Method GET ### Endpoint /api/vanity/salts/count ### Response #### Success Response (200) - **available** (number) - Number of available salts #### Response Example { "available": 42 } ``` -------------------------------- ### Gasless Agent Onboarding Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Performs agent registration and optional staking/allocation in a gasless manner, recommended for users without ETH. Supports binding to a specified owner address. ```bash python3 scripts/relay-onboard.py --token $TOKEN ``` ```bash python3 scripts/relay-onboard.py --token $TOKEN --amount 5000 --lock-days 90 --worknet 1 ``` ```bash python3 scripts/relay-onboard.py --token $TOKEN --target ``` -------------------------------- ### On-Chain Agent Onboarding Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Registers an agent and performs staking and allocation on-chain. This method requires ETH for transaction fees. ```bash python3 scripts/onchain-onboard.py --token $TOKEN --amount 5000 --lock-days 90 --worknet 1 ``` -------------------------------- ### Initialize Agent Wallet Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Use this command to initialize a new agent wallet. This process is fully non-interactive, generating keys internally and storing them securely without requiring any user input. ```bash awp-wallet init # generates a NEW agent wallet — no user input ``` -------------------------------- ### Query Staking Balance Overview Source: https://github.com/awp-core/awp-skill/blob/main/README.md Provides a full staking overview, including current positions, allocations, and unallocated balance. This action is read-only and does not require a wallet. ```bash Q2 ``` -------------------------------- ### GET /api/vanity/salts Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-worknet.md List available (unclaimed) salts. ```APIDOC ## GET /api/vanity/salts ### Description List available (unclaimed) salts. ### Method GET ### Endpoint /api/vanity/salts ### Parameters #### Query Parameters - **limit** (number) - Optional - Pagination limit ``` -------------------------------- ### GET /api/relay/status/{txHash} Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-worknet.md Checks the status of a relay transaction. ```APIDOC ## GET /api/relay/status/{txHash} ### Description Retrieves the processing status of a relay transaction using its hash. ### Method GET ### Endpoint https://api.awp.sh/api/relay/status/{txHash} ### Parameters #### Path Parameters - **txHash** (string) - Required - The transaction hash to query ``` -------------------------------- ### Register New Worknet Source: https://github.com/awp-core/awp-skill/blob/main/README.md Deploys a new worknet, including its worknet token and LP pool. A gasless option is available. This action requires AWPWorkNet ownership and a wallet. ```bash M1 ``` -------------------------------- ### GET /api/vanity/mining-params Source: https://github.com/awp-core/awp-skill/blob/main/skill-reference.md Retrieves parameters required for vanity salt mining. ```APIDOC ## GET /api/vanity/mining-params ### Description Returns bytecodeHash, vanityRule, and factoryAddress for salt mining. ### Method GET ### Endpoint /api/vanity/mining-params ``` -------------------------------- ### GET /api/relay/status/{txHash} Source: https://github.com/awp-core/awp-skill/blob/main/skill-reference.md Queries the confirmation status of a relay transaction. ```APIDOC ## GET /api/relay/status/{txHash} ### Description Retrieves the relay transaction confirmation status. ### Method GET ### Endpoint /api/relay/status/{txHash} ### Parameters #### Path Parameters - **txHash** (string) - Required - The transaction hash to query. ``` -------------------------------- ### Get Available Salts Count Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-worknet.md Retrieves the count of available salts. ```bash GET /api/vanity/salts/count ``` ```json {"available": 42} ``` -------------------------------- ### Initialize AWP Agent Wallet Source: https://github.com/awp-core/awp-skill/blob/main/README.md Initializes a fresh agent work wallet with a new internal keypair. This command is non-interactive and must not prompt the user for any secrets. It generates its own keypair and never needs to import existing keys. ```bash awp-wallet init ``` -------------------------------- ### On-chain Staking Command Templates Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-staking.md Python-based CLI commands for managing deposits and positions. ```bash # Deposit (approve + deposit in one script) python3 scripts/onchain-deposit.py --token {T} --amount 5000 --lock-days 90 # Withdraw (after lock expires) python3 scripts/onchain-withdraw.py --token {T} --position {tokenId} # Add to existing position python3 scripts/onchain-add-position.py --token {T} --position {tokenId} --amount 1000 --extend-days 30 ``` -------------------------------- ### GET /api/vanity/mining-params Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Retrieves the necessary parameters for offline vanity salt mining. ```APIDOC ## GET /api/vanity/mining-params ### Description Returns the factory address, initialization code hash, and vanity rule required for offline salt mining. ### Method GET ### Endpoint /api/vanity/mining-params ### Response #### Success Response (200) - **factoryAddress** (string) - The address of the factory contract. - **initCodeHash** (string) - The hash of the initialization code. - **vanityRule** (string) - The rule defining the vanity address requirements. ``` -------------------------------- ### GET /api/relay/status/{txHash} Source: https://context7.com/awp-core/awp-skill/llms.txt Checks the status of a previously submitted relay transaction. ```APIDOC ## GET /api/relay/status/{txHash} ### Description Retrieves the confirmation status of a relay transaction. ### Method GET ### Endpoint https://api.awp.sh/api/relay/status/{txHash} ### Parameters #### Path Parameters - **txHash** (string) - Required - The transaction hash to query ### Response #### Success Response (200) - **txHash** (string) - The transaction hash - **status** (string) - Current status (e.g., confirmed) - **blockNumber** (integer) - The block number where the transaction was confirmed ``` -------------------------------- ### Access Development Source Documents Source: https://github.com/awp-core/awp-skill/blob/main/README.md Command to switch to the 'dev' branch for accessing protocol specifications, including contract APIs, REST APIs, configuration details, and ABIs. ```bash git checkout dev # access skills-dev/ with contract-api.md, rest-api.md, config.md, ABIs, etc. ``` -------------------------------- ### Registration Choice Prompt Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Present both registration options to the user and wait for their selection. Do not auto-select. This prompt is shown when preflight returns nextAction: "register". ```text ── how do you want to start? ───── Option A: Quick Start Register as an independent agent. Free, gasless. No AWP tokens needed. Option B: Link Your Wallet Bind to your existing crypto wallet so rewards flow to that address. Free, gasless. No AWP tokens needed. Which do you prefer? (A or B) ─────────────────────────────────── ``` -------------------------------- ### Query Treasury JSON-RPC Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-governance.md JSON-RPC method to get information about the AWP treasury. ```json {"jsonrpc": "2.0", "method": "governance.getTreasury", "params": {}, "id": 1} ``` -------------------------------- ### Get Quorum Requirement Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-governance.md View function to retrieve the quorum requirement for proposals. ```solidity function quorum(uint256) view returns (uint256) ``` -------------------------------- ### AWP Core Skill Error Recovery Protocol Steps Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Follow these steps when any part of the process fails or produces unexpected output. Always run the `preflight.py` script first; do not attempt to diagnose errors manually. ```bash 1. Run: python3 scripts/preflight.py 2. Read the nextAction field from the JSON output 3. Execute the nextCommand exactly as given 4. Repeat until preflight returns nextAction: "ready" ``` -------------------------------- ### Perform on-chain deposit and allocation Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Combines approve, deposit, and allocate steps into a single command. Requires ETH for gas. ```bash python3 scripts/onchain-stake.py --token $TOKEN --amount 5000 --lock-days 90 --agent --worknet 1 ``` -------------------------------- ### GET /api/vanity/mining-params Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-worknet.md Retrieves the parameters required for offline salt mining tools. ```APIDOC ## GET /api/vanity/mining-params ### Description Returns parameters for offline salt mining tools. ### Method GET ### Endpoint /api/vanity/mining-params ### Response #### Success Response (200) - **factoryAddress** (string) - The factory contract address - **initCodeHash** (string) - The initialization code hash - **vanityRule** (string) - The rule for vanity address generation #### Response Example { "factoryAddress": "0xAe8E...", "initCodeHash": "0xec76...", "vanityRule": "0x0A01FFFF0C0A0F0E" } ``` -------------------------------- ### GET /api/vanity/mining-params Source: https://github.com/awp-core/awp-skill/blob/main/references/api-reference.md Retrieves the necessary parameters for performing offline vanity address mining. ```APIDOC ## GET /api/vanity/mining-params ### Description Returns the factory address, init code hash, and vanity rule required for offline salt mining. ### Method GET ### Endpoint /api/vanity/mining-params ### Response #### Success Response (200) - **factoryAddress** (string) - The address of the factory contract - **initCodeHash** (string) - The hash of the initialization code - **vanityRule** (string) - The rule defining the vanity address requirements ``` -------------------------------- ### Run Preflight Check Source: https://context7.com/awp-core/awp-skill/llms.txt Executes a state machine check to determine the next required action for the wallet, such as registration or allocation. ```bash python3 scripts/preflight.py ``` -------------------------------- ### Get Proposal Creation Timestamp Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-governance.md View function to retrieve the timestamp when a proposal was created. ```solidity function proposalCreatedAt(uint256 proposalId) view returns (uint64) // Timestamp when proposal was created ``` -------------------------------- ### GET /api/health Source: https://github.com/awp-core/awp-skill/blob/main/references/api-reference.md REST endpoint to check the health status of the AWP API service. ```APIDOC ## GET /api/health ### Description Returns the health status of the API service. ### Method GET ### Endpoint https://api.awp.sh/api/health ### Response #### Success Response (200) - **status** (string) - The health status of the service (e.g., "ok") ``` -------------------------------- ### Announcement JSON Object Structure Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Example of the JSON structure returned by the announcements API. ```json { "id": 1, "chainId": 0, "title": "Emission schedule update", "content": "Daily emission reduced to 31.6M AWP per chain starting epoch 5.", "category": "emission", "priority": 1, "active": true, "createdAt": "2026-04-02T00:00:00Z", "expiresAt": "2026-04-10T00:00:00Z", "metadata": {"epochId": 5, "newEmission": "31600000"} } ``` -------------------------------- ### Get Worknet Skills via JSON-RPC Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Retrieves skills associated with a specific worknet ID. ```bash curl -s -X POST https://api.awp.sh/v2 \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"subnets.getSkills","params":{"worknetId":"ID"},"id":1}' ``` -------------------------------- ### Gasless Relay API Endpoints Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-staking.md List of available POST and GET endpoints for relay operations. ```text POST /api/relay/bind POST /api/relay/unbind POST /api/relay/set-recipient POST /api/relay/grant-delegate POST /api/relay/revoke-delegate GET /api/relay/status/{txHash} ``` -------------------------------- ### Subscribe to Real-time Events Source: https://github.com/awp-core/awp-skill/blob/main/README.md Subscribes to real-time events via WebSocket, offering 5 preset event types and 5-minute statistics. This action does not require a wallet. ```bash W1 ``` -------------------------------- ### Query Proposal Votes Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-governance.md View function to get the vote counts (against, for, abstain) for a specific proposal. ```solidity function proposalVotes(uint256 proposalId) view returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes) ``` -------------------------------- ### Query Governance Proposals Source: https://github.com/awp-core/awp-skill/blob/main/README.md Lists and inspects governance proposals with on-chain enrichment. This action is read-only and does not require a wallet. ```bash G3 ``` -------------------------------- ### Query Agent Status Overview Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Use this command to check an agent's registration, balance, positions, and allocations. It provides actionable hints for next steps. Requires the agent's address or an authentication token. ```bash python3 scripts/query-status.py --address 0x1234... ``` ```bash python3 scripts/query-status.py --token $TOKEN ``` -------------------------------- ### Register a Worknet Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md Registers a new Worknet using the relay script. Requires a valid token and IPFS URI for skills. ```bash python3 scripts/relay-register-worknet.py --token $TOKEN --name "MyWorknet" --symbol "MWKN" --skills-uri "ipfs://QmHash" ``` -------------------------------- ### Get Proposal Threshold Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-governance.md View function to retrieve the minimum AWP threshold required to create a proposal. ```solidity function proposalThreshold() view returns (uint256) // 200,000 AWP ``` -------------------------------- ### Gasless Registration Script Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-worknet.md Executes a gasless registration for a worknet using AWP only. This is the recommended method as it requires no ETH. Ensure you have the necessary token and worknet details. ```bash # Gasless registration (recommended — no ETH needed, AWP only): python3 scripts/relay-register-worknet.py --token {T} --name "MyWorknet" --symbol "MWRK" --skills-uri "ipfs://QmHash" ``` -------------------------------- ### Get Specific Proposal JSON-RPC Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-governance.md JSON-RPC method to retrieve details for a specific proposal using its ID. ```json {"jsonrpc": "2.0", "method": "governance.getProposal", "params": {"proposalId": "123"}, "id": 1} ``` -------------------------------- ### Get AWPRegistry nonce Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-worknet.md Retrieves the current nonce for a specific wallet address using a JSON-RPC request. ```bash NONCE=$(curl -s -X POST https://api.awp.sh/v2 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"nonce.get","params":{"address":"'$WALLET_ADDR'"},"id":1}' | jq -r '.result.nonce') ``` -------------------------------- ### System Methods Source: https://github.com/awp-core/awp-skill/blob/main/skill-reference.md Methods for retrieving system-level information. ```APIDOC ## POST /v2 (method: registry.get) ### Description Retrieves contract addresses and EIP-712 domain information for a specific chain. Defaults to the primary chain if `chainId` is not provided. ### Method POST ### Endpoint /v2 ### Parameters #### Request Body - **method** (string) - Must be "registry.get". - **params** (object) - **chainId** (integer) - Optional. The ID of the chain to retrieve information for. Defaults to the primary chain. ### Request Example ```json { "jsonrpc": "2.0", "method": "registry.get", "params": { "chainId": 1 }, "id": 1 } ``` ### Response #### Success Response (200) - **result** (object) - **contractAddresses** (object) - An object containing contract addresses. - **AWPRegistry** (string) - The address of the AWPRegistry contract. - **eip712Domain** (object) - EIP-712 domain information. - **name** (string) - The domain name. - **version** (string) - The domain version. - **chainId** (integer) - The chain ID. - **verifyingContract** (string) - The verifying contract address. ``` ```APIDOC ## POST /v2 (method: registry.list) ### Description Retrieves contract addresses for all supported chains. ### Method POST ### Endpoint /v2 ### Parameters #### Request Body - **method** (string) - Must be "registry.list". ### Request Example ```json { "jsonrpc": "2.0", "method": "registry.list", "id": 1 } ``` ### Response #### Success Response (200) - **result** (array) - An array of objects, where each object contains contract addresses for a specific chain. ``` ```APIDOC ## POST /v2 (method: health.check) ### Description Performs a health check on the API service. ### Method POST ### Endpoint /v2 ### Parameters #### Request Body - **method** (string) - Must be "health.check". ### Request Example ```json { "jsonrpc": "2.0", "method": "health.check", "id": 1 } ``` ### Response #### Success Response (200) - **result** (string) - The health status of the API (e.g., "ok"). ``` ```APIDOC ## POST /v2 (method: health.detailed) ### Description Retrieves detailed health status for each chain. ### Method POST ### Endpoint /v2 ### Parameters #### Request Body - **method** (string) - Must be "health.detailed". ### Request Example ```json { "jsonrpc": "2.0", "method": "health.detailed", "id": 1 } ``` ### Response #### Success Response (200) - **result** (object) - An object containing detailed health status per chain. ``` ```APIDOC ## POST /v2 (method: chains.list) ### Description Lists all supported chains. ### Method POST ### Endpoint /v2 ### Parameters #### Request Body - **method** (string) - Must be "chains.list". ### Request Example ```json { "jsonrpc": "2.0", "method": "chains.list", "id": 1 } ``` ### Response #### Success Response (200) - **result** (array) - An array of chain objects, each containing chain details. ``` ```APIDOC ## POST /v2 (method: stats.global) ### Description Retrieves global protocol statistics. ### Method POST ### Endpoint /v2 ### Parameters #### Request Body - **method** (string) - Must be "stats.global". ### Request Example ```json { "jsonrpc": "2.0", "method": "stats.global", "id": 1 } ``` ### Response #### Success Response (200) - **result** (object) - An object containing global protocol statistics. ``` -------------------------------- ### AWPRegistry initialAlphaPrice Function Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-worknet.md View function on AWPRegistry to determine the initial cost for LP token calculation. The result is used in conjunction with INITIAL_ALPHA_MINT to compute the LP cost. ```solidity function initialAlphaPrice() view returns (uint256) // on AWPRegistry // INITIAL_ALPHA_MINT = 100,000,000 x 10^18 // lpCost = INITIAL_ALPHA_MINT x initialAlphaPrice / 10^18 // Currently: 100,000,000 x 0.001 = 100,000 AWP ``` -------------------------------- ### Get AWP Token Info (Aggregated) Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-governance.md JSON-RPC method to retrieve aggregated AWP token information across all chains. ```json {"jsonrpc": "2.0", "method": "tokens.getAWPGlobal", "params": {}, "id": 1} ``` -------------------------------- ### Register Worknet Function Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-worknet.md Step 2 for registering a worknet: Calls the registerWorknet function on AWPRegistry. This function takes WorknetParams and costs 100,000 AWP. If params.worknetManager is address(0), a proxy is auto-deployed. ```solidity // Step 2: Register worknet (after approve receipt) function registerWorknet(WorknetParams params) returns (uint256 worknetId) // on AWPRegistry // params.salt = bytes32(0) uses worknetId as CREATE2 salt // params.worknetManager = address(0) auto-deploys WorknetManager proxy // Costs 100,000 AWP (initialAlphaMint x initialAlphaPrice) ``` -------------------------------- ### Create Governance Proposal Source: https://github.com/awp-core/awp-skill/blob/main/README.md Allows the creation of governance proposals, which can be executable via Timelock or signal-only. This action requires a wallet and veAWP positions. ```bash G1 ``` -------------------------------- ### Discovery and WebSocket Source: https://github.com/awp-core/awp-skill/blob/main/SKILL.md API discovery can be performed via a GET request, and real-time events can be subscribed to using the provided WebSocket endpoint. ```http GET https://api.awp.sh/v2 ``` ```http wss://api.awp.sh/ws/live ``` -------------------------------- ### Register Worknet (Gasless) Source: https://context7.com/awp-core/awp-skill/llms.txt Register a new worknet using gasless relay. This operation costs approximately 1,000,000 AWP, paid via permit. Requires name, symbol, and skills URI. ```bash python3 scripts/relay-register-worknet.py \ --name "MyWorknet" \ --symbol "MWRK" \ --skills-uri "ipfs://QmSkillsHash" ``` -------------------------------- ### governance.listProposals - List DAO Proposals Source: https://context7.com/awp-core/awp-skill/llms.txt Returns a paginated list of governance proposals, with optional status filtering. ```bash curl -s -X POST https://api.awp.sh/v2 \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"governance.listProposals","params":{"status":"Active","chainId":8453,"page":1,"limit":20},"id":1}' ``` -------------------------------- ### GET /api/relay/status/{txHash} Source: https://github.com/awp-core/awp-skill/blob/main/references/commands-staking.md Retrieves the status of a relay transaction using its transaction hash. This endpoint is useful for monitoring the progress and outcome of gasless operations. ```APIDOC ## GET /api/relay/status/{txHash} ### Description Retrieves the status of a relay transaction using its transaction hash. This endpoint allows monitoring of gasless operations. ### Method GET ### Endpoint /api/relay/status/{txHash} ### Parameters #### Path Parameters - **txHash** (string) - Required - The transaction hash of the relay operation to check. ### Response #### Success Response (200) - **status** (string) - The status of the transaction (e.g., pending, success, failed). - **result** (object) - Additional details about the transaction result, if available. #### Response Example ```json { "status": "success", "result": { "blockHash": "0x...", "blockNumber": 12345, "transactionIndex": 0, "from": "0xSender...", "to": "0xRecipient...", "gasUsed": 21000, "logs": [] } } ``` ```