Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ out/


examples/debug-out/
examples/**/data/
51 changes: 51 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Contributing to Algorand TypeScript Testing

Contributions are welcome. For new features, please open an issue to discuss first.

## Workflow

We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary). User-facing changes should include at least one `fix:` or `feat:` commit for release notes. Other conventions like `docs:` or `test:` are optional but helpful.

## Local Development

To set up the project locally:

1. **Install Node.js**: Download from [nodejs.org](https://nodejs.org/).

1. **Install Python 3.12+**.

1. **Install Puya**:

```sh
pipx install puyapy --python 3.12.6
```

1. **Install AlgoKit CLI**: Follow the guide from [Algokit](https://github.com/algorandfoundation/algokit-cli?tab=readme-ov-file#install).

1. **Start localnet**:

```sh
algokit localnet start
# or `algokit localnet reset --update` to update localnet docker images
```

1. **Install npm dependencies**:

```sh
npm install
```

1. **Run tests**:
```sh
npm test
```

## Common Commands

Here are some common commands you will use with npm:

- **Generate API reference documentation** `npm run script:documentation`
- **Fix linting errors** `npm run lint:fix`
- **Build a distribution locally** `npm run build`
- **Compile all contracts used by tests for debugging** `npm run script:refresh-test-artifacts`
- **Compile all example contracts for debugging** `npm run script:compile-examples`
11 changes: 11 additions & 0 deletions docs/algots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Algorand TypeScript

Algorand TypeScript is a partial implementation of the TypeScript programming language that runs on the Algorand Virtual Machine (AVM). It includes a statically typed framework for development of Algorand smart contracts and logic signatures, with TypeScript interfaces to underlying AVM functionality that works with standard TypeScript tooling.

It maintains the syntax and semantics of TypeScript such that a developer who knows TypeScript can make safe assumptions
about the behaviour of the compiled code when running on the AVM. Algorand TypeScript is also executable TypeScript that can be run
and debugged on a Node.js virtual machine with transpilation to EcmaScript and run from automated tests.

Algorand TypeScript is compiled for execution on the AVM by PuyaTs, a TypeScript frontend for the [Puya](https://github.com/algorandfoundation/puya) optimising compiler that ensures the resulting AVM bytecode execution semantics that match the given TypeScript code. PuyaTs produces output that is directly compatible with AlgoKit typed clients to make deployment and calling easy.

[Documentation](https://github.com/algorandfoundation/puya/blob/main/README.md)
29 changes: 29 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# API Reference

An overview of the `algorand-typescript-testing` package - covering the main classes and functions.

```{hint}
Spotted a typo in documentation? This project is open source, please submit an issue or a PR on [GitHub](https://github.com/algorandfoundation/algorand-typescript-testing).
```

## Contexts

- [TestExecutionContext](./code/index/classes/TestExecutionContext.md)
- [ContractContext](./code/subcontexts/contract-context/classes/ContractContext.md)
- [LedgerContext](./code/subcontexts/ledger-context/classes/LedgerContext.md)
- [TransactionContext](./code/subcontexts/transaction-context/classes/TransactionContext.md)

## Value Generators

- [AvmValueGenerator](./code/value-generators/avm/classes/AvmValueGenerator.md)
- [Arc4ValueGenerator](./code/value-generators/arc4/classes/Arc4ValueGenerator.md)
- [TxnValueGenerator](./code/value-generators/txn/classes/TxnValueGenerator.md)

## Utils

- [addEqualityTesters](./code/index/functions/addEqualityTesters.md)
- [encodingUtils](./code/index/variables/encodingUtil.md)

## Reference documentation

We also have [auto-generated reference documentation for the code](./code/README.md).
16 changes: 16 additions & 0 deletions docs/code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
**@algorandfoundation/algorand-typescript-testing**

***

# @algorandfoundation/algorand-typescript-testing

## Modules

- [index](index/README.md)
- [subcontexts/contract-context](subcontexts/contract-context/README.md)
- [subcontexts/ledger-context](subcontexts/ledger-context/README.md)
- [subcontexts/transaction-context](subcontexts/transaction-context/README.md)
- [value-generators](value-generators/README.md)
- [value-generators/arc4](value-generators/arc4/README.md)
- [value-generators/avm](value-generators/avm/README.md)
- [value-generators/txn](value-generators/txn/README.md)
19 changes: 19 additions & 0 deletions docs/code/index/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[**@algorandfoundation/algorand-typescript-testing**](../README.md)

***

[@algorandfoundation/algorand-typescript-testing](../README.md) / index

# index

## Classes

- [TestExecutionContext](classes/TestExecutionContext.md)

## Variables

- [encodingUtil](variables/encodingUtil.md)

## Functions

- [addEqualityTesters](functions/addEqualityTesters.md)
Loading