All skills

Guide for writing TypeScript code with AlgoKit Utils (`@algorandfoundation/algokit-utils`). Use this skill whenever the user is building on Algorand with TypeScript — client setup, account management, payments, asset operations, atomic transaction groups, smart contract deployment and interaction (AppFactory, AppClient, ARC-56/ARC-32 specs), raw app calls, key registration, network management, testing with algorandFixture, error handling, and the low-level crypto primitives under `@algorandfoundation/algokit-utils/crypto` (Ed25519 keygen/signing/verification, SHA-512/256 `hash`, Peikert xHD BIP44 wallets, wrapped-secret patterns). Trigger on imports from `@algorandfoundation/algokit-utils` (incl. `/crypto`, `/testing`, `/transact` subpaths), references to `AlgorandClient`, `AppFactory`, `AppClient`, `AlgoAmount`, `algorandFixture`, `ed25519Generator`, `peikertXHdWalletGenerator`, `hash`, `WrappedEd25519Seed`, or `RawEd25519Signer`. Also on any TypeScript or JavaScript code that builds on Algorand.

Use this Skill: https://skilld.dev/gh/algorand-devrel/algorand-agent-skills/algokit-utils-ts

This session only. Nothing lands on disk.

referencespayment-transactions.md

≈818 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Payment transactions

Send a simple payment

Transfer Algo from one account to another.

import { AlgorandClient } from "@algorandfoundation/algokit-utils";

const algorand = AlgorandClient.defaultLocalNet();

const sender = algorand.account.random();
const receiver = algorand.account.random();

const result = await algorand.send.payment({
  sender: sender.addr,
  receiver: receiver.addr,
  amount: (1).algo(),
});

console.log(`Transaction ID: ${result.txIds[0]}`);

What just happened? algorand.send.payment() built, signed, and submitted a payment transaction that transfers 1 Algo from sender to receiver. The returned result contains the transaction ID and the confirmation details.

Create an unsigned payment

Build a payment transaction without signing or sending it.

const txn = await algorand.createTransaction.payment({
  sender: sender.addr,
  receiver: receiver.addr,
  amount: (2).algo(),
});

console.log(`Unsigned transaction type: ${txn.type}`);

What just happened? algorand.createTransaction.payment() returned a raw Transaction object you can inspect, serialize, or sign manually. Nothing was sent to the network.

Send a payment with a note

Attach arbitrary data to a payment using the note field.

const result = await algorand.send.payment({
  sender: sender.addr,
  receiver: receiver.addr,
  amount: (0.5).algo(),
  note: "Hello from AlgoKit!",
});

What just happened? The note field accepts a string or Uint8Array (max 1 000 bytes). The note is stored on-chain and visible to anyone inspecting the transaction.

Send a payment with a lease

Prevent duplicate transactions within a validity window using a lease.

const result = await algorand.send.payment({
  sender: sender.addr,
  receiver: receiver.addr,
  amount: (1).algo(),
  lease: "unique-invoice-001",
});

What just happened? The lease field ensures that only one transaction with this lease value from the same sender can be confirmed within the validity window. This is useful for preventing accidental double-payments.

Send a payment with explicit fee control

Override the suggested fee or cap the maximum fee you are willing to pay.

// Set a static fee (replaces the suggested fee entirely)
const result1 = await algorand.send.payment({
  sender: sender.addr,
  receiver: receiver.addr,
  amount: (1).algo(),
  staticFee: (2000).microAlgo(),
});

// Add an extra fee on top of the suggested fee (useful for covering inner txn fees)
const result2 = await algorand.send.payment({
  sender: sender.addr,
  receiver: receiver.addr,
  amount: (1).algo(),
  extraFee: (1000).microAlgo(),
});

// Cap the fee to prevent overspending during congestion
const result3 = await algorand.send.payment({
  sender: sender.addr,
  receiver: receiver.addr,
  amount: (1).algo(),
  maxFee: (3000).microAlgo(),
});

What just happened? staticFee sets an exact fee, extraFee adds to the network-suggested fee (handy when your outer transaction must cover fees for inner transactions), and maxFee throws an error if the calculated fee exceeds the specified cap — protecting you from overspending during high-congestion periods.

Source: SKILL.md on GitHub

1 alert1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides a comprehensive guide for using the AlgoKit Utils TypeScript library. It follows security best practices, such as recommending environment variables for secrets, and uses standard testing mnemonics and placeholder domains in its code examples. No malicious patterns or security risks were detected.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: HIGH · 2 issues

Signed by skilld at 4235fb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 6 months ago

README badge

README badge for algorand-devrel/algorand-agent-skills/algokit-utils-ts