Repository: algorand/js-algorand-sdk
Pull request #516 (2022-02-11 08:38:43)

Docs for `lookupAssetByID` and `lookupAccountTransactions`
#### Changes
- [x] update typedoc to show grey background for code blocks
- [x] add docs to `lookupAssetByID`
- [x] add docs to `lookupAccountTransactions`

https://indexer-methods-docs--js-algosdk.netlify.app/classes/_internal_.lookupassetbyid
https://indexer-methods-docs--js-algosdk.netlify.app/classes/_internal_.lookupaccounttransactions


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 65bbef1..dd2feb0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,16 @@
+# v1.14.0-beta.1
+
+## Added
+
+- Add stateproof keyreg field (#463)
+
+## Changed
+
+- Implement C2C tests (#498)
+- Moving from travis to circleci (#507)
+- Add installation instructions for vite users (#512)
+- Update langspec for TEAL 6 (#518)
+
 # 1.13.1
 
 ## Added:
diff --git a/Makefile b/Makefile
index 0c06ec9..6ab1df4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 unit:
-	node_modules/.bin/cucumber-js --tags "@unit.offline or @unit.algod or @unit.indexer or @unit.rekey or @unit.tealsign or @unit.dryrun or @unit.applications or @unit.responses or @unit.transactions or @unit.transactions.payment or @unit.responses.231 or @unit.feetest or @unit.indexer.logs or @unit.abijson or @unit.atomic_transaction_composer" tests/cucumber/features --require-module ts-node/register --require tests/cucumber/steps/index.js
+	node_modules/.bin/cucumber-js --tags "@unit.offline or @unit.algod or @unit.indexer or @unit.rekey or @unit.tealsign or @unit.dryrun or @unit.applications or @unit.responses or @unit.transactions or @unit.transactions.keyreg or @unit.transactions.payment or @unit.responses.231 or @unit.feetest or @unit.indexer.logs or @unit.abijson or @unit.atomic_transaction_composer" tests/cucumber/features --require-module ts-node/register --require tests/cucumber/steps/index.js
 integration:
-	node_modules/.bin/cucumber-js --tags "@algod or @assets or @auction or @kmd or @send or @indexer or @rekey or @dryrun or @compile or @applications or @indexer.applications or @applications.verified or @indexer.231 or @abi or @c2c" tests/cucumber/features --require-module ts-node/register --require tests/cucumber/steps/index.js
+	node_modules/.bin/cucumber-js --tags "@algod or @assets or @auction or @kmd or @send or @indexer or @rekey or @send.keyregtxn or @dryrun or @compile or @applications or @indexer.applications or @applications.verified or @indexer.231 or @abi or @c2c" tests/cucumber/features --require-module ts-node/register --require tests/cucumber/steps/index.js
 
 docker-test:
 	./tests/cucumber/docker/run_docker.sh
diff --git a/README.md b/README.md
index d9e1ceb..aa97b9b 100644
--- a/README.md
+++ b/README.md
@@ -22,8 +22,8 @@ Include a minified browser bundle directly in your HTML like so:
 
 ```html
 <script
-  src="https://unpkg.com/algosdk@1.13.1/dist/browser/algosdk.min.js"
-  integrity="sha384-0BSEzBpLxqFWYBI+sOGhv3W91/wPf+jFwCiuXNrC52XZav2qb3Rz+pfq3AFI0CrL"
+  src="https://unpkg.com/algosdk@1.14.0-beta.1/dist/browser/algosdk.min.js"
+  integrity="sha384-GDxzwLVcHrypyA8CcFGLiOne9xqCWuLz9Bfay2fNICEkCuYBUvkC5g0bnY5aeoZC"
   crossorigin="anonymous"
 ></script>
 ```
@@ -32,8 +32,8 @@ or
 
 ```html
 <script
-  src="https://cdn.jsdelivr.net/npm/algosdk@1.13.1/dist/browser/algosdk.min.js"
-  integrity="sha384-0BSEzBpLxqFWYBI+sOGhv3W91/wPf+jFwCiuXNrC52XZav2qb3Rz+pfq3AFI0CrL"
+  src="https://cdn.jsdelivr.net/npm/algosdk@1.14.0-beta.1/dist/browser/algosdk.min.js"
+  integrity="sha384-GDxzwLVcHrypyA8CcFGLiOne9xqCWuLz9Bfay2fNICEkCuYBUvkC5g0bnY5aeoZC"
   crossorigin="anonymous"
 ></script>
 ```
diff --git a/package-lock.json b/package-lock.json
index 99f61d8..004501a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "algosdk",
-  "version": "1.13.1",
+  "version": "1.14.0-beta.1",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "algosdk",
-      "version": "1.13.1",
+      "version": "1.14.0-beta.1",
       "license": "MIT",
       "dependencies": {
         "algo-msgpack-with-bigint": "^2.1.1",
@@ -51,7 +51,7 @@
         "source-map-loader": "^2.0.2",
         "ts-loader": "^8.3.0",
         "ts-node": "^10.0.0",
-        "typedoc": "^0.22.10",
+        "typedoc": "^0.22.11",
         "typedoc-plugin-missing-exports": "^0.22.6",
         "typedoc-plugin-rename-defaults": "^0.4.0",
         "typescript": "^4.2.3",
@@ -4937,12 +4937,12 @@
       "dev": true
     },
     "node_modules/marked": {
-      "version": "3.0.8",
-      "resolved": "https://registry.npmjs.org/marked/-/marked-3.0.8.tgz",
-      "integrity": "sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==",
+      "version": "4.0.12",
+      "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz",
+      "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==",
       "dev": true,
       "bin": {
-        "marked": "bin/marked"
+        "marked": "bin/marked.js"
       },
       "engines": {
         "node": ">= 12"
@@ -6597,9 +6597,9 @@
       }
     },
     "node_modules/shiki": {
-      "version": "0.9.14",
-      "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.14.tgz",
-      "integrity": "sha512-uLHjjyJdNsMzF9GOF8vlOuZ8BwigiYPraMN5yjC826k8K7Xu90JQcC5GUNrzRibLgT2EOk9597I1IX+jRdA8nw==",
+      "version": "0.10.0",
+      "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.0.tgz",
+      "integrity": "sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA==",
       "dev": true,
       "dependencies": {
         "jsonc-parser": "^3.0.0",
@@ -7530,16 +7530,16 @@
       }
     },
     "node_modules/typedoc": {
-      "version": "0.22.10",
-      "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.10.tgz",
-      "integrity": "sha512-hQYZ4WtoMZ61wDC6w10kxA42+jclWngdmztNZsDvIz7BMJg7F2xnT+uYsUa7OluyKossdFj9E9Ye4QOZKTy8SA==",
+      "version": "0.22.11",
+      "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.11.tgz",
+      "integrity": "sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA==",
       "dev": true,
       "dependencies": {
         "glob": "^7.2.0",
         "lunr": "^2.3.9",
-        "marked": "^3.0.8",
+        "marked": "^4.0.10",
         "minimatch": "^3.0.4",
-        "shiki": "^0.9.12"
+        "shiki": "^0.10.0"
       },
       "bin": {
         "typedoc": "bin/typedoc"
@@ -12113,9 +12113,9 @@
       "dev": true
     },
     "marked": {
-      "version": "3.0.8",
-      "resolved": "https://registry.npmjs.org/marked/-/marked-3.0.8.tgz",
-      "integrity": "sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==",
+      "version": "4.0.12",
+      "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz",
+      "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==",
       "dev": true
     },
     "media-typer": {
@@ -13350,9 +13350,9 @@
       "dev": true
     },
     "shiki": {
-      "version": "0.9.14",
-      "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.14.tgz",
-      "integrity": "sha512-uLHjjyJdNsMzF9GOF8vlOuZ8BwigiYPraMN5yjC826k8K7Xu90JQcC5GUNrzRibLgT2EOk9597I1IX+jRdA8nw==",
+      "version": "0.10.0",
+      "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.0.tgz",
+      "integrity": "sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA==",
       "dev": true,
       "requires": {
         "jsonc-parser": "^3.0.0",
@@ -14074,16 +14074,16 @@
       }
     },
     "typedoc": {
-      "version": "0.22.10",
-      "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.10.tgz",
-      "integrity": "sha512-hQYZ4WtoMZ61wDC6w10kxA42+jclWngdmztNZsDvIz7BMJg7F2xnT+uYsUa7OluyKossdFj9E9Ye4QOZKTy8SA==",
+      "version": "0.22.11",
+      "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.11.tgz",
+      "integrity": "sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA==",
       "dev": true,
       "requires": {
         "glob": "^7.2.0",
         "lunr": "^2.3.9",
-        "marked": "^3.0.8",
+        "marked": "^4.0.10",
         "minimatch": "^3.0.4",
-        "shiki": "^0.9.12"
+        "shiki": "^0.10.0"
       },
       "dependencies": {
         "glob": {
diff --git a/package.json b/package.json
index 7d303ad..19811aa 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "algosdk",
-  "version": "1.13.1",
+  "version": "1.14.0-beta.1",
   "description": "The official JavaScript SDK for Algorand",
   "main": "dist/cjs/index.js",
   "module": "dist/esm/index.js",
@@ -59,7 +59,7 @@
     "source-map-loader": "^2.0.2",
     "ts-loader": "^8.3.0",
     "ts-node": "^10.0.0",
-    "typedoc": "^0.22.10",
+    "typedoc": "^0.22.11",
     "typedoc-plugin-missing-exports": "^0.22.6",
     "typedoc-plugin-rename-defaults": "^0.4.0",
     "typescript": "^4.2.3",
diff --git a/src/client/v2/algod/models/types.ts b/src/client/v2/algod/models/types.ts
index 7228d2e..018c4bb 100644
--- a/src/client/v2/algod/models/types.ts
+++ b/src/client/v2/algod/models/types.ts
@@ -28,6 +28,12 @@ export class Account extends BaseModel {
    */
   public amountWithoutPendingRewards: number | bigint;
 
+  /**
+   * MicroAlgo balance required by the account.
+   * The requirement grows based on asset and application usage.
+   */
+  public minBalance: number | bigint;
+
   /**
    * amount of MicroAlgos of pending rewards in this account.
    */
@@ -123,6 +129,8 @@ export class Account extends BaseModel {
    * @param address - the account public key
    * @param amount - (algo) total number of MicroAlgos in the account
    * @param amountWithoutPendingRewards - specifies the amount of MicroAlgos in the account, without the pending rewards.
+   * @param minBalance - MicroAlgo balance required by the account.
+   * The requirement grows based on asset and application usage.
    * @param pendingRewards - amount of MicroAlgos of pending rewards in this account.
    * @param rewards - (ern) total rewards of MicroAlgos the account has received, including pending
    * rewards.
@@ -162,6 +170,7 @@ export class Account extends BaseModel {
     address,
     amount,
     amountWithoutPendingRewards,
+    minBalance,
     pendingRewards,
     rewards,
     round,
@@ -180,6 +189,7 @@ export class Account extends BaseModel {
     address: string;
     amount: number | bigint;
     amountWithoutPendingRewards: number | bigint;
+    minBalance: number | bigint;
     pendingRewards: number | bigint;
     rewards: number | bigint;
     round: number | bigint;
@@ -199,6 +209,7 @@ export class Account extends BaseModel {
     this.address = address;
     this.amount = amount;
     this.amountWithoutPendingRewards = amountWithoutPendingRewards;
+    this.minBalance = minBalance;
     this.pendingRewards = pendingRewards;
     this.rewards = rewards;
     this.round = round;
@@ -218,6 +229,7 @@ export class Account extends BaseModel {
       address: 'address',
       amount: 'amount',
       amountWithoutPendingRewards: 'amount-without-pending-rewards',
+      minBalance: 'min-balance',
       pendingRewards: 'pending-rewards',
       rewards: 'rewards',
       round: 'round',
@@ -267,6 +279,11 @@ export class AccountParticipation extends BaseModel {
    */
   public voteParticipationKey: Uint8Array;
 
+  /**
+   * (stprf) Root of the state proof key (if any)
+   */
+  public stateProofKey?: Uint8Array;
+
   /**
    * Creates a new `AccountParticipation` object.
    * @param selectionParticipationKey - (sel) Selection public key (if any) currently registered for this round.
@@ -275,6 +292,7 @@ export class AccountParticipation extends BaseModel {
    * @param voteLastValid - (voteLst) Last round for which this participation is valid.
    * @param voteParticipationKey - (vote) root participation public key (if any) currently registered for this
    * round.
+   * @param stateProofKey - (stprf) Root of the state proof key (if any)
    */
   constructor({
     selectionParticipationKey,
@@ -282,12 +300,14 @@ export class AccountParticipation extends BaseModel {
     voteKeyDilution,
     voteLastValid,
     voteParticipationKey,
+    stateProofKey,
   }: {
     selectionParticipationKey: string | Uint8Array;
     voteFirstValid: number | bigint;
     voteKeyDilution: number | bigint;
     voteLastValid: number | bigint;
     voteParticipationKey: string | Uint8Array;
+    stateProofKey?: string | Uint8Array;
   }) {
     super();
     this.selectionParticipationKey =
@@ -301,6 +321,10 @@ export class AccountParticipation extends BaseModel {
       typeof voteParticipationKey === 'string'
         ? new Uint8Array(Buffer.from(voteParticipationKey, 'base64'))
         : voteParticipationKey;
+    this.stateProofKey =
+      typeof stateProofKey === 'string'
+        ? new Uint8Array(Buffer.from(stateProofKey, 'base64'))
+        : stateProofKey;
 
     this.attribute_map = {
       selectionParticipationKey: 'selection-participation-key',
@@ -308,6 +332,7 @@ export class AccountParticipation extends BaseModel {
       voteKeyDilution: 'vote-key-dilution',
       voteLastValid: 'vote-last-valid',
       voteParticipationKey: 'vote-participation-key',
+      stateProofKey: 'state-proof-key',
     };
   }
 }
@@ -1255,6 +1280,11 @@ export class DryrunTxnResult extends BaseModel {
 
   public localDeltas?: AccountStateDelta[];
 
+  /**
+   * Disassembled lsig program line by line.
+   */
+  public logicSigDisassembly?: string[];
+
   public logicSigMessages?: string[];
 
   public logicSigTrace?: DryrunState[];
@@ -1269,6 +1299,7 @@ export class DryrunTxnResult extends BaseModel {
    * @param cost - Execution cost of app call transaction
    * @param globalDelta - Application state delta.
    * @param localDeltas -
+   * @param logicSigDisassembly - Disassembled lsig program line by line.
    * @param logicSigMessages -
    * @param logicSigTrace -
    * @param logs -
@@ -1280,6 +1311,7 @@ export class DryrunTxnResult extends BaseModel {
     cost,
     globalDelta,
     localDeltas,
+    logicSigDisassembly,
     logicSigMessages,
     logicSigTrace,
     logs,
@@ -1290,6 +1322,7 @@ export class DryrunTxnResult extends BaseModel {
     cost?: number | bigint;
     globalDelta?: EvalDeltaKeyValue[];
     localDeltas?: AccountStateDelta[];
+    logicSigDisassembly?: string[];
     logicSigMessages?: string[];
     logicSigTrace?: DryrunState[];
     logs?: Uint8Array[];
@@ -1301,6 +1334,7 @@ export class DryrunTxnResult extends BaseModel {
     this.cost = cost;
     this.globalDelta = globalDelta;
     this.localDeltas = localDeltas;
+    this.logicSigDisassembly = logicSigDisassembly;
     this.logicSigMessages = logicSigMessages;
     this.logicSigTrace = logicSigTrace;
     this.logs = logs;
@@ -1312,6 +1346,7 @@ export class DryrunTxnResult extends BaseModel {
       cost: 'cost',
       globalDelta: 'global-delta',
       localDeltas: 'local-deltas',
+      logicSigDisassembly: 'logic-sig-disassembly',
       logicSigMessages: 'logic-sig-messages',
       logicSigTrace: 'logic-sig-trace',
       logs: 'logs',
@@ -1836,17 +1871,43 @@ export class ProofResponse extends BaseModel {
    */
   public stibhash: Uint8Array;
 
+  /**
+   * Represents the depth of the tree that is being proven, i.e. the number of edges
+   * from a leaf to the root.
+   */
+  public treedepth: number | bigint;
+
+  /**
+   * The type of hash function used to create the proof, must be one of:
+   * * sumhash
+   * * sha512_256
+   */
+  public hashtype?: string;
+
   /**
    * Creates a new `ProofResponse` object.
    * @param idx - Index of the transaction in the block's payset.
    * @param proof - Merkle proof of transaction membership.
    * @param stibhash - Hash of SignedTxnInBlock for verifying proof.
+   * @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges
+   * from a leaf to the root.
+   * @param hashtype - The type of hash function used to create the proof, must be one of:
+   * * sumhash
+   * * sha512_256
    */
-  constructor(
-    idx: number | bigint,
-    proof: string | Uint8Array,
-    stibhash: string | Uint8Array
-  ) {
+  constructor({
+    idx,
+    proof,
+    stibhash,
+    treedepth,
+    hashtype,
+  }: {
+    idx: number | bigint;
+    proof: string | Uint8Array;
+    stibhash: string | Uint8Array;
+    treedepth: number | bigint;
+    hashtype?: string;
+  }) {
     super();
     this.idx = idx;
     this.proof =
@@ -1857,11 +1918,15 @@ export class ProofResponse extends BaseModel {
       typeof stibhash === 'string'
         ? new Uint8Array(Buffer.from(stibhash, 'base64'))
         : stibhash;
+    this.treedepth = treedepth;
+    this.hashtype = hashtype;
 
     this.attribute_map = {
       idx: 'idx',
       proof: 'proof',
       stibhash: 'stibhash',
+      treedepth: 'treedepth',
+      hashtype: 'hashtype',
     };
   }
 }
diff --git a/src/client/v2/indexer/lookupAccountTransactions.ts b/src/client/v2/indexer/lookupAccountTransactions.ts
index df54e06..56c36b5 100644
--- a/src/client/v2/indexer/lookupAccountTransactions.ts
+++ b/src/client/v2/indexer/lookupAccountTransactions.ts
@@ -15,6 +15,18 @@ export function base64StringFunnel(data: Uint8Array | string) {
 }
 
 export default class LookupAccountTransactions extends JSONRequest {
+  /**
+   * Returns transactions relating to the given account.
+   *
+   * #### Example
+   * ```typescript
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient.lookupAccountTransactions(address).do();
+   * ```
+   *
+   * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idtransactions)
+   * @param account - The address of the account.
+   */
   constructor(
     c: HTTPClient,
     intDecoding: IntDecoding,
@@ -24,98 +36,351 @@ export default class LookupAccountTransactions extends JSONRequest {
     this.account = account;
   }
 
+  /**
+   * @returns /v2/accounts/`${account}`/transactions
+   */
   path() {
     return `/v2/accounts/${this.account}/transactions`;
   }
 
   /**
-   * notePrefix to filter with
+   * Specifies a prefix which must be contained in the note field
+   *
+   * #### Example
+   * ```typescript
+   * const notePrefixBase64Encoded = "Y3JlYXRl";
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .notePrefix(notePrefixBase64Encoded)
+   *        .do();
+   * ```
+   *
    * @param prefix - base64 string or uint8array
+   * @category query
    */
   notePrefix(prefix: Uint8Array | string) {
     this.query['note-prefix'] = base64StringFunnel(prefix);
     return this;
   }
 
-  // txtype to filter with, as string
+  /**
+   * Type of transaction to filter with
+   *
+   * #### Example
+   * ```typescript
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .txType("appl")
+   *        .do();
+   * ```
+   *
+   * @param type - one of “pay”, “keyreg”, “acfg”, “axfer”, “afrz”, "appl"
+   * @category query
+   */
   txType(type: string) {
     this.query['tx-type'] = type;
     return this;
   }
 
-  // sigtype to filter with, as string
+  /**
+   * Type of signature to filter with
+   * - sig: Standard
+   * - msig: MultiSig
+   * - lsig: LogicSig
+   *
+   * #### Example
+   * ```typescript
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .sigType("msig")
+   *        .do();
+   * ```
+   *
+   * @param type - one of “sig”, “msig”, “lsig”
+   * @category query
+   */
   sigType(type: string) {
     this.query['sig-type'] = type;
     return this;
   }
 
-  // txid to filter with, as string
+  /**
+   * Lookup the specific transaction by ID
+   *
+   * #### Example
+   * ```typescript
+   * const txId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .txid(txId)
+   *        .do();
+   * ```
+   *
+   * @param txid
+   * @category query
+   */
   txid(txid: string) {
     this.query.txid = txid;
     return this;
   }
 
-  // round to filter with, as int
+  /**
+   * Include results for the specified round
+   *
+   * #### Example
+   * ```typescript
+   * const targetBlock = 18309917;
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .round(targetBlock)
+   *        .do();
+   * ```
+   *
+   * @param round
+   * @category query
+   */
   round(round: number) {
     this.query.round = round;
     return this;
   }
 
-  // min round to filter with, as int
+  /**
+   * Include results at or after the specified min-round
+   *
+   * #### Example
+   * ```typescript
+   * const minRound = 18309917;
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .minRound(minRound)
+   *        .do();
+   * ```
+   *
+   * @param round
+   * @category query
+   */
   minRound(round: number) {
     this.query['min-round'] = round;
     return this;
   }
 
-  // max round to filter with, as int
+  /**
+   * Include results at or before the specified max-round
+   *
+   * #### Example
+   * ```typescript
+   * const maxRound = 18309917;
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .maxRound(maxRound)
+   *        .do();
+   * ```
+   *
+   * @param round
+   * @category query
+   */
   maxRound(round: number) {
     this.query['max-round'] = round;
     return this;
   }
 
-  // asset ID to filter with, as int
+  /**
+   * Asset ID to filter with
+   *
+   * #### Example
+   * ```typescript
+   * const assetID = 163650;
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .assetID(assetID)
+   *        .do();
+   * ```
+   *
+   * @param id
+   * @category query
+   */
   assetID(id: number) {
     this.query['asset-id'] = id;
     return this;
   }
 
-  // limit for filter, as int
+  /**
+   * Maximum number of results to return
+   *
+   * #### Example
+   * ```typescript
+   * const limit = 25;
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .limit(limit)
+   *        .do();
+   * ```
+   *
+   * @param limit
+   * @category query
+   */
   limit(limit: number) {
     this.query.limit = limit;
     return this;
   }
 
-  // before-time to filter with, as rfc3339 string
+  /**
+   * Include results before the given time
+   *
+   * #### Example
+   * ```typescript
+   * const beforeTime = "2022-02-02T20:20:22.02Z";
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .beforeTime(beforeTime)
+   *        .do();
+   * ```
+   *
+   * @param before - rfc3339 string
+   * @category query
+   */
   beforeTime(before: string) {
     this.query['before-time'] = before;
     return this;
   }
 
-  // after-time to filter with, as rfc3339 string
+  /**
+   * Include results after the given time
+   *
+   * #### Example
+   * ```typescript
+   * const afterTime = "2022-10-21T00:00:11.55Z";
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .afterTime(afterTime)
+   *        .do();
+   * ```
+   *
+   * @param after - rfc3339 string
+   * @category query
+   */
   afterTime(after: string) {
     this.query['after-time'] = after;
     return this;
   }
 
-  // filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units
+  /**
+   * Filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
+   *
+   * #### Example 1
+   * ```typescript
+   * const minBalance = 300000;
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .currencyGreaterThan(minBalance - 1)
+   *        .do();
+   * ```
+   *
+   * #### Example 2
+   * ```typescript
+   * const assetID = 163650;
+   * const minBalance = 300000;
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .assetID(assetID)
+   *        .currencyGreaterThan(minBalance - 1)
+   *        .do();
+   * ```
+   * @remarks
+   * If you are looking for transactions with the currency amount greater than 0, simply construct the query without `currencyGreaterThan` because it doesn't accept `-1`, and passing the `0` `currency-greater-than` value would exclude transactions with a 0 amount.
+   *
+   * @param greater
+   * @category query
+   */
   currencyGreaterThan(greater: number) {
     this.query['currency-greater-than'] = greater;
     return this;
   }
 
-  // filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units
+  /**
+   * Filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units
+   *
+   * #### Example 1
+   * ```typescript
+   * const maxBalance = 500000;
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .currencyLessThan(maxBalance + 1)
+   *        .do();
+   * ```
+   *
+   * #### Example 2
+   * ```typescript
+   * const assetID = 163650;
+   * const maxBalance = 500000;
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .assetID(assetID)
+   *        .currencyLessThan(maxBalance + 1)
+   *        .do();
+   * ```
+   *
+   * @param lesser
+   * @category query
+   */
   currencyLessThan(lesser: number) {
     this.query['currency-less-than'] = lesser;
     return this;
   }
 
-  // used for pagination
+  /**
+   * The next page of results. Use the next token provided by the previous results.
+   *
+   * #### Example
+   * ```typescript
+   * const limit = 25;
+   * const nextToken = "the next token returned in the previous query response";
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .limit(limit)
+   *        .nextToken(nextToken)
+   *        .do();
+   * ```
+   *
+   * @param nextToken
+   * @category query
+   */
   nextToken(nextToken: string) {
     this.query.next = nextToken;
     return this;
   }
 
-  // whether or not to include rekeying transactions
+  /**
+   * Include results which include the rekey-to field
+   *
+   * #### Example
+   * ```typescript
+   * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
+   * const accountTxns = await indexerClient
+   *        .lookupAccountTransactions(address)
+   *        .rekeyTo(false)
+   *        .do();
+   * ```
+   *
+   * @param rekeyTo
+   * @category query
+   */
   rekeyTo(rekeyTo: boolean) {
     this.query['rekey-to'] = rekeyTo;
     return this;
diff --git a/src/client/v2/indexer/lookupAssetByID.ts b/src/client/v2/indexer/lookupAssetByID.ts
index 57eb40a..01f9fe8 100644
--- a/src/client/v2/indexer/lookupAssetByID.ts
+++ b/src/client/v2/indexer/lookupAssetByID.ts
@@ -3,16 +3,52 @@ import HTTPClient from '../../client';
 import IntDecoding from '../../../types/intDecoding';
 
 export default class LookupAssetByID extends JSONRequest {
+  /**
+   * Returns asset information of the queried asset.
+   *
+   * #### Example
+   * ```typescript
+   * const assetId = 163650;
+   * const assetInfo = await indexerClient.lookupAssetByID(assetId).do();
+   * ```
+   *
+   * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-id)
+   * @param index - The asset ID to look up.
+   */
   constructor(c: HTTPClient, intDecoding: IntDecoding, private index: number) {
     super(c, intDecoding);
     this.index = index;
   }
 
+  /**
+   * @returns `/v2/assets/${index}`
+   */
   path() {
     return `/v2/assets/${this.index}`;
   }
 
-  // include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
+  /**
+   * Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
+   *
+   * #### Example 1
+   * ```typescript
+   * const assetInfo = await indexerClient
+   *        .lookupAssetByID(assetId)
+   *        .includeAll(false)
+   *        .do();
+   * ```
+   *
+   * #### Example 2
+   * ```typescript
+   * const assetInfo = await indexerClient
+   *        .lookupAssetByID(assetId)
+   *        .includeAll()
+   *        .do();
+   * ```
+   *
+   * @param value - default true when called without passing a value
+   * @category query
+   */
   includeAll(value = true) {
     this.query['include-all'] = value;
     return this;
diff --git a/src/client/v2/jsonrequest.ts b/src/client/v2/jsonrequest.ts
index 70f9b55..16e3444 100644
--- a/src/client/v2/jsonrequest.ts
+++ b/src/client/v2/jsonrequest.ts
@@ -30,6 +30,7 @@ export default abstract class JSONRequest<
 
   /**
    * @returns The path of this request.
+   * @category JSONRequest
    */
   abstract path(): string;
 
@@ -39,6 +40,7 @@ export default abstract class JSONRequest<
    * Use this method to change and restructure response
    * data as needed after receiving it from the `do()` method.
    * @param body - Response body received
+   * @category JSONRequest
    */
   // eslint-disable-next-line class-methods-use-this
   prepare(body: Body): Data {
@@ -49,6 +51,7 @@ export default abstract class JSONRequest<
    * Execute the request.
    * @param headers - Additional headers to send in the request. Optional.
    * @returns A promise which resolves to the response data.
+   * @category JSONRequest
    */
   async do(headers: Record<string, any> = {}): Promise<Data> {
     const jsonOptions: Record<string, any> = {};
@@ -73,6 +76,7 @@ export default abstract class JSONRequest<
    *
    * @param method - The method to use when parsing the
    *   response for this request. Must be one of "default", "safe", "mixed", or "bigint".
+   * @category JSONRequest
    */
   setIntDecoding(method: IntDecoding) {
     if (
diff --git a/src/logic/langspec.json b/src/logic/langspec.json
index 4ccd4f4..5fa35c4 100644
--- a/src/logic/langspec.json
+++ b/src/logic/langspec.json
@@ -1,5 +1,5 @@
 {
-  "EvalMaxVersion": 5,
+  "EvalMaxVersion": 6,
   "LogicSigVersion": 5,
   "Ops": [
     {
@@ -7,7 +7,7 @@
       "Name": "err",
       "Cost": 1,
       "Size": 1,
-      "Doc": "Error. Fail immediately. This is primarily a fencepost against accidental zero bytes getting compiled into programs.",
+      "Doc": "Fail immediately.",
       "Groups": ["Flow Control"]
     },
     {
@@ -17,7 +17,7 @@
       "Returns": "B",
       "Cost": 35,
       "Size": 1,
-      "Doc": "SHA256 hash of value X, yields [32]byte",
+      "Doc": "SHA256 hash of value A, yields [32]byte",
       "Groups": ["Arithmetic"]
     },
     {
@@ -27,7 +27,7 @@
       "Returns": "B",
       "Cost": 130,
       "Size": 1,
-      "Doc": "Keccak256 hash of value X, yields [32]byte",
+      "Doc": "Keccak256 hash of value A, yields [32]byte",
       "Groups": ["Arithmetic"]
     },
     {
@@ -37,7 +37,7 @@
       "Returns": "B",
       "Cost": 45,
       "Size": 1,
-      "Doc": "SHA512_256 hash of value X, yields [32]byte",
+      "Doc": "SHA512_256 hash of value A, yields [32]byte",
       "Groups": ["Arithmetic"]
     },
     {
@@ -70,7 +70,7 @@
       "Returns": "BB",
       "Cost": 650,
       "Size": 2,
-      "Doc": "decompress pubkey A into components X, Y =\u003e [*... stack*, X, Y]",
+      "Doc": "decompress pubkey A into components X, Y",
       "DocExtra": "The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.",
       "ImmediateNote": "{uint8 curve index}",
       "Groups": ["Arithmetic"]
@@ -82,7 +82,7 @@
       "Returns": "BB",
       "Cost": 2000,
       "Size": 2,
-      "Doc": "for (data A, recovery id B, signature C, D) recover a public key =\u003e [*... stack*, X, Y]",
+      "Doc": "for (data A, recovery id B, signature C, D) recover a public key",
       "DocExtra": "S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.",
       "ImmediateNote": "{uint8 curve index}",
       "Groups": ["Arithmetic"]
@@ -217,7 +217,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "X == 0 yields 1; else 0",
+      "Doc": "A == 0 yields 1; else 0",
       "Groups": ["Arithmetic"]
     },
     {
@@ -227,7 +227,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "yields length of byte value X",
+      "Doc": "yields length of byte value A",
       "Groups": ["Arithmetic"]
     },
     {
@@ -237,7 +237,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "converts uint64 X to big endian bytes",
+      "Doc": "converts uint64 A to big endian bytes",
       "Groups": ["Arithmetic"]
     },
     {
@@ -247,7 +247,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "converts bytes X as big endian to uint64",
+      "Doc": "converts bytes A as big endian to uint64",
       "DocExtra": "`btoi` fails if the input is longer than 8 bytes.",
       "Groups": ["Arithmetic"]
     },
@@ -298,7 +298,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "bitwise invert value X",
+      "Doc": "bitwise invert value A",
       "Groups": ["Arithmetic"]
     },
     {
@@ -308,7 +308,7 @@
       "Returns": "UU",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A times B out to 128-bit long result as low (top) and high uint64 values on the stack",
+      "Doc": "A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low",
       "Groups": ["Arithmetic"]
     },
     {
@@ -318,7 +318,7 @@
       "Returns": "UU",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A plus B out to 128-bit long result as sum (top) and carry-bit uint64 values on the stack",
+      "Doc": "A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.",
       "Groups": ["Arithmetic"]
     },
     {
@@ -328,7 +328,8 @@
       "Returns": "UUUU",
       "Cost": 20,
       "Size": 1,
-      "Doc": "Pop four uint64 values.  The deepest two are interpreted as a uint128 dividend (deepest value is high word), the top two are interpreted as a uint128 divisor.  Four uint64 values are pushed to the stack. The deepest two are the quotient (deeper value is the high uint64). The top two are the remainder, low bits on top.",
+      "Doc": "W,X = (A,B / C,D); Y,Z = (A,B modulo C,D)",
+      "DocExtra": "The notation J,K indicates that two uint64 values J and K are interpreted as a uint128 value, with J as the high uint64 and K the low.",
       "Groups": ["Arithmetic"]
     },
     {
@@ -347,7 +348,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 2,
-      "Doc": "push Ith constant from intcblock to stack",
+      "Doc": "Ith constant from intcblock",
       "ImmediateNote": "{uint8 int constant index}",
       "Groups": ["Loading Values"]
     },
@@ -357,7 +358,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push constant 0 from intcblock to stack",
+      "Doc": "constant 0 from intcblock",
       "Groups": ["Loading Values"]
     },
     {
@@ -366,7 +367,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push constant 1 from intcblock to stack",
+      "Doc": "constant 1 from intcblock",
       "Groups": ["Loading Values"]
     },
     {
@@ -375,7 +376,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push constant 2 from intcblock to stack",
+      "Doc": "constant 2 from intcblock",
       "Groups": ["Loading Values"]
     },
     {
@@ -384,7 +385,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push constant 3 from intcblock to stack",
+      "Doc": "constant 3 from intcblock",
       "Groups": ["Loading Values"]
     },
     {
@@ -403,7 +404,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 2,
-      "Doc": "push Ith constant from bytecblock to stack",
+      "Doc": "Ith constant from bytecblock",
       "ImmediateNote": "{uint8 byte constant index}",
       "Groups": ["Loading Values"]
     },
@@ -413,7 +414,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push constant 0 from bytecblock to stack",
+      "Doc": "constant 0 from bytecblock",
       "Groups": ["Loading Values"]
     },
     {
@@ -422,7 +423,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push constant 1 from bytecblock to stack",
+      "Doc": "constant 1 from bytecblock",
       "Groups": ["Loading Values"]
     },
     {
@@ -431,7 +432,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push constant 2 from bytecblock to stack",
+      "Doc": "constant 2 from bytecblock",
       "Groups": ["Loading Values"]
     },
     {
@@ -440,7 +441,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push constant 3 from bytecblock to stack",
+      "Doc": "constant 3 from bytecblock",
       "Groups": ["Loading Values"]
     },
     {
@@ -449,7 +450,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 2,
-      "Doc": "push Nth LogicSig argument to stack",
+      "Doc": "Nth LogicSig argument",
       "ImmediateNote": "{uint8 arg index N}",
       "Groups": ["Loading Values"]
     },
@@ -459,7 +460,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push LogicSig argument 0 to stack",
+      "Doc": "LogicSig argument 0",
       "Groups": ["Loading Values"]
     },
     {
@@ -468,7 +469,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push LogicSig argument 1 to stack",
+      "Doc": "LogicSig argument 1",
       "Groups": ["Loading Values"]
     },
     {
@@ -477,7 +478,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push LogicSig argument 2 to stack",
+      "Doc": "LogicSig argument 2",
       "Groups": ["Loading Values"]
     },
     {
@@ -486,7 +487,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push LogicSig argument 3 to stack",
+      "Doc": "LogicSig argument 3",
       "Groups": ["Loading Values"]
     },
     {
@@ -557,10 +558,12 @@
         "Logs",
         "NumLogs",
         "CreatedAssetID",
-        "CreatedApplicationID"
+        "CreatedApplicationID",
+        "LastLog",
+        "StateProofPK"
       ],
-      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUU",
-      "Doc": "push field F of current transaction to stack",
+      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB",
+      "Doc": "field F of current transaction",
       "DocExtra": "FirstValidTime causes the program to fail. The field is reserved for future use.",
       "ImmediateNote": "{uint8 transaction field index}",
       "Groups": ["Loading Values"]
@@ -571,22 +574,7 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 2,
-      "ArgEnum": [
-        "MinTxnFee",
-        "MinBalance",
-        "MaxTxnLife",
-        "ZeroAddress",
-        "GroupSize",
-        "LogicSigVersion",
-        "Round",
-        "LatestTimestamp",
-        "CurrentApplicationID",
-        "CreatorAddress",
-        "CurrentApplicationAddress",
-        "GroupID"
-      ],
-      "ArgEnumTypes": "UUUBUUUUUBBB",
-      "Doc": "push value from globals to stack",
+      "Doc": "global field F",
       "ImmediateNote": "{uint8 global field index}",
       "Groups": ["Loading Values"]
     },
@@ -658,10 +646,12 @@
         "Logs",
         "NumLogs",
         "CreatedAssetID",
-        "CreatedApplicationID"
+        "CreatedApplicationID",
+        "LastLog",
+        "StateProofPK"
       ],
-      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUU",
-      "Doc": "push field F of the Tth transaction in the current group",
+      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB",
+      "Doc": "field F of the Tth transaction in the current group",
       "DocExtra": "for notes on transaction fields available, see `txn`. If this transaction is _i_ in the group, `gtxn i field` is equivalent to `txn field`.",
       "ImmediateNote": "{uint8 transaction group index} {uint8 transaction field index}",
       "Groups": ["Loading Values"]
@@ -672,7 +662,7 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 2,
-      "Doc": "copy a value from scratch space to the stack. All scratch spaces are 0 at program start.",
+      "Doc": "Ith scratch space value. All scratch spaces are 0 at program start.",
       "ImmediateNote": "{uint8 position in scratch space to load from}",
       "Groups": ["Loading Values"]
     },
@@ -682,7 +672,7 @@
       "Args": ".",
       "Cost": 1,
       "Size": 2,
-      "Doc": "pop value X. store X to the Ith scratch space",
+      "Doc": "store A to the Ith scratch space",
       "ImmediateNote": "{uint8 position in scratch space to store to}",
       "Groups": ["Loading Values"]
     },
@@ -700,7 +690,7 @@
         "Logs"
       ],
       "ArgEnumTypes": "BBUUB",
-      "Doc": "push Ith value of the array field F of the current transaction",
+      "Doc": "Ith value of the array field F of the current transaction",
       "ImmediateNote": "{uint8 transaction field index} {uint8 transaction field array index}",
       "Groups": ["Loading Values"]
     },
@@ -718,7 +708,7 @@
         "Logs"
       ],
       "ArgEnumTypes": "BBUUB",
-      "Doc": "push Ith value of the array field F from the Tth transaction in the current group",
+      "Doc": "Ith value of the array field F from the Tth transaction in the current group",
       "ImmediateNote": "{uint8 transaction group index} {uint8 transaction field index} {uint8 transaction field array index}",
       "Groups": ["Loading Values"]
     },
@@ -791,10 +781,12 @@
         "Logs",
         "NumLogs",
         "CreatedAssetID",
-        "CreatedApplicationID"
+        "CreatedApplicationID",
+        "LastLog",
+        "StateProofPK"
       ],
-      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUU",
-      "Doc": "push field F of the Xth transaction in the current group",
+      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB",
+      "Doc": "field F of the Ath transaction in the current group",
       "DocExtra": "for notes on transaction fields available, see `txn`. If top of stack is _i_, `gtxns field` is equivalent to `gtxn _i_ field`. gtxns exists so that _i_ can be calculated, often based on the index of the current transaction.",
       "ImmediateNote": "{uint8 transaction field index}",
       "Groups": ["Loading Values"]
@@ -814,7 +806,7 @@
         "Logs"
       ],
       "ArgEnumTypes": "BBUUB",
-      "Doc": "push Ith value of the array field F from the Xth transaction in the current group",
+      "Doc": "Ith value of the array field F from the Ath transaction in the current group",
       "ImmediateNote": "{uint8 transaction field index} {uint8 transaction field array index}",
       "Groups": ["Loading Values"]
     },
@@ -824,7 +816,7 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 3,
-      "Doc": "push Ith scratch space index of the Tth transaction in the current group",
+      "Doc": "Ith scratch space value of the Tth transaction in the current group",
       "DocExtra": "`gload` fails unless the requested transaction is an ApplicationCall and T \u003c GroupIndex.",
       "ImmediateNote": "{uint8 transaction group index} {uint8 position in scratch space to load from}",
       "Groups": ["Loading Values"]
@@ -836,8 +828,8 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 2,
-      "Doc": "push Ith scratch space index of the Xth transaction in the current group",
-      "DocExtra": "`gloads` fails unless the requested transaction is an ApplicationCall and X \u003c GroupIndex.",
+      "Doc": "Ith scratch space value of the Ath transaction in the current group",
+      "DocExtra": "`gloads` fails unless the requested transaction is an ApplicationCall and A \u003c GroupIndex.",
       "ImmediateNote": "{uint8 position in scratch space to load from}",
       "Groups": ["Loading Values"]
     },
@@ -847,7 +839,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 2,
-      "Doc": "push the ID of the asset or application created in the Tth transaction of the current group",
+      "Doc": "ID of the asset or application created in the Tth transaction of the current group",
       "DocExtra": "`gaid` fails unless the requested transaction created an asset or application and T \u003c GroupIndex.",
       "ImmediateNote": "{uint8 transaction group index}",
       "Groups": ["Loading Values"]
@@ -859,8 +851,8 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push the ID of the asset or application created in the Xth transaction of the current group",
-      "DocExtra": "`gaids` fails unless the requested transaction created an asset or application and X \u003c GroupIndex.",
+      "Doc": "ID of the asset or application created in the Ath transaction of the current group",
+      "DocExtra": "`gaids` fails unless the requested transaction created an asset or application and A \u003c GroupIndex.",
       "Groups": ["Loading Values"]
     },
     {
@@ -870,7 +862,7 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 1,
-      "Doc": "copy a value from the Xth scratch space to the stack.  All scratch spaces are 0 at program start.",
+      "Doc": "Ath scratch space value.  All scratch spaces are 0 at program start.",
       "Groups": ["Loading Values"]
     },
     {
@@ -879,7 +871,7 @@
       "Args": "U.",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop indexes A and B. store B to the Ath scratch space",
+      "Doc": "store B to the Ath scratch space",
       "Groups": ["Loading Values"]
     },
     {
@@ -888,7 +880,7 @@
       "Args": "U",
       "Cost": 1,
       "Size": 3,
-      "Doc": "branch to TARGET if value X is not zero",
+      "Doc": "branch to TARGET if value A is not zero",
       "DocExtra": "The `bnz` instruction opcode 0x40 is followed by two immediate data bytes which are a high byte first and low byte second which together form a 16 bit offset which the instruction may branch to. For a bnz instruction at `pc`, if the last element of the stack is not zero then branch to instruction at `pc + 3 + N`, else proceed to next instruction at `pc + 3`. Branch targets must be aligned instructions. (e.g. Branching to the second byte of a 2 byte op will be rejected.) Starting at v4, the offset is treated as a signed 16 bit integer allowing for backward branches and looping. In prior version (v1 to v3), branch offsets are limited to forward branches only, 0-0x7fff.\n\nAt v2 it became allowed to branch to the end of the program exactly after the last instruction: bnz to byte N (with 0-indexing) was illegal for a TEAL program with N bytes before v2, and is legal after it. This change eliminates the need for a last instruction of no-op as a branch target at the end. (Branching beyond the end--in other words, to a byte larger than N--is still illegal and will cause the program to fail.)",
       "ImmediateNote": "{int16 branch offset, big endian}",
       "Groups": ["Flow Control"]
@@ -899,7 +891,7 @@
       "Args": "U",
       "Cost": 1,
       "Size": 3,
-      "Doc": "branch to TARGET if value X is zero",
+      "Doc": "branch to TARGET if value A is zero",
       "DocExtra": "See `bnz` for details on how branches work. `bz` inverts the behavior of `bnz`.",
       "ImmediateNote": "{int16 branch offset, big endian}",
       "Groups": ["Flow Control"]
@@ -920,7 +912,7 @@
       "Args": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "use last value on stack as success value; end",
+      "Doc": "use A as success value; end",
       "Groups": ["Flow Control"]
     },
     {
@@ -929,7 +921,7 @@
       "Args": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "immediately fail unless value X is a non-zero number",
+      "Doc": "immediately fail unless A is a non-zero number",
       "Groups": ["Flow Control"]
     },
     {
@@ -938,7 +930,7 @@
       "Args": ".",
       "Cost": 1,
       "Size": 1,
-      "Doc": "discard value X from stack",
+      "Doc": "discard A",
       "Groups": ["Flow Control"]
     },
     {
@@ -948,7 +940,7 @@
       "Returns": "..",
       "Cost": 1,
       "Size": 1,
-      "Doc": "duplicate last value on stack",
+      "Doc": "duplicate A",
       "Groups": ["Flow Control"]
     },
     {
@@ -958,7 +950,7 @@
       "Returns": "....",
       "Cost": 1,
       "Size": 1,
-      "Doc": "duplicate two last values on stack: A, B -\u003e A, B, A, B",
+      "Doc": "duplicate A and B",
       "Groups": ["Flow Control"]
     },
     {
@@ -968,7 +960,7 @@
       "Returns": "..",
       "Cost": 1,
       "Size": 2,
-      "Doc": "push the Nth value from the top of the stack. dig 0 is equivalent to dup",
+      "Doc": "Nth value from the top of the stack. dig 0 is equivalent to dup",
       "ImmediateNote": "{uint8 depth}",
       "Groups": ["Flow Control"]
     },
@@ -979,7 +971,7 @@
       "Returns": "..",
       "Cost": 1,
       "Size": 1,
-      "Doc": "swaps two last values on stack: A, B -\u003e B, A",
+      "Doc": "swaps A and B on stack",
       "Groups": ["Flow Control"]
     },
     {
@@ -989,7 +981,7 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 1,
-      "Doc": "selects one of two values based on top-of-stack: A, B, C -\u003e (if C != 0 then B else A)",
+      "Doc": "selects one of two values based on top-of-stack: B if C != 0, else A",
       "Groups": ["Flow Control"]
     },
     {
@@ -1021,7 +1013,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop two byte-arrays A and B and join them, push the result",
+      "Doc": "join A and B",
       "DocExtra": "`concat` fails if the result would be greater than 4096 bytes.",
       "Groups": ["Arithmetic"]
     },
@@ -1032,9 +1024,9 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 3,
-      "Doc": "pop a byte-array A. For immediate values in 0..255 S and E: extract a range of bytes from A starting at S up to but not including E, push the substring result. If E \u003c S, or either is larger than the array length, the program fails",
+      "Doc": "A range of bytes from A starting at S up to but not including E. If E \u003c S, or either is larger than the array length, the program fails",
       "ImmediateNote": "{uint8 start position} {uint8 end position}",
-      "Groups": ["Byte Array Slicing"]
+      "Groups": ["Byte Array Manipulation"]
     },
     {
       "Opcode": 82,
@@ -1043,8 +1035,8 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop a byte-array A and two integers B and C. Extract a range of bytes from A starting at B up to but not including C, push the substring result. If C \u003c B, or either is larger than the array length, the program fails",
-      "Groups": ["Byte Array Slicing"]
+      "Doc": "A range of bytes from A starting at B up to but not including C. If C \u003c B, or either is larger than the array length, the program fails",
+      "Groups": ["Byte Array Manipulation"]
     },
     {
       "Opcode": 83,
@@ -1053,7 +1045,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop a target A (integer or byte-array), and index B. Push the Bth bit of A.",
+      "Doc": "Bth bit of (byte-array or integer) A.",
       "DocExtra": "see explanation of bit ordering in setbit",
       "Groups": ["Arithmetic"]
     },
@@ -1064,7 +1056,7 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop a target A, index B, and bit C. Set the Bth bit of A to C, and push the result",
+      "Doc": "Copy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C",
       "DocExtra": "When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.",
       "Groups": ["Arithmetic"]
     },
@@ -1075,7 +1067,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop a byte-array A and integer B. Extract the Bth byte of A and push it as an integer",
+      "Doc": "Bth byte of A, as an integer",
       "Groups": ["Arithmetic"]
     },
     {
@@ -1085,7 +1077,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop a byte-array A, integer B, and small integer C (between 0..255). Set the Bth byte of A to C, and push the result",
+      "Doc": "Copy of A with the Bth byte set to small integer (between 0..255) C",
       "Groups": ["Arithmetic"]
     },
     {
@@ -1095,9 +1087,9 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 3,
-      "Doc": "pop a byte-array A. For immediate values in 0..255 S and L: extract a range of bytes from A starting at S up to but not including S+L, push the substring result. If L is 0, then extract to the end of the string. If S or S+L is larger than the array length, the program fails",
+      "Doc": "A range of bytes from A starting at S up to but not including S+L. If L is 0, then extract to the end of the string. If S or S+L is larger than the array length, the program fails",
       "ImmediateNote": "{uint8 start position} {uint8 length}",
-      "Groups": ["Byte Array Slicing"]
+      "Groups": ["Byte Array Manipulation"]
     },
     {
       "Opcode": 88,
@@ -1106,8 +1098,8 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop a byte-array A and two integers B and C. Extract a range of bytes from A starting at B up to but not including B+C, push the substring result. If B+C is larger than the array length, the program fails",
-      "Groups": ["Byte Array Slicing"]
+      "Doc": "A range of bytes from A starting at B up to but not including B+C. If B+C is larger than the array length, the program fails",
+      "Groups": ["Byte Array Manipulation"]
     },
     {
       "Opcode": 89,
@@ -1116,8 +1108,8 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+2, convert bytes as big endian and push the uint64 result. If B+2 is larger than the array length, the program fails",
-      "Groups": ["Byte Array Slicing"]
+      "Doc": "A uint16 formed from a range of big-endian bytes from A starting at B up to but not including B+2. If B+2 is larger than the array length, the program fails",
+      "Groups": ["Byte Array Manipulation"]
     },
     {
       "Opcode": 90,
@@ -1126,8 +1118,8 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+4, convert bytes as big endian and push the uint64 result. If B+4 is larger than the array length, the program fails",
-      "Groups": ["Byte Array Slicing"]
+      "Doc": "A uint32 formed from a range of big-endian bytes from A starting at B up to but not including B+4. If B+4 is larger than the array length, the program fails",
+      "Groups": ["Byte Array Manipulation"]
     },
     {
       "Opcode": 91,
@@ -1136,8 +1128,8 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+8, convert bytes as big endian and push the uint64 result. If B+8 is larger than the array length, the program fails",
-      "Groups": ["Byte Array Slicing"]
+      "Doc": "A uint64 formed from a range of big-endian bytes from A starting at B up to but not including B+8. If B+8 is larger than the array length, the program fails",
+      "Groups": ["Byte Array Manipulation"]
     },
     {
       "Opcode": 96,
@@ -1147,7 +1139,7 @@
       "Cost": 1,
       "Size": 1,
       "Doc": "get balance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted.",
-      "DocExtra": "params: Before v4, Txn.Accounts offset. Since v4, Txn.Accounts offset or an account address that appears in Txn.Accounts or is Txn.Sender). Return: value.",
+      "DocExtra": "params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.",
       "Groups": ["State Access"]
     },
     {
@@ -1157,8 +1149,8 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "check if account A opted in for the application B =\u003e {0 or 1}",
-      "DocExtra": "params: Txn.Accounts offset (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender), application id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise.",
+      "Doc": "1 if account A is opted in to application B, else 0",
+      "DocExtra": "params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise.",
       "Groups": ["State Access"]
     },
     {
@@ -1168,8 +1160,8 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 1,
-      "Doc": "read from account A from local state of the current application key B =\u003e value",
-      "DocExtra": "params: Txn.Accounts offset (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender), state key. Return: value. The value is zero (of type uint64) if the key does not exist.",
+      "Doc": "local state of the key B in the current application in account A",
+      "DocExtra": "params: Txn.Accounts offset (or, since v4, an _available_ account address), state key. Return: value. The value is zero (of type uint64) if the key does not exist.",
       "Groups": ["State Access"]
     },
     {
@@ -1179,8 +1171,8 @@
       "Returns": ".U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "read from account A from local state of the application B key C =\u003e [*... stack*, value, 0 or 1]",
-      "DocExtra": "params: Txn.Accounts offset (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender), application id (or, since v4, a Txn.ForeignApps offset), state key. Return: did_exist flag (top of the stack, 1 if the application existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.",
+      "Doc": "X is the local state of application B, key C in account A. Y is 1 if key existed, else 0",
+      "DocExtra": "params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.",
       "Groups": ["State Access"]
     },
     {
@@ -1190,7 +1182,7 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 1,
-      "Doc": "read key A from global state of a current application =\u003e value",
+      "Doc": "global state of the key A in the current application",
       "DocExtra": "params: state key. Return: value. The value is zero (of type uint64) if the key does not exist.",
       "Groups": ["State Access"]
     },
@@ -1201,8 +1193,8 @@
       "Returns": ".U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "read from application A global state key B =\u003e [*... stack*, value, 0 or 1]",
-      "DocExtra": "params: Txn.ForeignApps offset (or, since v4, an application id that appears in Txn.ForeignApps or is the CurrentApplicationID), state key. Return: did_exist flag (top of the stack, 1 if the application existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.",
+      "Doc": "X is the global state of application A, key B. Y is 1 if key existed, else 0",
+      "DocExtra": "params: Txn.ForeignApps offset (or, since v4, an _available_ application id), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.",
       "Groups": ["State Access"]
     },
     {
@@ -1211,8 +1203,8 @@
       "Args": ".B.",
       "Cost": 1,
       "Size": 1,
-      "Doc": "write to account specified by A to local state of a current application key B with value C",
-      "DocExtra": "params: Txn.Accounts offset (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender), state key, value.",
+      "Doc": "write C to key B in account A's local state of the current application",
+      "DocExtra": "params: Txn.Accounts offset (or, since v4, an _available_ account address), state key, value.",
       "Groups": ["State Access"]
     },
     {
@@ -1221,7 +1213,7 @@
       "Args": "B.",
       "Cost": 1,
       "Size": 1,
-      "Doc": "write key A and value B to global state of the current application",
+      "Doc": "write B to key A in the global state of the current application",
       "Groups": ["State Access"]
     },
     {
@@ -1230,8 +1222,8 @@
       "Args": ".B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "delete from account A local state key B of the current application",
-      "DocExtra": "params: Txn.Accounts offset (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender), state key.\n\nDeleting a key which is already absent has no effect on the application local state. (In particular, it does _not_ cause the program to fail.)",
+      "Doc": "delete key B from account A's local state of the current application",
+      "DocExtra": "params: Txn.Accounts offset (or, since v4, an _available_ account address), state key.\n\nDeleting a key which is already absent has no effect on the application local state. (In particular, it does _not_ cause the program to fail.)",
       "Groups": ["State Access"]
     },
     {
@@ -1240,7 +1232,7 @@
       "Args": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "delete key A from a global state of the current application",
+      "Doc": "delete key A from the global state of the current application",
       "DocExtra": "params: state key.\n\nDeleting a key which is already absent has no effect on the application global state. (In particular, it does _not_ cause the program to fail.)",
       "Groups": ["State Access"]
     },
@@ -1253,8 +1245,8 @@
       "Size": 2,
       "ArgEnum": ["AssetBalance", "AssetFrozen"],
       "ArgEnumTypes": "UU",
-      "Doc": "read from account A and asset B holding field X (imm arg) =\u003e {0 or 1 (top), value}",
-      "DocExtra": "params: Txn.Accounts offset (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.",
+      "Doc": "X is field F from account A's holding of asset B. Y is 1 if A is opted into B, else 0",
+      "DocExtra": "params: Txn.Accounts offset (or, since v4, an _available_ address), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.",
       "ImmediateNote": "{uint8 asset holding field index}",
       "Groups": ["State Access"]
     },
@@ -1280,8 +1272,8 @@
         "AssetCreator"
       ],
       "ArgEnumTypes": "UUUBBBBBBBBB",
-      "Doc": "read from asset A params field X (imm arg) =\u003e {0 or 1 (top), value}",
-      "DocExtra": "params: Before v4, Txn.ForeignAssets offset. Since v4, Txn.ForeignAssets offset or an asset id that appears in Txn.ForeignAssets. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.",
+      "Doc": "X is field F from asset A. Y is 1 if A exists, else 0",
+      "DocExtra": "params: Txn.ForeignAssets offset (or, since v4, an _available_ asset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.",
       "ImmediateNote": "{uint8 asset params field index}",
       "Groups": ["State Access"]
     },
@@ -1304,11 +1296,22 @@
         "AppAddress"
       ],
       "ArgEnumTypes": "BBUUUUUBB",
-      "Doc": "read from app A params field X (imm arg) =\u003e {0 or 1 (top), value}",
-      "DocExtra": "params: Txn.ForeignApps offset or an app id that appears in Txn.ForeignApps. Return: did_exist flag (1 if the application existed and 0 otherwise), value.",
+      "Doc": "X is field F from app A. Y is 1 if A exists, else 0",
+      "DocExtra": "params: Txn.ForeignApps offset or an _available_ app id. Return: did_exist flag (1 if the application existed and 0 otherwise), value.",
       "ImmediateNote": "{uint8 app params field index}",
       "Groups": ["State Access"]
     },
+    {
+      "Opcode": 115,
+      "Name": "acct_params_get",
+      "Args": ".",
+      "Returns": ".U",
+      "Cost": 1,
+      "Size": 2,
+      "Doc": "X is field F from account A. Y is 1 if A owns positive algos, else 0",
+      "ImmediateNote": "{uint8 account params field index}",
+      "Groups": ["State Access"]
+    },
     {
       "Opcode": 120,
       "Name": "min_balance",
@@ -1317,7 +1320,7 @@
       "Cost": 1,
       "Size": 1,
       "Doc": "get minimum required balance for account A, in microalgos. Required balance is affected by [ASA](https://developer.algorand.org/docs/features/asa/#assets-overview) and [App](https://developer.algorand.org/docs/features/asc1/stateful/#minimum-balance-requirement-for-a-smart-contract) usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes.",
-      "DocExtra": "params: Before v4, Txn.Accounts offset. Since v4, Txn.Accounts offset or an account address that appears in Txn.Accounts or is Txn.Sender). Return: value.",
+      "DocExtra": "params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.",
       "Groups": ["State Access"]
     },
     {
@@ -1326,7 +1329,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 0,
-      "Doc": "push the following program bytes to the stack",
+      "Doc": "immediate BYTES",
       "DocExtra": "pushbytes args are not added to the bytecblock during assembly processes",
       "ImmediateNote": "{varuint length} {bytes}",
       "Groups": ["Loading Values"]
@@ -1337,7 +1340,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 0,
-      "Doc": "push immediate UINT to the stack as an integer",
+      "Doc": "immediate UINT",
       "DocExtra": "pushint args are not added to the intcblock during assembly processes",
       "ImmediateNote": "{varuint int}",
       "Groups": ["Loading Values"]
@@ -1388,7 +1391,7 @@
       "Returns": "U",
       "Cost": 4,
       "Size": 1,
-      "Doc": "The largest integer B such that B^2 \u003c= X",
+      "Doc": "The largest integer I such that I^2 \u003c= A",
       "Groups": ["Arithmetic"]
     },
     {
@@ -1398,7 +1401,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "The highest set bit in X. If X is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4",
+      "Doc": "The highest set bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4",
       "DocExtra": "bitlen interprets arrays as big-endian integers, unlike setbit/getbit",
       "Groups": ["Arithmetic"]
     },
@@ -1419,7 +1422,28 @@
       "Returns": "UU",
       "Cost": 10,
       "Size": 1,
-      "Doc": "A raised to the Bth power as a 128-bit long result as low (top) and high uint64 values on the stack. Fail if A == B == 0 or if the results exceeds 2^128-1",
+      "Doc": "A raised to the Bth power as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low. Fail if A == B == 0 or if the results exceeds 2^128-1",
+      "Groups": ["Arithmetic"]
+    },
+    {
+      "Opcode": 150,
+      "Name": "bsqrt",
+      "Args": "B",
+      "Returns": "B",
+      "Cost": 40,
+      "Size": 1,
+      "Doc": "The largest integer I such that I^2 \u003c= A. A and I are interpreted as big-endian unsigned integers",
+      "Groups": ["Byte Array Arithmetic"]
+    },
+    {
+      "Opcode": 151,
+      "Name": "divw",
+      "Args": "UUU",
+      "Returns": "U",
+      "Cost": 1,
+      "Size": 1,
+      "Doc": "A,B / C. Fail if C == 0 or if result overflows.",
+      "DocExtra": "The notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low.",
       "Groups": ["Arithmetic"]
     },
     {
@@ -1429,7 +1453,7 @@
       "Returns": "B",
       "Cost": 10,
       "Size": 1,
-      "Doc": "A plus B, where A and B are byte-arrays interpreted as big-endian unsigned integers",
+      "Doc": "A plus B. A and B are interpreted as big-endian unsigned integers",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1439,7 +1463,7 @@
       "Returns": "B",
       "Cost": 10,
       "Size": 1,
-      "Doc": "A minus B, where A and B are byte-arrays interpreted as big-endian unsigned integers. Fail on underflow.",
+      "Doc": "A minus B. A and B are interpreted as big-endian unsigned integers. Fail on underflow.",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1449,7 +1473,7 @@
       "Returns": "B",
       "Cost": 20,
       "Size": 1,
-      "Doc": "A divided by B (truncated division), where A and B are byte-arrays interpreted as big-endian unsigned integers. Fail if B is zero.",
+      "Doc": "A divided by B (truncated division). A and B are interpreted as big-endian unsigned integers. Fail if B is zero.",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1459,7 +1483,7 @@
       "Returns": "B",
       "Cost": 20,
       "Size": 1,
-      "Doc": "A times B, where A and B are byte-arrays interpreted as big-endian unsigned integers.",
+      "Doc": "A times B. A and B are interpreted as big-endian unsigned integers.",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1469,7 +1493,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A is less than B, where A and B are byte-arrays interpreted as big-endian unsigned integers =\u003e { 0 or 1}",
+      "Doc": "1 if A is less than B, else 0. A and B are interpreted as big-endian unsigned integers",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1479,7 +1503,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A is greater than B, where A and B are byte-arrays interpreted as big-endian unsigned integers =\u003e { 0 or 1}",
+      "Doc": "1 if A is greater than B, else 0. A and B are interpreted as big-endian unsigned integers",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1489,7 +1513,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A is less than or equal to B, where A and B are byte-arrays interpreted as big-endian unsigned integers =\u003e { 0 or 1}",
+      "Doc": "1 if A is less than or equal to B, else 0. A and B are interpreted as big-endian unsigned integers",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1499,7 +1523,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A is greater than or equal to B, where A and B are byte-arrays interpreted as big-endian unsigned integers =\u003e { 0 or 1}",
+      "Doc": "1 if A is greater than or equal to B, else 0. A and B are interpreted as big-endian unsigned integers",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1509,7 +1533,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A is equals to B, where A and B are byte-arrays interpreted as big-endian unsigned integers =\u003e { 0 or 1}",
+      "Doc": "1 if A is equal to B, else 0. A and B are interpreted as big-endian unsigned integers",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1519,7 +1543,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A is not equal to B, where A and B are byte-arrays interpreted as big-endian unsigned integers =\u003e { 0 or 1}",
+      "Doc": "0 if A is equal to B, else 1. A and B are interpreted as big-endian unsigned integers",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1529,7 +1553,7 @@
       "Returns": "B",
       "Cost": 20,
       "Size": 1,
-      "Doc": "A modulo B, where A and B are byte-arrays interpreted as big-endian unsigned integers. Fail if B is zero.",
+      "Doc": "A modulo B. A and B are interpreted as big-endian unsigned integers. Fail if B is zero.",
       "Groups": ["Byte Array Arithmetic"]
     },
     {
@@ -1539,7 +1563,7 @@
       "Returns": "B",
       "Cost": 6,
       "Size": 1,
-      "Doc": "A bitwise-or B, where A and B are byte-arrays, zero-left extended to the greater of their lengths",
+      "Doc": "A bitwise-or B. A and B are zero-left extended to the greater of their lengths",
       "Groups": ["Byte Array Logic"]
     },
     {
@@ -1549,7 +1573,7 @@
       "Returns": "B",
       "Cost": 6,
       "Size": 1,
-      "Doc": "A bitwise-and B, where A and B are byte-arrays, zero-left extended to the greater of their lengths",
+      "Doc": "A bitwise-and B. A and B are zero-left extended to the greater of their lengths",
       "Groups": ["Byte Array Logic"]
     },
     {
@@ -1559,7 +1583,7 @@
       "Returns": "B",
       "Cost": 6,
       "Size": 1,
-      "Doc": "A bitwise-xor B, where A and B are byte-arrays, zero-left extended to the greater of their lengths",
+      "Doc": "A bitwise-xor B. A and B are zero-left extended to the greater of their lengths",
       "Groups": ["Byte Array Logic"]
     },
     {
@@ -1569,7 +1593,7 @@
       "Returns": "B",
       "Cost": 4,
       "Size": 1,
-      "Doc": "X with all bits inverted",
+      "Doc": "A with all bits inverted",
       "Groups": ["Byte Array Logic"]
     },
     {
@@ -1579,7 +1603,7 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push a byte-array of length X, containing all zero bytes",
+      "Doc": "zero filled byte-array of length A",
       "Groups": ["Loading Values"]
     },
     {
@@ -1588,7 +1612,7 @@
       "Args": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "write bytes to log state of the current application",
+      "Doc": "write A to log state of the current application",
       "DocExtra": "`log` fails if called more than MaxLogCalls times in a program, or if the sum of logged bytes exceeds 1024 bytes.",
       "Groups": ["State Access"]
     },
@@ -1597,8 +1621,8 @@
       "Name": "itxn_begin",
       "Cost": 1,
       "Size": 1,
-      "Doc": "Begin preparation of a new inner transaction",
-      "DocExtra": "`itxn_begin` initializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid/LastValid to the values in the top-level transaction, and all other fields to zero values.",
+      "Doc": "begin preparation of a new inner transaction in a new transaction group",
+      "DocExtra": "`itxn_begin` initializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid/LastValid to the values in the invoking transaction, and all other fields to zero or empty values.",
       "Groups": ["Inner Transactions"]
     },
     {
@@ -1607,8 +1631,75 @@
       "Args": ".",
       "Cost": 1,
       "Size": 2,
-      "Doc": "Set field F of the current inner transaction to X",
-      "DocExtra": "`itxn_field` fails if X is of the wrong type for F, including a byte array of the wrong size for use as an address when F is an address field. `itxn_field` also fails if X is an account or asset that does not appear in `txn.Accounts` or `txn.ForeignAssets` of the top-level transaction. (Setting addresses in asset creation are exempted from this requirement.)",
+      "ArgEnum": [
+        "Sender",
+        "Fee",
+        "FirstValid",
+        "FirstValidTime",
+        "LastValid",
+        "Note",
+        "Lease",
+        "Receiver",
+        "Amount",
+        "CloseRemainderTo",
+        "VotePK",
+        "SelectionPK",
+        "VoteFirst",
+        "VoteLast",
+        "VoteKeyDilution",
+        "Type",
+        "TypeEnum",
+        "XferAsset",
+        "AssetAmount",
+        "AssetSender",
+        "AssetReceiver",
+        "AssetCloseTo",
+        "GroupIndex",
+        "TxID",
+        "ApplicationID",
+        "OnCompletion",
+        "ApplicationArgs",
+        "NumAppArgs",
+        "Accounts",
+        "NumAccounts",
+        "ApprovalProgram",
+        "ClearStateProgram",
+        "RekeyTo",
+        "ConfigAsset",
+        "ConfigAssetTotal",
+        "ConfigAssetDecimals",
+        "ConfigAssetDefaultFrozen",
+        "ConfigAssetUnitName",
+        "ConfigAssetName",
+        "ConfigAssetURL",
+        "ConfigAssetMetadataHash",
+        "ConfigAssetManager",
+        "ConfigAssetReserve",
+        "ConfigAssetFreeze",
+        "ConfigAssetClawback",
+        "FreezeAsset",
+        "FreezeAssetAccount",
+        "FreezeAssetFrozen",
+        "Assets",
+        "NumAssets",
+        "Applications",
+        "NumApplications",
+        "GlobalNumUint",
+        "GlobalNumByteSlice",
+        "LocalNumUint",
+        "LocalNumByteSlice",
+        "ExtraProgramPages",
+        "Nonparticipation",
+        "Logs",
+        "NumLogs",
+        "CreatedAssetID",
+        "CreatedApplicationID",
+        "LastLog",
+        "StateProofPK"
+      ],
+      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB",
+      "Doc": "set field F of the current inner transaction to A",
+      "DocExtra": "`itxn_field` fails if A is of the wrong type for F, including a byte array of the wrong size for use as an address when F is an address field. `itxn_field` also fails if A is an account, asset, or app that is not _available_, or an attempt is made extend an array field beyond the limit imposed by consensus parameters. (Addresses set into asset params of acfg transactions need not be _available_.)",
       "ImmediateNote": "{uint8 transaction field index}",
       "Groups": ["Inner Transactions"]
     },
@@ -1617,7 +1708,8 @@
       "Name": "itxn_submit",
       "Cost": 1,
       "Size": 1,
-      "Doc": "Execute the current inner transaction. Fail if 16 inner transactions have already been executed, or if the transaction itself fails.",
+      "Doc": "execute the current inner transaction group. Fail if executing this group would exceed the inner transaction limit, or if any transaction in the group fails.",
+      "DocExtra": "`itxn_submit` resets the current transaction so that it can not be resubmitted. A new `itxn_begin` is required to prepare another inner transaction.",
       "Groups": ["Inner Transactions"]
     },
     {
@@ -1626,7 +1718,74 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 2,
-      "Doc": "push field F of the last inner transaction to stack",
+      "ArgEnum": [
+        "Sender",
+        "Fee",
+        "FirstValid",
+        "FirstValidTime",
+        "LastValid",
+        "Note",
+        "Lease",
+        "Receiver",
+        "Amount",
+        "CloseRemainderTo",
+        "VotePK",
+        "SelectionPK",
+        "VoteFirst",
+        "VoteLast",
+        "VoteKeyDilution",
+        "Type",
+        "TypeEnum",
+        "XferAsset",
+        "AssetAmount",
+        "AssetSender",
+        "AssetReceiver",
+        "AssetCloseTo",
+        "GroupIndex",
+        "TxID",
+        "ApplicationID",
+        "OnCompletion",
+        "ApplicationArgs",
+        "NumAppArgs",
+        "Accounts",
+        "NumAccounts",
+        "ApprovalProgram",
+        "ClearStateProgram",
+        "RekeyTo",
+        "ConfigAsset",
+        "ConfigAssetTotal",
+        "ConfigAssetDecimals",
+        "ConfigAssetDefaultFrozen",
+        "ConfigAssetUnitName",
+        "ConfigAssetName",
+        "ConfigAssetURL",
+        "ConfigAssetMetadataHash",
+        "ConfigAssetManager",
+        "ConfigAssetReserve",
+        "ConfigAssetFreeze",
+        "ConfigAssetClawback",
+        "FreezeAsset",
+        "FreezeAssetAccount",
+        "FreezeAssetFrozen",
+        "Assets",
+        "NumAssets",
+        "Applications",
+        "NumApplications",
+        "GlobalNumUint",
+        "GlobalNumByteSlice",
+        "LocalNumUint",
+        "LocalNumByteSlice",
+        "ExtraProgramPages",
+        "Nonparticipation",
+        "Logs",
+        "NumLogs",
+        "CreatedAssetID",
+        "CreatedApplicationID",
+        "LastLog",
+        "StateProofPK"
+      ],
+      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB",
+      "Doc": "field F of the last inner transaction",
       "ImmediateNote": "{uint8 transaction field index}",
       "Groups": ["Inner Transactions"]
     },
@@ -1636,10 +1795,122 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 3,
-      "Doc": "push Ith value of the array field F of the last inner transaction to stack",
+      "ArgEnum": [
+        "ApplicationArgs",
+        "Accounts",
+        "Assets",
+        "Applications",
+        "Logs"
+      ],
+      "ArgEnumTypes": "BBUUB",
+      "Doc": "Ith value of the array field F of the last inner transaction",
       "ImmediateNote": "{uint8 transaction field index} {uint8 transaction field array index}",
       "Groups": ["Inner Transactions"]
     },
+    {
+      "Opcode": 182,
+      "Name": "itxn_next",
+      "Cost": 1,
+      "Size": 1,
+      "Doc": "begin preparation of a new inner transaction in the same transaction group",
+      "DocExtra": "`itxn_next` initializes the transaction exactly as `itxn_begin` does",
+      "Groups": ["Inner Transactions"]
+    },
+    {
+      "Opcode": 183,
+      "Name": "gitxn",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 3,
+      "ArgEnum": [
+        "Sender",
+        "Fee",
+        "FirstValid",
+        "FirstValidTime",
+        "LastValid",
+        "Note",
+        "Lease",
+        "Receiver",
+        "Amount",
+        "CloseRemainderTo",
+        "VotePK",
+        "SelectionPK",
+        "VoteFirst",
+        "VoteLast",
+        "VoteKeyDilution",
+        "Type",
+        "TypeEnum",
+        "XferAsset",
+        "AssetAmount",
+        "AssetSender",
+        "AssetReceiver",
+        "AssetCloseTo",
+        "GroupIndex",
+        "TxID",
+        "ApplicationID",
+        "OnCompletion",
+        "ApplicationArgs",
+        "NumAppArgs",
+        "Accounts",
+        "NumAccounts",
+        "ApprovalProgram",
+        "ClearStateProgram",
+        "RekeyTo",
+        "ConfigAsset",
+        "ConfigAssetTotal",
+        "ConfigAssetDecimals",
+        "ConfigAssetDefaultFrozen",
+        "ConfigAssetUnitName",
+        "ConfigAssetName",
+        "ConfigAssetURL",
+        "ConfigAssetMetadataHash",
+        "ConfigAssetManager",
+        "ConfigAssetReserve",
+        "ConfigAssetFreeze",
+        "ConfigAssetClawback",
+        "FreezeAsset",
+        "FreezeAssetAccount",
+        "FreezeAssetFrozen",
+        "Assets",
+        "NumAssets",
+        "Applications",
+        "NumApplications",
+        "GlobalNumUint",
+        "GlobalNumByteSlice",
+        "LocalNumUint",
+        "LocalNumByteSlice",
+        "ExtraProgramPages",
+        "Nonparticipation",
+        "Logs",
+        "NumLogs",
+        "CreatedAssetID",
+        "CreatedApplicationID",
+        "LastLog",
+        "StateProofPK"
+      ],
+      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB",
+      "Doc": "field F of the Tth transaction in the last inner group submitted",
+      "ImmediateNote": "{uint8 transaction group index} {uint8 transaction field index}",
+      "Groups": ["Inner Transactions"]
+    },
+    {
+      "Opcode": 184,
+      "Name": "gitxna",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 4,
+      "ArgEnum": [
+        "ApplicationArgs",
+        "Accounts",
+        "Assets",
+        "Applications",
+        "Logs"
+      ],
+      "ArgEnumTypes": "BBUUB",
+      "Doc": "Ith value of the array field F from the Tth transaction in the last inner group submitted",
+      "ImmediateNote": "{uint8 transaction group index} {uint8 transaction field index} {uint8 transaction field array index}",
+      "Groups": ["Inner Transactions"]
+    },
     {
       "Opcode": 192,
       "Name": "txnas",
@@ -1655,7 +1926,7 @@
         "Logs"
       ],
       "ArgEnumTypes": "BBUUB",
-      "Doc": "push Xth value of the array field F of the current transaction",
+      "Doc": "Ath value of the array field F of the current transaction",
       "ImmediateNote": "{uint8 transaction field index}",
       "Groups": ["Loading Values"]
     },
@@ -1674,7 +1945,7 @@
         "Logs"
       ],
       "ArgEnumTypes": "BBUUB",
-      "Doc": "push Xth value of the array field F from the Tth transaction in the current group",
+      "Doc": "Ath value of the array field F from the Tth transaction in the current group",
       "ImmediateNote": "{uint8 transaction group index} {uint8 transaction field index}",
       "Groups": ["Loading Values"]
     },
@@ -1693,7 +1964,7 @@
         "Logs"
       ],
       "ArgEnumTypes": "BBUUB",
-      "Doc": "pop an index A and an index B. push Bth value of the array field F from the Ath transaction in the current group",
+      "Doc": "Bth value of the array field F from the Ath transaction in the current group",
       "ImmediateNote": "{uint8 transaction field index}",
       "Groups": ["Loading Values"]
     },
@@ -1704,8 +1975,40 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push Xth LogicSig argument to stack",
+      "Doc": "Ath LogicSig argument",
+      "Groups": ["Loading Values"]
+    },
+    {
+      "Opcode": 196,
+      "Name": "gloadss",
+      "Args": "UU",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 1,
+      "Doc": "Bth scratch space value of the Ath transaction in the current group",
       "Groups": ["Loading Values"]
+    },
+    {
+      "Opcode": 197,
+      "Name": "itxnas",
+      "Args": "U",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 2,
+      "Doc": "Ath value of the array field F of the last inner transaction",
+      "ImmediateNote": "{uint8 transaction field index}",
+      "Groups": ["Inner Transactions"]
+    },
+    {
+      "Opcode": 198,
+      "Name": "gitxnas",
+      "Args": "U",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 3,
+      "Doc": "Ath value of the array field F from the Tth transaction in the last inner group submitted",
+      "ImmediateNote": "{uint8 transaction group index} {uint8 transaction field index}",
+      "Groups": ["Inner Transactions"]
     }
   ]
 }
diff --git a/src/makeTxn.ts b/src/makeTxn.ts
index 150d916..d402db7 100644
--- a/src/makeTxn.ts
+++ b/src/makeTxn.ts
@@ -141,8 +141,8 @@ export function makePaymentTxnWithSuggestedParamsFromObject(
  *
  * @param from - string representation of Algorand address of sender
  * @param note - uint8array of arbitrary data for sender to store
- * @param voteKey - string representation of voting key. for key deregistration, leave undefined
- * @param selectionKey - string representation of selection key. for key deregistration, leave undefined
+ * @param voteKey - voting key. for key deregistration, leave undefined
+ * @param selectionKey - selection key. for key deregistration, leave undefined
  * @param voteFirst - first round on which voteKey is valid
  * @param voteLast - last round on which voteKey is valid
  * @param voteKeyDilution - integer
@@ -157,6 +157,7 @@ export function makePaymentTxnWithSuggestedParamsFromObject(
  * @param rekeyTo - rekeyTo address, optional
  * @param nonParticipation - configure whether the address wants to stop participating. If true,
  *   voteKey, selectionKey, voteFirst, voteLast, and voteKeyDilution must be undefined.
+ * @param stateProofKey - state proof key. for key deregistration, leave undefined
  */
 export function makeKeyRegistrationTxnWithSuggestedParams(
   from: KeyRegistrationTxn['from'],
@@ -168,7 +169,8 @@ export function makeKeyRegistrationTxnWithSuggestedParams(
   voteKeyDilution: KeyRegistrationTxn['voteKeyDilution'],
   suggestedParams: MustHaveSuggestedParams<KeyRegistrationTxn>['suggestedParams'],
   rekeyTo?: KeyRegistrationTxn['reKeyTo'],
-  nonParticipation?: false
+  nonParticipation?: false,
+  stateProofKey?: KeyRegistrationTxn['stateProofKey']
 ): txnBuilder.Transaction;
 export function makeKeyRegistrationTxnWithSuggestedParams(
   from: KeyRegistrationTxn['from'],
@@ -180,7 +182,8 @@ export function makeKeyRegistrationTxnWithSuggestedParams(
   voteKeyDilution: undefined,
   suggestedParams: MustHaveSuggestedParams<KeyRegistrationTxn>['suggestedParams'],
   rekeyTo?: KeyRegistrationTxn['reKeyTo'],
-  nonParticipation?: true
+  nonParticipation?: true,
+  stateProofKey?: undefined
 ): txnBuilder.Transaction;
 export function makeKeyRegistrationTxnWithSuggestedParams(
   from: any,
@@ -192,7 +195,8 @@ export function makeKeyRegistrationTxnWithSuggestedParams(
   voteKeyDilution: any,
   suggestedParams: any,
   rekeyTo?: any,
-  nonParticipation = false
+  nonParticipation = false,
+  stateProofKey: any = undefined
 ) {
   const o: KeyRegistrationTxn = {
     from,
@@ -206,6 +210,7 @@ export function makeKeyRegistrationTxnWithSuggestedParams(
     type: TransactionType.keyreg,
     reKeyTo: rekeyTo,
     nonParticipation,
+    stateProofKey,
   };
   return new txnBuilder.Transaction(o);
 }
@@ -222,14 +227,15 @@ export function makeKeyRegistrationTxnWithSuggestedParams(
  * @param note - uint8array of arbitrary data for sender to store
  * @param genesisHash - string specifies hash genesis block of network in use
  * @param genesisID - string specifies genesis ID of network in use
- * @param voteKey - string representation of voting key. for key deregistration, leave undefined
- * @param selectionKey - string representation of selection key. for key deregistration, leave undefined
+ * @param voteKey - voting key. for key deregistration, leave undefined
+ * @param selectionKey - selection key. for key deregistration, leave undefined
  * @param voteFirst - first round on which voteKey is valid
  * @param voteLast - last round on which voteKey is valid
  * @param voteKeyDilution - integer
  * @param rekeyTo - rekeyTo address, optional
  * @param nonParticipation - configure whether the address wants to stop participating. If true,
  *   voteKey, selectionKey, voteFirst, voteLast, and voteKeyDilution must be undefined.
+ * @param stateProofKey - state proof key. for key deregistration, leave undefined
  * @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
  */
 export function makeKeyRegistrationTxn(
@@ -246,7 +252,8 @@ export function makeKeyRegistrationTxn(
   voteLast: KeyRegistrationTxn['voteLast'],
   voteKeyDilution: KeyRegistrationTxn['voteKeyDilution'],
   rekeyTo?: KeyRegistrationTxn['reKeyTo'],
-  nonParticipation?: false
+  nonParticipation?: false,
+  stateProofKey?: KeyRegistrationTxn['stateProofKey']
 ): txnBuilder.Transaction;
 export function makeKeyRegistrationTxn(
   from: KeyRegistrationTxn['from'],
@@ -262,7 +269,8 @@ export function makeKeyRegistrationTxn(
   voteLast: undefined,
   voteKeyDilution: undefined,
   rekeyTo?: KeyRegistrationTxn['reKeyTo'],
-  nonParticipation?: true
+  nonParticipation?: true,
+  stateProofKey?: undefined
 ): txnBuilder.Transaction;
 export function makeKeyRegistrationTxn(
   from: any,
@@ -278,7 +286,8 @@ export function makeKeyRegistrationTxn(
   voteLast: any,
   voteKeyDilution: any,
   rekeyTo?: any,
-  nonParticipation: any = false
+  nonParticipation: any = false,
+  stateProofKey: any = undefined
 ) {
   const suggestedParams: SuggestedParams = {
     genesisHash,
@@ -297,7 +306,8 @@ export function makeKeyRegistrationTxn(
     voteKeyDilution,
     suggestedParams,
     rekeyTo,
-    nonParticipation
+    nonParticipation,
+    stateProofKey
   );
 }
 
@@ -313,6 +323,7 @@ export function makeKeyRegistrationTxnWithSuggestedParamsFromObject(
     | 'note'
     | 'voteKey'
     | 'selectionKey'
+    | 'stateProofKey'
     | 'voteFirst'
     | 'voteLast'
     | 'voteKeyDilution'
@@ -345,7 +356,8 @@ export function makeKeyRegistrationTxnWithSuggestedParamsFromObject(o: any) {
     o.voteKeyDilution,
     o.suggestedParams,
     o.rekeyTo,
-    o.nonParticipation
+    o.nonParticipation,
+    o.stateProofKey
   );
 }
 
diff --git a/src/transaction.ts b/src/transaction.ts
index 37035a3..10825a4 100644
--- a/src/transaction.ts
+++ b/src/transaction.ts
@@ -7,6 +7,7 @@ import {
   OnApplicationComplete,
   TransactionParams,
   TransactionType,
+  isTransactionType,
 } from './types/transactions/base';
 import AnyTransaction, {
   MustHaveSuggestedParams,
@@ -27,6 +28,9 @@ const ALGORAND_TRANSACTION_LEASE_LABEL_LENGTH = 5;
 const ALGORAND_TRANSACTION_ADDRESS_LENGTH = 32;
 const ALGORAND_TRANSACTION_REKEY_LABEL_LENGTH = 5;
 const ASSET_METADATA_HASH_LENGTH = 32;
+const KEYREG_VOTE_KEY_LENGTH = 32;
+const KEYREG_SELECTION_KEY_LENGTH = 32;
+const KEYREG_STATE_PROOF_KEY_LENGTH = 64;
 
 type AnyTransactionWithParams = MustHaveSuggestedParams<AnyTransaction>;
 type AnyTransactionWithParamsInline = MustHaveSuggestedParamsInline<AnyTransaction>;
@@ -45,6 +49,7 @@ interface TransactionStorageStructure
     | 'closeRemainderTo'
     | 'voteKey'
     | 'selectionKey'
+    | 'stateProofKey'
     | 'assetManager'
     | 'assetReserve'
     | 'assetFreeze'
@@ -68,6 +73,7 @@ interface TransactionStorageStructure
   closeRemainderTo?: string | Address;
   voteKey: string | Buffer;
   selectionKey: string | Buffer;
+  stateProofKey: string | Buffer;
   voteFirst: number;
   voteLast: number;
   voteKeyDilution: number;
@@ -106,6 +112,34 @@ interface TransactionStorageStructure
   extraPages?: number;
 }
 
+function getKeyregKey(
+  input: undefined | string | Uint8Array | Buffer,
+  inputName: string,
+  length: number
+): Buffer | undefined {
+  if (input == null) {
+    return undefined;
+  }
+
+  let inputAsBuffer: Buffer | undefined;
+
+  if (typeof input === 'string') {
+    inputAsBuffer = Buffer.from(input, 'base64');
+  } else if (input.constructor === Uint8Array) {
+    inputAsBuffer = Buffer.from(input);
+  } else if (Buffer.isBuffer(input)) {
+    inputAsBuffer = input;
+  }
+
+  if (inputAsBuffer == null || inputAsBuffer.byteLength !== length) {
+    throw Error(
+      `${inputName} must be a ${length} byte Uint8Array or Buffer or base64 string.`
+    );
+  }
+
+  return inputAsBuffer;
+}
+
 /**
  * Transaction enables construction of Algorand transactions
  * */
@@ -127,6 +161,7 @@ export class Transaction implements TransactionStorageStructure {
   closeRemainderTo?: Address;
   voteKey: Buffer;
   selectionKey: Buffer;
+  stateProofKey: Buffer;
   voteFirst: number;
   voteLast: number;
   voteKeyDilution: number;
@@ -426,18 +461,24 @@ export class Transaction implements TransactionStorageStructure {
     } else {
       txn.lease = new Uint8Array(0);
     }
-    if (typeof txn.voteKey !== 'undefined') {
-      txn.voteKey = Buffer.from(txn.voteKey as string, 'base64');
-    }
-    if (txn.selectionKey !== undefined) {
-      txn.selectionKey = Buffer.from(txn.selectionKey as string, 'base64');
-    }
+    txn.voteKey = getKeyregKey(txn.voteKey, 'voteKey', KEYREG_VOTE_KEY_LENGTH);
+    txn.selectionKey = getKeyregKey(
+      txn.selectionKey,
+      'selectionKey',
+      KEYREG_SELECTION_KEY_LENGTH
+    );
+    txn.stateProofKey = getKeyregKey(
+      txn.stateProofKey,
+      'stateProofKey',
+      KEYREG_STATE_PROOF_KEY_LENGTH
+    );
     // Checking non-participation key registration
     if (
       txn.nonParticipation &&
       (txn.voteKey ||
         txn.selectionKey ||
         txn.voteFirst ||
+        txn.stateProofKey ||
         txn.voteLast ||
         txn.voteKeyDilution)
     ) {
@@ -450,6 +491,7 @@ export class Transaction implements TransactionStorageStructure {
       !txn.nonParticipation &&
       (txn.voteKey ||
         txn.selectionKey ||
+        txn.stateProofKey ||
         txn.voteFirst ||
         txn.voteLast ||
         txn.voteKeyDilution) &&
@@ -460,6 +502,7 @@ export class Transaction implements TransactionStorageStructure {
         txn.voteLast &&
         txn.voteKeyDilution
       )
+      // stateProofKey not included here for backwards compatibility
     ) {
       throw new Error(
         'online key registration missing at least one of the following fields: ' +
@@ -541,6 +584,7 @@ export class Transaction implements TransactionStorageStructure {
         grp: this.group,
         votekey: this.voteKey,
         selkey: this.selectionKey,
+        sprfkey: this.stateProofKey,
         votefst: this.voteFirst,
         votelst: this.voteLast,
         votekd: this.voteKeyDilution,
@@ -560,6 +604,7 @@ export class Transaction implements TransactionStorageStructure {
       }
       if (!txn.selkey) delete txn.selkey;
       if (!txn.votekey) delete txn.votekey;
+      if (!txn.sprfkey) delete txn.sprfkey;
       if (!txn.votefst) delete txn.votefst;
       if (!txn.votelst) delete txn.votelst;
       if (!txn.votekd) delete txn.votekd;
@@ -787,12 +832,15 @@ export class Transaction implements TransactionStorageStructure {
 
   // eslint-disable-next-line camelcase
   static from_obj_for_encoding(txnForEnc: EncodedTransaction): Transaction {
-    const txn = Object.create(this.prototype);
+    const txn = Object.create(this.prototype) as Transaction;
     txn.name = 'Transaction';
     txn.tag = Buffer.from('TX');
 
     txn.genesisID = txnForEnc.gen;
     txn.genesisHash = Buffer.from(txnForEnc.gh);
+    if (!isTransactionType(txnForEnc.type)) {
+      throw new Error(`Unrecognized transaction type: ${txnForEnc.type}`);
+    }
     txn.type = txnForEnc.type;
     txn.fee = txnForEnc.fee;
     txn.firstRound = txnForEnc.fv;
@@ -824,6 +872,9 @@ export class Transaction implements TransactionStorageStructure {
       if (txnForEnc.selkey !== undefined) {
         txn.selectionKey = Buffer.from(txnForEnc.selkey);
       }
+      if (txnForEnc.sprfkey !== undefined) {
+        txn.stateProofKey = Buffer.from(txnForEnc.sprfkey);
+      }
       if (txnForEnc.votekd !== undefined) {
         txn.voteKeyDilution = txnForEnc.votekd;
       }
diff --git a/src/types/transactions/base.ts b/src/types/transactions/base.ts
index 8f33146..739c88e 100644
--- a/src/types/transactions/base.ts
+++ b/src/types/transactions/base.ts
@@ -1,7 +1,7 @@
 /**
  * Enum for application transaction types.
  *
- * The full list is availabe at https://developer.algorand.org/docs/reference/transactions/
+ * The full list is available at https://developer.algorand.org/docs/reference/transactions/
  */
 export enum TransactionType {
   /**
@@ -35,6 +35,17 @@ export enum TransactionType {
   appl = 'appl',
 }
 
+export function isTransactionType(s: string): s is TransactionType {
+  return (
+    s === TransactionType.pay ||
+    s === TransactionType.keyreg ||
+    s === TransactionType.acfg ||
+    s === TransactionType.axfer ||
+    s === TransactionType.afrz ||
+    s === TransactionType.appl
+  );
+}
+
 /**
  * Enums for application transactions on-transaction-complete behavior
  */
@@ -177,14 +188,19 @@ export interface TransactionParams {
   closeRemainderTo?: string;
 
   /**
-   * String representation of voting key. For key deregistration, leave undefined
+   * Voting key bytes. For key deregistration, leave undefined
+   */
+  voteKey: Uint8Array | string;
+
+  /**
+   *Selection key bytes. For key deregistration, leave undefined
    */
-  voteKey: string;
+  selectionKey: Uint8Array | string;
 
   /**
-   * String representation of selection key. For key deregistration, leave undefined
+   * State proof key bytes. For key deregistration, leave undefined
    */
-  selectionKey: string;
+  stateProofKey: Uint8Array | string;
 
   /**
    * First round on which voteKey is valid
diff --git a/src/types/transactions/encoded.ts b/src/types/transactions/encoded.ts
index 80438ca..bc5b9e9 100644
--- a/src/types/transactions/encoded.ts
+++ b/src/types/transactions/encoded.ts
@@ -182,6 +182,11 @@ export interface EncodedTransaction {
    */
   selkey?: Buffer;
 
+  /**
+   * stateProofKey
+   */
+  sprfkey?: Buffer;
+
   /**
    * voteFirst
    */
diff --git a/src/types/transactions/keyreg.ts b/src/types/transactions/keyreg.ts
index a973143..8856849 100644
--- a/src/types/transactions/keyreg.ts
+++ b/src/types/transactions/keyreg.ts
@@ -5,6 +5,7 @@ type SpecificParameters = Pick<
   TransactionParams,
   | 'voteKey'
   | 'selectionKey'
+  | 'stateProofKey'
   | 'voteFirst'
   | 'voteLast'
   | 'voteKeyDilution'


Test patch:
diff --git a/tests/8.LogicSig.ts b/tests/8.LogicSig.ts
index 0eb61d6..9947ac3 100644
--- a/tests/8.LogicSig.ts
+++ b/tests/8.LogicSig.ts
@@ -1100,5 +1100,30 @@ describe('Program validation', () => {
       // byte "a"; byte "b"; byte "c"; cover 2; uncover 2; concat; concat; log; int 1
       assert.ok(logic.checkProgram(program));
     });
+    it('should support TEAL v6 opcodes', () => {
+      assert.ok(logic.langspecEvalMaxVersion >= 6);
+
+      // bsqrt op
+      let program = new Uint8Array(Buffer.from('068001909680010ca8', 'hex'));
+      // byte 0x90; bsqrt; byte 0x0c; b==
+      assert.ok(logic.checkProgram(program));
+
+      // divw op
+      program = new Uint8Array(
+        Buffer.from(
+          '06810981ecffffffffffffffff01810a9781feffffffffffffffff0112',
+          'hex'
+        )
+      );
+      //  int 9; int 18446744073709551596; int 10; divw; int 18446744073709551614; ==
+      assert.ok(logic.checkProgram(program));
+
+      // txn fields
+      program = new Uint8Array(
+        Buffer.from('06313f1581401233003e15810a1210', 'hex')
+      );
+      // txn StateProofPK; len; int 64; ==; gtxn 0 LastLog; len; int 10; ==; &&
+      assert.ok(logic.checkProgram(program));
+    });
   });
 });
diff --git a/tests/cucumber/steps/steps.js b/tests/cucumber/steps/steps.js
index 05ad595..673ddfd 100644
--- a/tests/cucumber/steps/steps.js
+++ b/tests/cucumber/steps/steps.js
@@ -981,6 +981,63 @@ module.exports = function getSteps(options) {
     }
   });
 
+  Given(
+    'default V2 key registration transaction {string}',
+    async function (type) {
+      const voteKey = makeUint8Array(
+        Buffer.from('9mr13Ri8rFepxN3ghIUrZNui6LqqM5hEzB45Rri5lkU=', 'base64')
+      );
+      const selectionKey = makeUint8Array(
+        Buffer.from('dx717L3uOIIb/jr9OIyls1l5Ei00NFgRa380w7TnPr4=', 'base64')
+      );
+      const stateProofKey = makeUint8Array(
+        Buffer.from(
+          'mYR0GVEObMTSNdsKM6RwYywHYPqVDqg3E4JFzxZOreH9NU8B+tKzUanyY8AQ144hETgSMX7fXWwjBdHz6AWk9w==',
+          'base64'
+        )
+      );
+
+      const from = this.accounts[0];
+      this.pk = from;
+
+      const result = await this.acl.getTransactionParams();
+      const suggestedParams = {
+        fee: result.fee,
+        firstRound: result.lastRound + 1,
+        lastRound: result.lastRound + 1000,
+        genesisHash: result.genesishashb64,
+        genesisID: result.genesisID,
+      };
+      this.lastRound = result.lastRound;
+
+      if (type === 'online') {
+        this.txn = algosdk.makeKeyRegistrationTxnWithSuggestedParamsFromObject({
+          from,
+          voteKey,
+          selectionKey,
+          stateProofKey,
+          voteFirst: 1,
+          voteLast: 2000,
+          voteKeyDilution: 10,
+          suggestedParams,
+        });
+      } else if (type === 'offline') {
+        this.txn = algosdk.makeKeyRegistrationTxnWithSuggestedParamsFromObject({
+          from,
+          suggestedParams,
+        });
+      } else if (type === 'nonparticipation') {
+        this.txn = algosdk.makeKeyRegistrationTxnWithSuggestedParamsFromObject({
+          from,
+          nonParticipation: true,
+          suggestedParams,
+        });
+      } else {
+        throw new Error(`Unrecognized keyreg type: ${type}`);
+      }
+    }
+  );
+
   When(
     'I get recent transactions, limited by {int} transactions',
     function (int) {
@@ -3689,22 +3746,6 @@ module.exports = function getSteps(options) {
     }
   );
 
-  Given(
-    'suggested transaction parameters fee {int}, flat-fee {string}, first-valid {int}, last-valid {int}, genesis-hash {string}, genesis-id {string}',
-    function (fee, flatFee, firstRound, lastRound, genesisHash, genesisID) {
-      assert.ok(['true', 'false'].includes(flatFee));
-
-      this.suggestedParams = {
-        flatFee: flatFee === 'true',
-        fee,
-        firstRound,
-        lastRound,
-        genesisID,
-        genesisHash,
-      };
-    }
-  );
-
   Given(
     'suggested transaction parameters from the algod v2 client',
     async function () {
@@ -3772,6 +3813,52 @@ module.exports = function getSteps(options) {
     }
   );
 
+  Given(
+    'suggested transaction parameters fee {int}, flat-fee {string}, first-valid {int}, last-valid {int}, genesis-hash {string}, genesis-id {string}',
+    function (fee, flatFee, firstRound, lastRound, genesisHash, genesisID) {
+      assert.ok(['true', 'false'].includes(flatFee));
+
+      this.suggestedParams = {
+        flatFee: flatFee === 'true',
+        fee,
+        firstRound,
+        lastRound,
+        genesisID,
+        genesisHash,
+      };
+    }
+  );
+
+  When(
+    'I build a keyreg transaction with sender {string}, nonparticipation {string}, vote first {int}, vote last {int}, key dilution {int}, vote public key {string}, selection public key {string}, and state proof public key {string}',
+    function (
+      sender,
+      nonpart,
+      voteFirst,
+      voteLast,
+      keyDilution,
+      votePk,
+      selectionPk,
+      stateProofPk
+    ) {
+      assert.ok(['true', 'false'].includes(nonpart));
+
+      this.txn = algosdk.makeKeyRegistrationTxnWithSuggestedParams(
+        sender,
+        undefined,
+        votePk.length ? votePk : undefined,
+        selectionPk.length ? selectionPk : undefined,
+        voteFirst,
+        voteLast,
+        keyDilution,
+        this.suggestedParams,
+        undefined,
+        nonpart === 'true',
+        stateProofPk.length ? stateProofPk : undefined
+      );
+    }
+  );
+
   function operationStringToEnum(inString) {
     switch (inString) {
       case 'noop':