use-algokit-utils
3
总安装量
2
周安装量
#62010
全站排名
安装命令
npx skills add https://github.com/algorand-devrel/algorand-agent-skills --skill use-algokit-utils
Agent 安装分布
claude-code
2
crush
1
opencode
1
github-copilot
1
antigravity
1
Skill 文档
AlgoKit Utils
Use AlgoKit Utils to interact with the Algorand blockchain from TypeScript or Python applications.
Overview / Core Workflow
- Create an
AlgorandClientinstance - Get or create accounts for signing
- Send transactions using
algorand.send.*methods - Or compose groups using
algorand.newGroup()
How to proceed
-
Initialize AlgorandClient:
TypeScript:
import { AlgorandClient } from '@algorandfoundation/algokit-utils' const algorand = AlgorandClient.fromEnvironment() // Or: AlgorandClient.defaultLocalNet() // Or: AlgorandClient.testNet() // Or: AlgorandClient.mainNet()Python:
from algokit_utils import AlgorandClient algorand = AlgorandClient.from_environment() # Or: AlgorandClient.default_localnet() # Or: AlgorandClient.testnet() # Or: AlgorandClient.mainnet() -
Get accounts:
TypeScript:
const account = await algorand.account.fromEnvironment('DEPLOYER')Python:
account = algorand.account.from_environment("DEPLOYER") -
Send transactions:
TypeScript:
await algorand.send.payment({ sender: account.addr, receiver: 'RECEIVERADDRESS', amount: algo(1), })Python:
algorand.send.payment(PaymentParams( sender=account.address, receiver="RECEIVERADDRESS", amount=AlgoAmount(algo=1), ))
Important Rules / Guidelines
- Use AlgorandClient â It’s the main entry point; avoid deprecated function-based APIs
- Default to fromEnvironment() â Works locally and in production via env vars
- Register signers â Use
algorand.accountto get accounts; signers are auto-registered - Use algo() helper â For TypeScript, use
algo(1)instead of raw microAlgos
Common Variations / Edge Cases
| Scenario | Approach |
|---|---|
| LocalNet development | AlgorandClient.defaultLocalNet() |
| TestNet/MainNet | AlgorandClient.testNet() or .mainNet() |
| Custom node | AlgorandClient.fromConfig({ algodConfig: {...} }) |
| Deploy contract | Use typed app client factory (see app-client docs) |
| Transaction groups | algorand.newGroup().addPayment(...).addAssetOptIn(...).send() |
References / Further Reading
Language-specific references are organized in subfolders:
- TypeScript (
references/typescript/): AlgorandClient - Python (
references/python/): AlgorandClient
External documentation: