Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,8 @@ __pycache__/
env/
venv/
ENV/

.references/

# Polytest (temporary files until polytest branch merged to main)
.polytest_algokit-polytest/
1 change: 1 addition & 0 deletions MIGRATION-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ A collection of random notes pop up during the migration process.
- SourceMap was renamed to ProgramSourceMap
- OnApplicationComplete.UpdateApplicationOC was renamed to OnApplicationComplete.UpdateApplication
- ResourceReference (algod) vs AccessReference (utils)
- trace field at err.traces[].trace is now a typed value, rather than a map.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AlgoKit TypeScript Utilities
ee# 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](https://github.com/algorandfoundation/algokit-cli).

Expand Down
58 changes: 46 additions & 12 deletions algokit-configs/openapi-converter/specs/algod.oas3.json
Original file line number Diff line number Diff line change
Expand Up @@ -4054,9 +4054,7 @@
"description": "base64 encoded program bytes"
},
"sourcemap": {
"type": "object",
"properties": {},
"description": "JSON of the source map"
"$ref": "#/components/schemas/SourceMap"
}
}
}
Expand Down Expand Up @@ -4695,8 +4693,7 @@
"id",
"network",
"proto",
"rwd",
"timestamp"
"rwd"
],
"type": "object",
"properties": {
Expand Down Expand Up @@ -4776,7 +4773,8 @@
"properties": {
"address": {
"type": "string",
"description": "the account public key"
"description": "the account public key",
"x-algorand-format": "Address"
},
"amount": {
"type": "integer",
Expand Down Expand Up @@ -4994,6 +4992,7 @@
"type": "integer",
"description": "unique asset identifier",
"x-go-type": "basics.AssetIndex",
"x-algokit-field-rename": "id",
"x-algokit-bigint": true
},
"params": {
Expand Down Expand Up @@ -5316,7 +5315,8 @@
"bytes": {
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"type": "string",
"description": "bytes value."
"description": "bytes value.",
"format": "byte"
},
"uint": {
"type": "integer",
Expand Down Expand Up @@ -5360,7 +5360,8 @@
"type": "object",
"properties": {
"address": {
"type": "string"
"type": "string",
"x-algorand-format": "Address"
},
"delta": {
"$ref": "#/components/schemas/StateDelta"
Expand Down Expand Up @@ -5398,7 +5399,9 @@
},
"bytes": {
"type": "string",
"description": "\\[bs\\] bytes value."
"description": "\\[bs\\] bytes value.",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"format": "byte"
},
"uint": {
"type": "integer",
Expand Down Expand Up @@ -6551,6 +6554,39 @@
}
},
"description": "Proof of transaction in a block."
},
"SourceMap": {
"type": "object",
"required": [
"version",
"sources",
"names",
"mappings"
],
"properties": {
"version": {
"type": "integer"
},
"sources": {
"description": "A list of original sources used by the \"mappings\" entry.",
"type": "array",
"items": {
"type": "string"
}
},
"names": {
"description": "A list of symbol names used by the \"mappings\" entry.",
"type": "array",
"items": {
"type": "string"
}
},
"mappings": {
"description": "A string with the encoded mapping data.",
"type": "string"
}
},
"description": "Source map for the program"
}
},
"responses": {
Expand Down Expand Up @@ -7333,9 +7369,7 @@
"description": "base64 encoded program bytes"
},
"sourcemap": {
"type": "object",
"properties": {},
"description": "JSON of the source map"
"$ref": "#/components/schemas/SourceMap"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion algokit-configs/openapi-converter/specs/indexer.oas3.json
Original file line number Diff line number Diff line change
Expand Up @@ -3587,6 +3587,7 @@
"index": {
"type": "integer",
"description": "unique asset identifier",
"x-algokit-field-rename": "id",
"x-algokit-bigint": true
},
"deleted": {
Expand Down Expand Up @@ -4982,7 +4983,7 @@
},
"merkle-array-index": {
"type": "integer",
"x-algorand-foramt": "uint64"
"x-algorand-format": "uint64"
},
"proof": {
"$ref": "#/components/schemas/MerkleArrayProof"
Expand Down
2 changes: 1 addition & 1 deletion algokit-configs/openapi-converter/specs/kmd.oas3.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
"post": {
"summary": "List multisig accounts",
"description": "Lists all of the multisig accounts whose preimages this wallet stores",
"operationId": "ListMultisg",
"operationId": "ListMultisig",
"requestBody": {
"content": {
"application/json": {
Expand Down
10 changes: 8 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import eslint from '@eslint/js'
import prettier from 'eslint-config-prettier'
import unusedImports from 'eslint-plugin-unused-imports'
import tseslint from 'typescript-eslint'

export default tseslint.config(
Expand All @@ -20,6 +21,9 @@ export default tseslint.config(
tseslint.configs.recommended,
{
files: ['**/*.ts'],
plugins: {
'unused-imports': unusedImports,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
Expand All @@ -30,8 +34,10 @@ export default tseslint.config(
},
rules: {
'no-console': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
'@typescript-eslint/no-unused-vars': 'off', // Disable base rule as it's covered by unused-imports
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{ ignoreRestSiblings: true, argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/no-unused-expressions': 'off',
Expand Down
1 change: 1 addition & 0 deletions oas-generator/src/oas_generator/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ class HttpMethod(StrEnum):
X_ALGOKIT_BIGINT: Final[str] = "x-algokit-bigint"
X_ALGOKIT_SIGNED_TXN: Final[str] = "x-algokit-signed-txn"
X_ALGOKIT_BYTES_BASE64: Final[str] = "x-algokit-bytes-base64"
X_ALGORAND_FORMAT: Final[str] = "x-algorand-format"

# Template configuration
TEMPLATE_TRIM_BLOCKS: Final[bool] = True
Expand Down
Loading