@goplausible/openclaw-algorand-plugin 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,13 +31,19 @@ mcporter call algorand-mcp.get_account_info address=XXXXX network=testnet
|
|
|
31
31
|
mcporter call algorand-mcp.search_assets name=USDC network=mainnet
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- `
|
|
37
|
-
- `
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
34
|
+
## MCP Tool Categories (101 tools)
|
|
35
|
+
|
|
36
|
+
- **Wallet** (10) — `wallet_add_account`, `wallet_remove_account`, `wallet_list_accounts`, `wallet_switch_account`, `wallet_get_info`, `wallet_get_assets`, `wallet_sign_transaction`, `wallet_sign_transaction_group`, `wallet_sign_data`, `wallet_optin_asset`
|
|
37
|
+
- **Account Management** (8) — `create_account`, `rekey_account`, `mnemonic_to_mdk`, `mdk_to_mnemonic`, `secret_key_to_mnemonic`, `mnemonic_to_secret_key`, `seed_from_mnemonic`, `mnemonic_from_seed`
|
|
38
|
+
- **Utility** (13) — `ping`, `validate_address`, `encode_address`, `decode_address`, `get_application_address`, `bytes_to_bigint`, `bigint_to_bytes`, `encode_uint64`, `decode_uint64`, `verify_bytes`, `sign_bytes`, `encode_obj`, `decode_obj`
|
|
39
|
+
- **Transaction** (18) — `make_payment_txn`, `make_keyreg_txn`, `make_asset_create_txn`, `make_asset_config_txn`, `make_asset_destroy_txn`, `make_asset_freeze_txn`, `make_asset_transfer_txn`, `make_app_create_txn`, `make_app_update_txn`, `make_app_delete_txn`, `make_app_optin_txn`, `make_app_closeout_txn`, `make_app_clear_txn`, `make_app_call_txn`, `assign_group_id`, `sign_transaction`, `encode_unsigned_transaction`, `decode_signed_transaction`
|
|
40
|
+
- **Algod** (5) — `compile_teal`, `disassemble_teal`, `send_raw_transaction`, `simulate_raw_transactions`, `simulate_transactions`
|
|
41
|
+
- **Algod API** (13) — `api_algod_get_account_info`, `api_algod_get_account_application_info`, `api_algod_get_account_asset_info`, `api_algod_get_application_by_id`, `api_algod_get_application_box`, `api_algod_get_application_boxes`, `api_algod_get_asset_by_id`, `api_algod_get_pending_transaction`, `api_algod_get_pending_transactions_by_address`, `api_algod_get_pending_transactions`, `api_algod_get_transaction_params`, `api_algod_get_node_status`, `api_algod_get_node_status_after_block`
|
|
42
|
+
- **Indexer API** (17) — `api_indexer_lookup_account_by_id`, `api_indexer_lookup_account_assets`, `api_indexer_lookup_account_app_local_states`, `api_indexer_lookup_account_created_applications`, `api_indexer_search_for_accounts`, `api_indexer_lookup_applications`, `api_indexer_lookup_application_logs`, `api_indexer_search_for_applications`, `api_indexer_lookup_application_box`, `api_indexer_lookup_application_boxes`, `api_indexer_lookup_asset_by_id`, `api_indexer_lookup_asset_balances`, `api_indexer_lookup_asset_transactions`, `api_indexer_search_for_assets`, `api_indexer_lookup_transaction_by_id`, `api_indexer_lookup_account_transactions`, `api_indexer_search_for_transactions`
|
|
43
|
+
- **NFDomains** (6) — `api_nfd_get_nfd`, `api_nfd_get_nfds_for_addresses`, `api_nfd_get_nfd_activity`, `api_nfd_get_nfd_analytics`, `api_nfd_browse_nfds`, `api_nfd_search_nfds`
|
|
44
|
+
- **Tinyman AMM** (9) — `api_tinyman_get_pool`, `api_tinyman_get_pool_analytics`, `api_tinyman_get_pool_creation_quote`, `api_tinyman_get_liquidity_quote`, `api_tinyman_get_remove_liquidity_quote`, `api_tinyman_get_swap_quote`, `api_tinyman_get_asset_optin_quote`, `api_tinyman_get_validator_optin_quote`, `api_tinyman_get_validator_optout_quote`
|
|
45
|
+
- **ARC-26 URI** (1) — `generate_algorand_uri`
|
|
46
|
+
- **Knowledge** (1) — `get_knowledge_doc` (categories: `arcs`, `sdks`, `algokit`, `algokit-utils`, `tealscript`, `puya`, `liquid-auth`, `python`, `developers`, `clis`, `nodes`, `details`)
|
|
41
47
|
|
|
42
48
|
## Key things to remember
|
|
43
49
|
|
|
@@ -47,6 +53,7 @@ mcporter call algorand-mcp.search_assets name=USDC network=mainnet
|
|
|
47
53
|
- Default to testnet during development
|
|
48
54
|
- Every transaction costs 0.001 ALGO minimum
|
|
49
55
|
- Account needs 0.1 ALGO base + 0.1 per asset/app opt-in (MBR)
|
|
56
|
+
- **CRITICAL — x402 Base64 blob handling**: When constructing the `paymentHeader` JSON for `x402_fetch`, NEVER manually re-type or partially copy base64 blob strings. Use the EXACT `bytes` value from `encode_unsigned_transaction` and the EXACT `blob` value from `wallet_sign_transaction` — copy each value in full. Even a single character corruption (e.g., `5` → `4`) causes "signature does not match sender" errors and the payment will be rejected.
|
|
50
57
|
|
|
51
58
|
## Common Mainnet Assets
|
|
52
59
|
|
package/package.json
CHANGED
|
@@ -181,6 +181,8 @@ When `x402_fetch` returns HTTP 402 with `PaymentRequirements`, use the atomic gr
|
|
|
181
181
|
|
|
182
182
|
**Critical**: The `accepted` field is REQUIRED. It must be an exact copy of the `accepts[]` entry you chose to pay with (including all fields: scheme, network, price, payTo, asset, maxAmountRequired, extra, etc.). Without it, the server cannot match your payment and will reject with 402.
|
|
183
183
|
|
|
184
|
+
**Critical — Base64 blob handling**: When constructing the `paymentHeader` JSON string for `x402_fetch`, NEVER manually re-type or partially copy base64 blob strings. Use the EXACT `bytes` value from `encode_unsigned_transaction` and the EXACT `blob` value from `wallet_sign_transaction` — copy each complete value verbatim into the `paymentGroup` array. Even a single character corruption (e.g., `5` → `4`) causes "signature does not match sender" errors and the payment will be rejected.
|
|
185
|
+
|
|
184
186
|
Map CAIP-2 network identifiers from `accepts[].network` to `testnet` or `mainnet`.
|
|
185
187
|
|
|
186
188
|
See [references/examples-algorand-mcp.md](references/examples-algorand-mcp.md) for the full step-by-step workflow.
|
|
@@ -638,6 +638,8 @@ Build this JSON string:
|
|
|
638
638
|
|
|
639
639
|
> **Critical**: The `accepted` field is REQUIRED. It must be an exact copy of the `accepts[]` entry you chose (including all fields: scheme, network, price, payTo, asset, maxAmountRequired, extra, etc.). Without it, the server cannot match your payment to a requirement and will reject with 402.
|
|
640
640
|
|
|
641
|
+
> **CRITICAL — Base64 blob handling**: When building the `paymentGroup` array, you MUST use the EXACT `bytes` value from `encode_unsigned_transaction` and the EXACT `blob` value from `wallet_sign_transaction`. NEVER manually re-type, truncate, or partially copy these base64 strings. Even a single character corruption (e.g., `5` → `4`) causes "signature does not match sender" errors. Copy each complete blob verbatim — do not attempt to reconstruct or abbreviate them.
|
|
642
|
+
|
|
641
643
|
### Step 8: Retry with payment
|
|
642
644
|
|
|
643
645
|
Call `x402_fetch` again with `paymentHeader` set to the JSON string from Step 7.
|
|
@@ -645,3 +647,12 @@ The `x402_fetch` tool will base64-encode it and send it as the `PAYMENT-SIGNATUR
|
|
|
645
647
|
The server verifies the payment, submits the transaction group, and returns the resource.
|
|
646
648
|
|
|
647
649
|
> **Important**: The `paymentGroup` array order must match: index 0 = unsigned fee payer txn, index 1 = signed payment txn. The `paymentIndex` indicates which transaction carries the actual payment.
|
|
650
|
+
|
|
651
|
+
### Common x402 Errors
|
|
652
|
+
|
|
653
|
+
| Error | Cause | Solution |
|
|
654
|
+
|-------|-------|---------|
|
|
655
|
+
| `Payment transaction signature does not match sender` | Base64 blob was corrupted when constructing `paymentHeader` JSON | Use EXACT `bytes`/`blob` values from tool responses — never re-type or partially copy base64 strings |
|
|
656
|
+
| `402` returned despite payment header | Missing `accepted` field in payload, or `accepted` doesn't match an `accepts[]` entry exactly | Copy the chosen `accepts[]` entry verbatim into the `accepted` field |
|
|
657
|
+
| `402` with expired transactions | Too much time between building transactions and sending payment | Rebuild transactions immediately before sending — `firstValid`/`lastValid` window is ~1000 rounds |
|
|
658
|
+
| `Simulation failed` | Insufficient balance, asset not opted in, or group structure wrong | Check USDC/ALGO balance, verify opt-in, ensure group order is [feePayer, payment] |
|