@algorandfoundation/algokit-utils
TypeScript icon, indicating that this package has built-in type declarations

8.0.3 • Public • Published

AlgoKit TypeScript Utilities

A set of core Algorand utilities written in TypeScript and released via npm that make it easier to build solutions on Algorand. This project is part of AlgoKit.

The goal of this library is to provide intuitive, productive utility functions that make it easier, quicker and safer to build applications on Algorand. Largely these functions wrap the underlying Algorand SDK, but provide a higher level interface with sensible defaults and capabilities for common tasks.

Note: If you prefer Python there's an equivalent Python utility library.

Install | Documentation

Install

Before installing, you'll need to decide on the version you want to target. Version 7 and 8 have the same feature set, however v7 leverages algosdk@>=2.9.0<3.0, whereas v8 leverages algosdk@>=3.0.0. Your project and it's dependencies will help you decide which version to target.

Once you've decided on the target version, this library can be installed from NPM using your favourite npm client, e.g.:

To target algosdk@2 and use version 7 of AlgoKit Utils, run the below:

npm install algosdk@^2.9.0 @algorandfoundation/algokit-utils@^7.0.0

To target algosdk@3 and use the latest version of AlgoKit Utils, run the below:

npm install algosdk@^3.0.0 @algorandfoundation/algokit-utils

Now you can import the library:

import { AlgorandClient, Config } from '@algorandfoundation/algokit-utils'

See usage for more details.

Migration

Whilst we aim to minimise breaking changes, there are situations where they are required. JSDoc deprecations should guide you through most migration paths inside your IDE, however the migration guides will provide more detailed information should you need it.

If you're targetting v7, please refer to the v7 migration guide. If you're targetting v8, please refer to the v8 migration guide.

Guiding principles

This library follows the Guiding Principles of AlgoKit.

Contributing

This is an open source project managed by the Algorand Foundation. See the AlgoKit contributing page to learn about making improvements.

To successfully run the tests in this repository you need to be running LocalNet via AlgoKit and also have package dependencies and .env.template copied to .env (both of which algokit bootstrap all can do for you):

algokit bootstrap all
algokit localnet start

To run tests you can use VS Code, or:

npm run test

Readme

Keywords

none

Package Sidebar

Install

npm i @algorandfoundation/algokit-utils

Weekly Downloads

1,441

Version

8.0.3

License

MIT

Unpacked Size

3.36 MB

Total Files

340

Last publish

Collaborators

  • bruno.martins.algorand.foundation
  • dev_algorand.foundation
  • shane-at-algo
  • loedn
  • hmd2v
  • joe-p