diff --git a/algorandfoundation-algokit-utils-0.1.0.tgz b/algorandfoundation-algokit-utils-0.1.0.tgz deleted file mode 100644 index 0eeb399..0000000 Binary files a/algorandfoundation-algokit-utils-0.1.0.tgz and /dev/null differ diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 0f9bf4a..0000000 --- a/docs/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# AlgoKit TypeScript AVM Debugging Utilities - -Debugging utilities can be used to simplify gathering artifacts to be used with [AlgoKit AVM Debugger](https://github.com/algorandfoundation/algokit-avm-vscode-debugger). - -## Install - -This library can be installed from NPM using your favourite npm client, e.g.: - -``` -npm install @algorandfoundation/algokit-utils-debug -``` - -Then to import it and activate `utils-ts` debugging: - -```typescript -import { Config } from '@algorandfoundation/algokit-utils' -import { registerDebugHandlers } from '@algorandfoundation/algokit-utils-debug' - -Config.configure({ - debug: true, - traceAll: true, // optional, defaults to ignoring simulate on successfull transactions. -}) -registerDebugHandlers() // must be called before any transactions are submitted. -``` - -## - -The following methods are provided: - -- `persistSourceMaps`: This method persists the sourcemaps for the given sources as AlgoKit AVM Debugger compliant artifacts. It accepts an array of `PersistSourceMapInput` objects. Each object can either contain `rawTeal`, in which case the function will execute a compile to obtain byte code, or it can accept an object of type `CompiledTeal` provided by algokit, which is used for source codes that have already been compiled and contain the traces. It also accepts the root directory of the project, an `Algodv2` client to perform the compilation, and a boolean indicating whether to include the source files in the output. -- `simulateAndPersistResponse`: This method simulates the atomic transactions using the provided `AtomicTransactionComposer` object and `Algodv2` object, and persists the simulation response to an AlgoKit AVM Debugger compliant JSON file. It accepts the `AtomicTransactionComposer` with transaction(s) loaded, an `Algodv2` client to perform the simulation, the root directory of the project, and the buffer size in megabytes. - -To enable debug mode with extra trace persistence for AVM VSCode Debugger, you can configure it as follows: - -```ts -import { Config } from '@algorandfoundation/algokit-utils' -Config.configure({ - debug: true, - traceAll: true, // if ignored, will only trace failed atomic transactions and application client calls - projectRoot: '/path/to/project/root', // if ignored, will try to find the project root automatically by for 'ALGOKIT_PROJECT_ROOT' environment variable or checking filesystem recursively -}) -``` - -### Trace filename format - -The trace files are named in a specific format to provide useful information about the transactions they contain. The format is as follows: - -```ts -;`${timestamp}_lr${lastRound}_${transactionTypes}.trace.avm.json` -``` - -Where: - -- `timestamp`: The time when the trace file was created, in ISO 8601 format, with colons and periods removed. -- `lastRound`: The last round when the simulation was performed. -- `transactionTypes`: A string representing the types and counts of transactions in the atomic group. Each transaction type is represented as `${count}#${type}`, and different transaction types are separated by underscores. - -For example, a trace file might be named `20220301T123456Z_lr1000_2#pay_1#axfer.trace.avm.json`, indicating that the trace file was created at `2022-03-01T12:34:56Z`, the last round was `1000`, and the atomic group contained 2 payment transactions and 1 asset transfer transaction. diff --git a/package-lock.json b/package-lock.json index 3dcc774..03f764f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "buffer": "^6.0.3" }, "devDependencies": { - "@algorandfoundation/algokit-utils": "file:algorandfoundation-algokit-utils-0.1.0.tgz", + "@algorandfoundation/algokit-utils": "^7.0.0-beta.6", "@commitlint/cli": "^18.4.2", "@commitlint/config-conventional": "^17.7.0", "@makerx/eslint-config": "^3.1.0", @@ -51,14 +51,14 @@ "node": ">=18.0" }, "peerDependencies": { - "@algorandfoundation/algokit-utils": "file:algorandfoundation-algokit-utils-0.1.0.tgz", + "@algorandfoundation/algokit-utils": "^7.0.0-beta.6", "algosdk": "^2.7.0" } }, "node_modules/@algorandfoundation/algokit-utils": { - "version": "0.1.0", - "resolved": "file:algorandfoundation-algokit-utils-0.1.0.tgz", - "integrity": "sha512-qSJLGSVT3RQWULjIQNEMvgKrm6pkl8smDyuJfn5MbXTu2Ry6ZqGbiHgiIsiZxNQAJGLZSrd88HkR16Gyngw6Yw==", + "version": "7.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-7.0.0-beta.6.tgz", + "integrity": "sha512-PeAecyhLbvB1tfCAtcRAMTjCH/bgqDIGLKGt4T2xUFdetg+67nmTaB3+rzDVc/Emq4d/Z0I2d3pohel3Hkco3A==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index e30948b..6008d20 100644 --- a/package.json +++ b/package.json @@ -56,11 +56,11 @@ "buffer": "^6.0.3" }, "peerDependencies": { - "@algorandfoundation/algokit-utils": "file:algorandfoundation-algokit-utils-0.1.0.tgz", + "@algorandfoundation/algokit-utils": "^7.0.0-beta.6", "algosdk": "^2.7.0" }, "devDependencies": { - "@algorandfoundation/algokit-utils": "file:algorandfoundation-algokit-utils-0.1.0.tgz", + "@algorandfoundation/algokit-utils": "^7.0.0-beta.6", "@commitlint/cli": "^18.4.2", "@commitlint/config-conventional": "^17.7.0", "@makerx/eslint-config": "^3.1.0",