@algo-builder/runtime

Algo Builder Runtime

This package implements a light version of the go-algorand runtime. It allows to executes transactions and processes TEAL in JavaScript environment. The packages provides 4 main object:

  • Runtime: handles transaction or txn group processing and state management . User can use a Runtime object to set up accounts, create applications, opt-in to app, update app, etc...
  • AccountStore: user can create new accounts using a AccountStore object. All information about an account (apps, assets, localState, globalState etc..) is stored in AccountStore.
  • Parser: reads TEAL code and converts it to a list of opcodes which are executable by the interpreter. If a teal code contains an invalid opcode/data, parser will throw an error.
  • Interpreter: executes a list of opcodes returned by parser. Interpreter creates teal execution stack and interacts with runtime to perform changes related a TEAL code execution. At the end of execution, if the stack contains a single non-zero uint64 element then the teal code is approved, and transaction can be executed.

Important links

Usage

@algo-builder/runtime can be included as a library using yarn add @algo-builder/runtime and then import it using import * from '@algo-builder/runtime'.

Please read more about usage of runtime from here.

What we support now

runtime supports:

STATUS: production ready.

Contributing

Please read the main README.

Generated using TypeDoc