Repository: algorand/js-algorand-sdk
Pull request #452 (2021-10-04 18:41:58)

DO NOT MERGE: v1.12.0 release
# 1.12.0

## Added

- Support AVM 1.0
- Support deserializing nonparticipating and offline keyreg
- Support deserializing nonparticipating transaction

## Fixed

- Key registration transaction with nonParticipation=true


Patch:
diff --git a/.travis.yml b/.travis.yml
index dd1698e..818b9d8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,9 +42,3 @@ jobs:
         local_dir: docs
         github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
       before_deploy: touch docs/.nojekyll
-
-env:
-  global:
-    - secure: CcCQWOq/afdYwF1RvF8tAkiXVRSgv0LDJC+74ER0YXgJTb6yVScMl5mFJzbUqTbZB5jeRNvw570VJF6PdKwKeiI7STgd0WkwuFMNgkFXFly/ADIGcSuueUozfR/7oBPaoG2yeLpPF9vt18Ci7pWQr27YGTeJCnAE/M6rZfhKp7Jcgts3bjrIwVCiPwmgv8acj3I1jwfwuyUzfD7Gcj7FwSGN9gwhEKFDDA+ImOxfK/C68xL8JWrJnGZqnMyAe6IISa9swozWRR5h0ILufOBh1lhsR8MTTW8IjY8LblFO18DzhD+kcdq77Ij5EhWLbcdcwvxASI5Wyhpt+O4BJVgC/XMCTBcQ4Zk8M5ZrNpfwFd3j74f4URxtTnuI0cNLE/qKXmGpATL6OlTjV5RSmhv2bM0L9d5UIhIW3OBF8ZUXuX1peCUw7O6nXuChYtxy7F/bZAZxCtZZ6qxQIpHT13zKilBHFwuuWvakgCDEK2WilId76Os8uJJ6t5JSMYxV2Y6GmtC0d+Wv11ys0aih2pPwoybVnYiVdxpd+ik1voyPSjQGF1BELcnQso3Jjc6kR0smi3MPgHoo5MPyGdNDE2GOlISxb5ke+hPgHYo3BrE3xPmDxv9fUxBuDnyEukuQVWAX0Xly2Ao5ZncTZOoD3/qpsTlpax7e2o4/1Fz0s6IIWDI=
-    - secure: A6OgcX3TY0ULXjht+lhLSQ6AcBNnzGrC4UiO4YPwx07DPDbFNbHW04JtT6OJhQOdXPHQDkhtipsMgti8Gc1A9qq5uSfn9W1akYY4Yrgh0/sOLcLYsJe8veW6WKA4ERsdVkLTJiT6BfDoCffW/Mv+1wdJ+qLn1dX/uZ8Qf95hTtN9JHe2FWBTfAfR70DnhrJ2kmeedrpyMXM/r8gqPWMzpnhNZhY2O7NscE8sITBzXwCT27pygd6pAx7gTzbnbj//E40FvqP9b9nMTv9SNaiLMnaGsj0MKCVVrRlh4+kbK2z/mqRuJPDXkAwbTre01IAJrvtCRGq6cUex0H/MVAvFRQhWkJViQHYb/5Qt5brgisAvSr7XcHryTH4b89feRVXZkpFFNefq0AmcTws1VKohyZ6t5i0etSGH0XZM8v6yOWAcRsJWjfXcdanwM1rTamzmSAVmWyyQVgGvXZIb1ftXb5WzaJh6UwWhL7JGA7BQsFhN8XSqLOZW9RCRC1V1owhzld+DSc+aGWxeh0K583kK0XHORL/6hltveznU9tDzVA5IQzwKpwVDaxwXxv5Hhe0w5axwIP6QvFywSoHO1MvTvAxUsjRczaXjlA0derfZ3XOhOnGtLmxun/PexAnEHGHx9r0m+wcIVr3z1bPyWYJeecsujiyu4o1s9vX3IQ/TgGc=
-    - secure: pP8dXqcLhdqSlkeQuYupbEXzMgd6O/9og5ZNVlLt7hwa1AcyLdqGjIdRoWmxIxzvevxw0kliIa8bcEZC+rw7KeQxSPKC20vGN/WrU9DCE93uExoom7y1/WOJs6THtBUtguM6uQ43gdji6ExGfd26rkwIGwRvh2rIFi02be6s9lT3PdEpuozQWANmb9kyr2PA+X9jPBiQkHH7F2y3GWsMrJ14mIQi1+iCAeJ+mCmR3LZ7z/+k71OWO4beMGFUmYpOajrtpuxTaBFTxN4zfJBDtassfpSnceNV4AwHC3RPK51gZ7IrA2DqOGYifhASYQWL3FPkipszdoje4mWa9ohDZDVxRD2xBVu8mIlsZxlFkrvnf1yzST+X7788cUWbWOxEirFRL1KQax+JyGjq8CWklmwXmA1uSuqaCGyZicc1jC7DP2VtZO65IQEMfLG3s1BD0sDm/Y4fSq+wN1OF6DUPcTymckXwdXYJ1i33F3PZqqpxnfYvG9FEXBSwbTN3I/rE5d2xHWxUcAvtazehWHOk0Com8yB2OCI6slCBLUwh+N4EY12MZZ/grX135aKcLmvgLQeRVyhTzLXWfSFleB+uxRXEBPe7tLRCj/p0YA6MtpULrkVO7KhMp1YXw9gsfQIxR7eroZPteVdFSZ+aqASvvPyf8MVi3WR69q6LoNtfmFE=
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 58638f1..dddbc00 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,15 @@
+# 1.12.0
+
+## Added
+
+- Support AVM 1.0
+- Support deserializing nonparticipating and offline keyreg
+- Support deserializing nonparticipating transaction
+
+## Fixed
+
+- Key registration transaction with nonParticipation=true
+
 # 1.11.1
 
 ## Fixed
diff --git a/FAQ.md b/FAQ.md
index 019b4cc..1d44239 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -9,3 +9,13 @@ In prior versions, the browser bundles were made available in the `dist` directo
 ## Can I host the browser bundle myself?
 
 Yes! If you would instead prefer to host the package yourself, a minified browser bundle can be found in the `dist/browser/` folder of the published npm package starting with version 1.9.0.
+
+## How do I generate the SRI hash of `algosdk.min.js`?
+
+The SRI hash of `algosdk.min.js` is the base64 string after `sha384-` in the `integrity` attribute of the `<script>` tag used to import `algosdk.min.js`.
+See the [instructions to import algosdk in browser](./README.md#Browser).
+It can be computed as follows after [building the project](./README.md#building):
+
+```bash
+cat dist/browser/algosdk.min.js | openssl dgst -sha384 -binary | openssl base64 -A
+```
diff --git a/Makefile b/Makefile
index afe70db..35cba15 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 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.responses.231 or @unit.feetest" 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.responses.231 or @unit.feetest or @unit.indexer.logs" 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 @template or @indexer or @rekey or @dryrun or @compile or @applications or @indexer.applications or @applications.verified or @indexer.231" tests/cucumber/features --require-module ts-node/register --require tests/cucumber/steps/index.js
 
diff --git a/README.md b/README.md
index c155b51..faa5869 100644
--- a/README.md
+++ b/README.md
@@ -19,13 +19,24 @@ $ npm install algosdk
 Include a minified browser bundle directly in your HTML like so:
 
 ```html
-<script src="https://unpkg.com/algosdk@latest" />
-<!-- or https://cdn.jsdelivr.net/npm/algosdk@latest -->
+<script
+  src="https://unpkg.com/algosdk@1.12.0/dist/browser/algosdk.min.js"
+  integrity="sha384-N6rRZtVTe4Rvktk9jRWB/jo+NHuNpd2Uh87V0GndIMZbWkKKZZfn1FuzORyMypsZ"
+  crossorigin="anonymous"
+></script>
 ```
 
-> In production, it's recommended to pin a specific version instead of using `latest`.
+or
 
-Information about hosting the package for yourself or finding the browser bundles of previous versions is [available here](FAQ.md).
+```html
+<script
+  src="https://cdn.jsdelivr.net/npm/algosdk@1.12.0/dist/browser/algosdk.min.js"
+  integrity="sha384-N6rRZtVTe4Rvktk9jRWB/jo+NHuNpd2Uh87V0GndIMZbWkKKZZfn1FuzORyMypsZ"
+  crossorigin="anonymous"
+></script>
+```
+
+Information about hosting the package for yourself, finding the browser bundles of previous versions, and computing the SRI hash is [available here](FAQ.md).
 
 ## Quick Start
 
@@ -33,10 +44,10 @@ Information about hosting the package for yourself or finding the browser bundle
 const token = 'Your algod API token';
 const server = 'http://127.0.0.1';
 const port = 8080;
-const client = new algosdk.Algod(token, server, port);
+const client = new algosdk.Algodv2(token, server, port);
 
 (async () => {
-  console.log(await client.status());
+  console.log(await client.status().do());
 })().catch((e) => {
   console.log(e);
 });
diff --git a/package-lock.json b/package-lock.json
index a0d824a..577d2a9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "algosdk",
-  "version": "1.11.1",
+  "version": "1.12.0",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "algosdk",
-      "version": "1.11.0",
+      "version": "1.12.0",
       "license": "MIT",
       "dependencies": {
         "algo-msgpack-with-bigint": "^2.1.1",
@@ -28,7 +28,7 @@
         "@typescript-eslint/eslint-plugin": "^4.26.1",
         "@typescript-eslint/parser": "^4.26.1",
         "assert": "^2.0.0",
-        "chromedriver": "^91.0.0",
+        "chromedriver": "^93.0.1",
         "concurrently": "^6.2.0",
         "coveralls": "^3.1.0",
         "cucumber": "^5.1.0",
@@ -1157,12 +1157,12 @@
       "dev": true
     },
     "node_modules/axios": {
-      "version": "0.21.1",
-      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
-      "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
+      "version": "0.21.4",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
+      "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
       "dev": true,
       "dependencies": {
-        "follow-redirects": "^1.10.0"
+        "follow-redirects": "^1.14.0"
       }
     },
     "node_modules/balanced-match": {
@@ -1521,14 +1521,14 @@
       }
     },
     "node_modules/chromedriver": {
-      "version": "91.0.0",
-      "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-91.0.0.tgz",
-      "integrity": "sha512-0eQGLDWvfVd1apkqQpt4452bCATrsj50whhVzMqPiazNSfCXXwfYWRonYxx3DVFCG3+RwSCLvsk8/vpuojCyJA==",
+      "version": "93.0.1",
+      "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-93.0.1.tgz",
+      "integrity": "sha512-KDzbW34CvQLF5aTkm3b5VdlTrvdIt4wEpCzT2p4XJIQWQZEPco5pNce7Lu9UqZQGkhQ4mpZt4Ky6NKVyIS2N8A==",
       "dev": true,
       "hasInstallScript": true,
       "dependencies": {
         "@testim/chrome-version": "^1.0.7",
-        "axios": "^0.21.1",
+        "axios": "^0.21.2",
         "del": "^6.0.0",
         "extract-zip": "^2.0.1",
         "https-proxy-agent": "^5.0.0",
@@ -3252,9 +3252,9 @@
       "dev": true
     },
     "node_modules/follow-redirects": {
-      "version": "1.14.1",
-      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz",
-      "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==",
+      "version": "1.14.4",
+      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
+      "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==",
       "dev": true,
       "funding": [
         {
@@ -9333,12 +9333,12 @@
       "dev": true
     },
     "axios": {
-      "version": "0.21.1",
-      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
-      "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
+      "version": "0.21.4",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
+      "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
       "dev": true,
       "requires": {
-        "follow-redirects": "^1.10.0"
+        "follow-redirects": "^1.14.0"
       }
     },
     "balanced-match": {
@@ -9602,13 +9602,13 @@
       "dev": true
     },
     "chromedriver": {
-      "version": "91.0.0",
-      "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-91.0.0.tgz",
-      "integrity": "sha512-0eQGLDWvfVd1apkqQpt4452bCATrsj50whhVzMqPiazNSfCXXwfYWRonYxx3DVFCG3+RwSCLvsk8/vpuojCyJA==",
+      "version": "93.0.1",
+      "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-93.0.1.tgz",
+      "integrity": "sha512-KDzbW34CvQLF5aTkm3b5VdlTrvdIt4wEpCzT2p4XJIQWQZEPco5pNce7Lu9UqZQGkhQ4mpZt4Ky6NKVyIS2N8A==",
       "dev": true,
       "requires": {
         "@testim/chrome-version": "^1.0.7",
-        "axios": "^0.21.1",
+        "axios": "^0.21.2",
         "del": "^6.0.0",
         "extract-zip": "^2.0.1",
         "https-proxy-agent": "^5.0.0",
@@ -10992,9 +10992,9 @@
       "dev": true
     },
     "follow-redirects": {
-      "version": "1.14.1",
-      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz",
-      "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==",
+      "version": "1.14.4",
+      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
+      "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==",
       "dev": true
     },
     "foreach": {
diff --git a/package.json b/package.json
index 2a79f91..b0a25fa 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "algosdk",
-  "version": "1.11.1",
+  "version": "1.12.0",
   "description": "The official JavaScript SDK for Algorand",
   "main": "dist/cjs/index.js",
   "module": "dist/esm/index.js",
@@ -36,7 +36,7 @@
     "@typescript-eslint/eslint-plugin": "^4.26.1",
     "@typescript-eslint/parser": "^4.26.1",
     "assert": "^2.0.0",
-    "chromedriver": "^91.0.0",
+    "chromedriver": "^93.0.1",
     "concurrently": "^6.2.0",
     "coveralls": "^3.1.0",
     "cucumber": "^5.1.0",
diff --git a/src/client/v2/algod/models/types.ts b/src/client/v2/algod/models/types.ts
index 064606f..afc1c93 100644
--- a/src/client/v2/algod/models/types.ts
+++ b/src/client/v2/algod/models/types.ts
@@ -1243,6 +1243,11 @@ export class DryrunTxnResult extends BaseModel {
 
   public appCallTrace?: DryrunState[];
 
+  /**
+   * Execution cost of app call transaction
+   */
+  public cost?: number | bigint;
+
   /**
    * Application state delta.
    */
@@ -1254,13 +1259,14 @@ export class DryrunTxnResult extends BaseModel {
 
   public logicSigTrace?: DryrunState[];
 
-  public logs?: LogItem[];
+  public logs?: Uint8Array[];
 
   /**
    * Creates a new `DryrunTxnResult` object.
    * @param disassembly - Disassembled program line by line.
    * @param appCallMessages -
    * @param appCallTrace -
+   * @param cost - Execution cost of app call transaction
    * @param globalDelta - Application state delta.
    * @param localDeltas -
    * @param logicSigMessages -
@@ -1271,6 +1277,7 @@ export class DryrunTxnResult extends BaseModel {
     disassembly,
     appCallMessages,
     appCallTrace,
+    cost,
     globalDelta,
     localDeltas,
     logicSigMessages,
@@ -1280,16 +1287,18 @@ export class DryrunTxnResult extends BaseModel {
     disassembly: string[];
     appCallMessages?: string[];
     appCallTrace?: DryrunState[];
+    cost?: number | bigint;
     globalDelta?: EvalDeltaKeyValue[];
     localDeltas?: AccountStateDelta[];
     logicSigMessages?: string[];
     logicSigTrace?: DryrunState[];
-    logs?: LogItem[];
+    logs?: Uint8Array[];
   }) {
     super();
     this.disassembly = disassembly;
     this.appCallMessages = appCallMessages;
     this.appCallTrace = appCallTrace;
+    this.cost = cost;
     this.globalDelta = globalDelta;
     this.localDeltas = localDeltas;
     this.logicSigMessages = logicSigMessages;
@@ -1300,6 +1309,7 @@ export class DryrunTxnResult extends BaseModel {
       disassembly: 'disassembly',
       appCallMessages: 'app-call-messages',
       appCallTrace: 'app-call-trace',
+      cost: 'cost',
       globalDelta: 'global-delta',
       localDeltas: 'local-deltas',
       logicSigMessages: 'logic-sig-messages',
@@ -1401,37 +1411,6 @@ export class EvalDeltaKeyValue extends BaseModel {
   }
 }
 
-/**
- * Application Log
- */
-export class LogItem extends BaseModel {
-  /**
-   * unique application identifier
-   */
-  public id: number | bigint;
-
-  /**
-   * base64 encoded log message
-   */
-  public value: string;
-
-  /**
-   * Creates a new `LogItem` object.
-   * @param id - unique application identifier
-   * @param value - base64 encoded log message
-   */
-  constructor(id: number | bigint, value: string) {
-    super();
-    this.id = id;
-    this.value = value;
-
-    this.attribute_map = {
-      id: 'id',
-      value: 'value',
-    };
-  }
-}
-
 /**
  *
  */
@@ -1612,14 +1591,8 @@ export class NodeStatusResponse extends BaseModel {
 }
 
 /**
- * Given a transaction id of a recently submitted transaction, it returns
- * information about it. There are several cases when this might succeed:
- * - transaction committed (committed round > 0)
- * - transaction still in the pool (committed round = 0, pool error = "")
- * - transaction removed from pool due to error (committed round = 0, pool error !=
- * "")
- * Or the transaction may have happened sufficiently long ago that the node no
- * longer remembers it, and this will return an error.
+ * Details about a pending transaction. If the transaction was recently confirmed,
+ * includes confirmation details like the round and reward details.
  */
 export class PendingTransactionResponse extends BaseModel {
   /**
@@ -1671,6 +1644,11 @@ export class PendingTransactionResponse extends BaseModel {
    */
   public globalStateDelta?: EvalDeltaKeyValue[];
 
+  /**
+   * Inner transactions produced by application execution.
+   */
+  public innerTxns?: PendingTransactionResponse[];
+
   /**
    * (ld) Local state key/value changes for the application being executed by this
    * transaction.
@@ -1680,7 +1658,7 @@ export class PendingTransactionResponse extends BaseModel {
   /**
    * (lg) Logs for the application being executed by this transaction.
    */
-  public logs?: LogItem[];
+  public logs?: Uint8Array[];
 
   /**
    * Rewards in microalgos applied to the receiver account.
@@ -1707,6 +1685,7 @@ export class PendingTransactionResponse extends BaseModel {
    * @param confirmedRound - The round where this transaction was confirmed, if present.
    * @param globalStateDelta - (gd) Global state key/value changes for the application being executed by this
    * transaction.
+   * @param innerTxns - Inner transactions produced by application execution.
    * @param localStateDelta - (ld) Local state key/value changes for the application being executed by this
    * transaction.
    * @param logs - (lg) Logs for the application being executed by this transaction.
@@ -1723,6 +1702,7 @@ export class PendingTransactionResponse extends BaseModel {
     closingAmount,
     confirmedRound,
     globalStateDelta,
+    innerTxns,
     localStateDelta,
     logs,
     receiverRewards,
@@ -1737,8 +1717,9 @@ export class PendingTransactionResponse extends BaseModel {
     closingAmount?: number | bigint;
     confirmedRound?: number | bigint;
     globalStateDelta?: EvalDeltaKeyValue[];
+    innerTxns?: PendingTransactionResponse[];
     localStateDelta?: AccountStateDelta[];
-    logs?: LogItem[];
+    logs?: Uint8Array[];
     receiverRewards?: number | bigint;
     senderRewards?: number | bigint;
   }) {
@@ -1752,6 +1733,7 @@ export class PendingTransactionResponse extends BaseModel {
     this.closingAmount = closingAmount;
     this.confirmedRound = confirmedRound;
     this.globalStateDelta = globalStateDelta;
+    this.innerTxns = innerTxns;
     this.localStateDelta = localStateDelta;
     this.logs = logs;
     this.receiverRewards = receiverRewards;
@@ -1767,6 +1749,7 @@ export class PendingTransactionResponse extends BaseModel {
       closingAmount: 'closing-amount',
       confirmedRound: 'confirmed-round',
       globalStateDelta: 'global-state-delta',
+      innerTxns: 'inner-txns',
       localStateDelta: 'local-state-delta',
       logs: 'logs',
       receiverRewards: 'receiver-rewards',
diff --git a/src/client/v2/indexer/indexer.ts b/src/client/v2/indexer/indexer.ts
index 382bd9d..547dec3 100644
--- a/src/client/v2/indexer/indexer.ts
+++ b/src/client/v2/indexer/indexer.ts
@@ -9,6 +9,7 @@ import LookupTransactionByID from './lookupTransactionByID';
 import LookupAccountByID from './lookupAccountByID';
 import LookupAssetByID from './lookupAssetByID';
 import LookupApplications from './lookupApplications';
+import LookupApplicationLogs from './lookupApplicationLogs';
 import SearchAccounts from './searchAccounts';
 import SearchForTransactions from './searchForTransactions';
 import SearchForAssets from './searchForAssets';
@@ -95,6 +96,14 @@ export default class IndexerClient extends ServiceClient {
     return new LookupApplications(this.c, this.intDecoding, index);
   }
 
+  /**
+   * Returns log messages generated by the passed in application.
+   * @param appID - The ID of the application which generated the logs.
+   */
+  lookupApplicationLogs(appID: number) {
+    return new LookupApplicationLogs(this.c, this.intDecoding, appID);
+  }
+
   /**
    * Returns information about indexed accounts.
    */
diff --git a/src/client/v2/indexer/lookupApplicationLogs.ts b/src/client/v2/indexer/lookupApplicationLogs.ts
new file mode 100644
index 0000000..3d11f8c
--- /dev/null
+++ b/src/client/v2/indexer/lookupApplicationLogs.ts
@@ -0,0 +1,50 @@
+import JSONRequest from '../jsonrequest';
+import HTTPClient from '../../client';
+import IntDecoding from '../../../types/intDecoding';
+
+export default class LookupApplicationLogs extends JSONRequest {
+  constructor(c: HTTPClient, intDecoding: IntDecoding, private appID: number) {
+    super(c, intDecoding);
+    this.appID = appID;
+  }
+
+  path() {
+    return `/v2/applications/${this.appID}/logs`;
+  }
+
+  /** limit for filter, as int */
+  limit(limit: number) {
+    this.query.limit = limit;
+    return this;
+  }
+
+  /** min round to filter with, as int */
+  minRound(round: number) {
+    this.query['min-round'] = round;
+    return this;
+  }
+
+  /** max round to filter with, as int */
+  maxRound(round: number) {
+    this.query['max-round'] = round;
+    return this;
+  }
+
+  /** used for pagination */
+  nextToken(nextToken: string) {
+    this.query.next = nextToken;
+    return this;
+  }
+
+  /** only include transactions with this sender address */
+  sender(senderAddress: string) {
+    this.query['sender-address'] = senderAddress;
+    return this;
+  }
+
+  /** txid to filter with, as string */
+  txid(txid: string) {
+    this.query.txid = txid;
+    return this;
+  }
+}
diff --git a/src/encoding/address.ts b/src/encoding/address.ts
index a3b6613..dcd445f 100644
--- a/src/encoding/address.ts
+++ b/src/encoding/address.ts
@@ -1,6 +1,7 @@
 import base32 from 'hi-base32';
 import * as nacl from '../nacl/naclWrappers';
 import * as utils from '../utils/utils';
+import { encodeUint64 } from './uint64';
 import { Address } from '../types/address';
 import { MultisigMetadata } from '../types/multisig';
 
@@ -26,6 +27,8 @@ const MULTISIG_PREIMG2ADDR_PREFIX = new Uint8Array([
   114,
 ]);
 
+const APP_ID_PREFIX = Buffer.from('appID');
+
 export const MALFORMED_ADDRESS_ERROR_MSG = 'address seems to be malformed';
 export const CHECKSUM_ADDRESS_ERROR_MSG = 'wrong checksum for address';
 export const INVALID_MSIG_VERSION_ERROR_MSG = 'invalid multisig version';
@@ -175,3 +178,14 @@ export function fromMultisigPreImgAddrs({
   const pks = addrs.map((addr) => decodeAddress(addr).publicKey);
   return encodeAddress(fromMultisigPreImg({ version, threshold, pks }));
 }
+
+/**
+ * Get the escrow address of an application.
+ * @param appID - The ID of the application.
+ * @returns The address corresponding to that application's escrow account.
+ */
+export function getApplicationAddress(appID: number | bigint): string {
+  const toBeSigned = utils.concatArrays(APP_ID_PREFIX, encodeUint64(appID));
+  const hash = nacl.genericHash(toBeSigned);
+  return encodeAddress(new Uint8Array(hash));
+}
diff --git a/src/logic/langspec.json b/src/logic/langspec.json
index 12070d7..4ccd4f4 100644
--- a/src/logic/langspec.json
+++ b/src/logic/langspec.json
@@ -1,13 +1,13 @@
 {
-  "EvalMaxVersion": 4,
-  "LogicSigVersion": 3,
+  "EvalMaxVersion": 5,
+  "LogicSigVersion": 5,
   "Ops": [
     {
       "Opcode": 0,
       "Name": "err",
       "Cost": 1,
       "Size": 1,
-      "Doc": "Error. Panic immediately. This is primarily a fencepost against accidental zero bytes getting compiled into programs.",
+      "Doc": "Error. Fail immediately. This is primarily a fencepost against accidental zero bytes getting compiled into programs.",
       "Groups": ["Flow Control"]
     },
     {
@@ -51,6 +51,42 @@
       "DocExtra": "The 32 byte public key is the last element on the stack, preceded by the 64 byte signature at the second-to-last element on the stack, preceded by the data which was signed at the third-to-last element on the stack.",
       "Groups": ["Arithmetic"]
     },
+    {
+      "Opcode": 5,
+      "Name": "ecdsa_verify",
+      "Args": "BBBBB",
+      "Returns": "U",
+      "Cost": 1700,
+      "Size": 2,
+      "Doc": "for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey =\u003e {0 or 1}",
+      "DocExtra": "The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.",
+      "ImmediateNote": "{uint8 curve index}",
+      "Groups": ["Arithmetic"]
+    },
+    {
+      "Opcode": 6,
+      "Name": "ecdsa_pk_decompress",
+      "Args": "B",
+      "Returns": "BB",
+      "Cost": 650,
+      "Size": 2,
+      "Doc": "decompress pubkey A into components X, Y =\u003e [*... stack*, 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"]
+    },
+    {
+      "Opcode": 7,
+      "Name": "ecdsa_pk_recover",
+      "Args": "BUBB",
+      "Returns": "BB",
+      "Cost": 2000,
+      "Size": 2,
+      "Doc": "for (data A, recovery id B, signature C, D) recover a public key =\u003e [*... stack*, X, Y]",
+      "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"]
+    },
     {
       "Opcode": 8,
       "Name": "+",
@@ -58,7 +94,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A plus B. Panic on overflow.",
+      "Doc": "A plus B. Fail on overflow.",
       "DocExtra": "Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `addw`.",
       "Groups": ["Arithmetic"]
     },
@@ -69,7 +105,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A minus B. Panic if B \u003e A.",
+      "Doc": "A minus B. Fail if B \u003e A.",
       "Groups": ["Arithmetic"]
     },
     {
@@ -79,7 +115,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A divided by B. Panic if B == 0.",
+      "Doc": "A divided by B (truncated division). Fail if B == 0.",
       "DocExtra": "`divmodw` is available to divide the two-element values produced by `mulw` and `addw`.",
       "Groups": ["Arithmetic"]
     },
@@ -90,7 +126,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A times B. Panic on overflow.",
+      "Doc": "A times B. Fail on overflow.",
       "DocExtra": "Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `mulw`.",
       "Groups": ["Arithmetic"]
     },
@@ -212,7 +248,7 @@
       "Cost": 1,
       "Size": 1,
       "Doc": "converts bytes X as big endian to uint64",
-      "DocExtra": "`btoi` panics if the input is longer than 8 bytes.",
+      "DocExtra": "`btoi` fails if the input is longer than 8 bytes.",
       "Groups": ["Arithmetic"]
     },
     {
@@ -222,7 +258,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A modulo B. Panic if B == 0.",
+      "Doc": "A modulo B. Fail if B == 0.",
       "Groups": ["Arithmetic"]
     },
     {
@@ -516,9 +552,14 @@
         "GlobalNumByteSlice",
         "LocalNumUint",
         "LocalNumByteSlice",
-        "ExtraProgramPages"
+        "ExtraProgramPages",
+        "Nonparticipation",
+        "Logs",
+        "NumLogs",
+        "CreatedAssetID",
+        "CreatedApplicationID"
       ],
-      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUU",
+      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUU",
       "Doc": "push field F of current transaction to stack",
       "DocExtra": "FirstValidTime causes the program to fail. The field is reserved for future use.",
       "ImmediateNote": "{uint8 transaction field index}",
@@ -540,9 +581,11 @@
         "Round",
         "LatestTimestamp",
         "CurrentApplicationID",
-        "CreatorAddress"
+        "CreatorAddress",
+        "CurrentApplicationAddress",
+        "GroupID"
       ],
-      "ArgEnumTypes": "UUUBUUUUUB",
+      "ArgEnumTypes": "UUUBUUUUUBBB",
       "Doc": "push value from globals to stack",
       "ImmediateNote": "{uint8 global field index}",
       "Groups": ["Loading Values"]
@@ -610,9 +653,14 @@
         "GlobalNumByteSlice",
         "LocalNumUint",
         "LocalNumByteSlice",
-        "ExtraProgramPages"
+        "ExtraProgramPages",
+        "Nonparticipation",
+        "Logs",
+        "NumLogs",
+        "CreatedAssetID",
+        "CreatedApplicationID"
       ],
-      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUU",
+      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUU",
       "Doc": "push 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}",
@@ -624,7 +672,7 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 2,
-      "Doc": "copy a value from scratch space to the stack",
+      "Doc": "copy a value from scratch space to the stack. All scratch spaces are 0 at program start.",
       "ImmediateNote": "{uint8 position in scratch space to load from}",
       "Groups": ["Loading Values"]
     },
@@ -634,7 +682,7 @@
       "Args": ".",
       "Cost": 1,
       "Size": 2,
-      "Doc": "pop a value from the stack and store to scratch space",
+      "Doc": "pop value X. store X to the Ith scratch space",
       "ImmediateNote": "{uint8 position in scratch space to store to}",
       "Groups": ["Loading Values"]
     },
@@ -644,8 +692,14 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 3,
-      "ArgEnum": ["ApplicationArgs", "Accounts"],
-      "ArgEnumTypes": "BBUU",
+      "ArgEnum": [
+        "ApplicationArgs",
+        "Accounts",
+        "Assets",
+        "Applications",
+        "Logs"
+      ],
+      "ArgEnumTypes": "BBUUB",
       "Doc": "push Ith value of the array field F of the current transaction",
       "ImmediateNote": "{uint8 transaction field index} {uint8 transaction field array index}",
       "Groups": ["Loading Values"]
@@ -656,8 +710,14 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 4,
-      "ArgEnum": ["ApplicationArgs", "Accounts"],
-      "ArgEnumTypes": "BBUU",
+      "ArgEnum": [
+        "ApplicationArgs",
+        "Accounts",
+        "Assets",
+        "Applications",
+        "Logs"
+      ],
+      "ArgEnumTypes": "BBUUB",
       "Doc": "push 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"]
@@ -726,10 +786,15 @@
         "GlobalNumByteSlice",
         "LocalNumUint",
         "LocalNumByteSlice",
-        "ExtraProgramPages"
+        "ExtraProgramPages",
+        "Nonparticipation",
+        "Logs",
+        "NumLogs",
+        "CreatedAssetID",
+        "CreatedApplicationID"
       ],
-      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUU",
-      "Doc": "push field F of the Ath transaction in the current group",
+      "ArgEnumTypes": "BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUU",
+      "Doc": "push field F of the Xth 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"]
@@ -741,9 +806,15 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 3,
-      "ArgEnum": ["ApplicationArgs", "Accounts"],
-      "ArgEnumTypes": "BBUU",
-      "Doc": "push Ith value of the array field F from the Ath transaction in the current group",
+      "ArgEnum": [
+        "ApplicationArgs",
+        "Accounts",
+        "Assets",
+        "Applications",
+        "Logs"
+      ],
+      "ArgEnumTypes": "BBUUB",
+      "Doc": "push Ith value of the array field F from the Xth transaction in the current group",
       "ImmediateNote": "{uint8 transaction field index} {uint8 transaction field array index}",
       "Groups": ["Loading Values"]
     },
@@ -754,7 +825,7 @@
       "Cost": 1,
       "Size": 3,
       "Doc": "push Ith scratch space index of the Tth transaction in the current group",
-      "DocExtra": "The `gload` opcode can only access scratch spaces of previous app calls contained 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"]
     },
@@ -765,8 +836,8 @@
       "Returns": ".",
       "Cost": 1,
       "Size": 2,
-      "Doc": "push Ith scratch space index of the Ath transaction in the current group",
-      "DocExtra": "The `gloads` opcode can only access scratch spaces of previous app calls contained in the current group.",
+      "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.",
       "ImmediateNote": "{uint8 position in scratch space to load from}",
       "Groups": ["Loading Values"]
     },
@@ -777,7 +848,8 @@
       "Cost": 1,
       "Size": 2,
       "Doc": "push the ID of the asset or application created in the Tth transaction of the current group",
-      "DocExtra": "The `gaid` opcode can only access the ID of assets or applications created by previous txns in 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"]
     },
     {
@@ -787,8 +859,27 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push the ID of the asset or application created in the Ath transaction of the current group",
-      "DocExtra": "The `gaids` opcode can only access the ID of assets or applications created by previous txns in the current group.",
+      "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.",
+      "Groups": ["Loading Values"]
+    },
+    {
+      "Opcode": 62,
+      "Name": "loads",
+      "Args": "U",
+      "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.",
+      "Groups": ["Loading Values"]
+    },
+    {
+      "Opcode": 63,
+      "Name": "stores",
+      "Args": "U.",
+      "Cost": 1,
+      "Size": 1,
+      "Doc": "pop indexes A and B. store B to the Ath scratch space",
       "Groups": ["Loading Values"]
     },
     {
@@ -798,8 +889,8 @@
       "Cost": 1,
       "Size": 3,
       "Doc": "branch to TARGET if value X 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 well aligned instructions. (e.g. Branching to the second byte of a 2 byte op will be rejected.) Branch offsets are limited to forward branches only, 0-0x7fff until v4. v4 treats offset as a signed 16 bit integer allowing for backward branches and looping.\n\nAt LogicSigVersion 2 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 LogicSigVersion 2, 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. (negative offsets are illegal before v4)}",
+      "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"]
     },
     {
@@ -810,7 +901,7 @@
       "Size": 3,
       "Doc": "branch to TARGET if value X is zero",
       "DocExtra": "See `bnz` for details on how branches work. `bz` inverts the behavior of `bnz`.",
-      "ImmediateNote": "{int16 branch offset, big endian. (negative offsets are illegal before v4)}",
+      "ImmediateNote": "{int16 branch offset, big endian}",
       "Groups": ["Flow Control"]
     },
     {
@@ -820,7 +911,7 @@
       "Size": 3,
       "Doc": "branch unconditionally to TARGET",
       "DocExtra": "See `bnz` for details on how branches work. `b` always jumps to the offset.",
-      "ImmediateNote": "{int16 branch offset, big endian. (negative offsets are illegal before v4)}",
+      "ImmediateNote": "{int16 branch offset, big endian}",
       "Groups": ["Flow Control"]
     },
     {
@@ -901,6 +992,28 @@
       "Doc": "selects one of two values based on top-of-stack: A, B, C -\u003e (if C != 0 then B else A)",
       "Groups": ["Flow Control"]
     },
+    {
+      "Opcode": 78,
+      "Name": "cover",
+      "Args": ".",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 2,
+      "Doc": "remove top of stack, and place it deeper in the stack such that N elements are above it. Fails if stack depth \u003c= N.",
+      "ImmediateNote": "{uint8 depth}",
+      "Groups": ["Flow Control"]
+    },
+    {
+      "Opcode": 79,
+      "Name": "uncover",
+      "Args": ".",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 2,
+      "Doc": "remove the value at depth N in the stack and shift above items down so the Nth deep value is on top of the stack. Fails if stack depth \u003c= N.",
+      "ImmediateNote": "{uint8 depth}",
+      "Groups": ["Flow Control"]
+    },
     {
       "Opcode": 80,
       "Name": "concat",
@@ -909,7 +1022,7 @@
       "Cost": 1,
       "Size": 1,
       "Doc": "pop two byte-arrays A and B and join them, push the result",
-      "DocExtra": "`concat` panics if the result would be greater than 4096 bytes.",
+      "DocExtra": "`concat` fails if the result would be greater than 4096 bytes.",
       "Groups": ["Arithmetic"]
     },
     {
@@ -921,7 +1034,7 @@
       "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",
       "ImmediateNote": "{uint8 start position} {uint8 end position}",
-      "Groups": ["Arithmetic"]
+      "Groups": ["Byte Array Slicing"]
     },
     {
       "Opcode": 82,
@@ -931,7 +1044,7 @@
       "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": ["Arithmetic"]
+      "Groups": ["Byte Array Slicing"]
     },
     {
       "Opcode": 83,
@@ -952,7 +1065,7 @@
       "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",
-      "DocExtra": "bit indexing begins with low-order bits in integers. Setting bit 4 to 1 on the integer 0 yields 16 (`int 0x0010`, or 2^4). Indexing begins in the first bytes of a byte-string (as seen in getbyte and substring). Setting bits 0 through 11 to 1 in a 4 byte-array of 0s yields `byte 0xfff00000`",
+      "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"]
     },
     {
@@ -975,6 +1088,57 @@
       "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",
       "Groups": ["Arithmetic"]
     },
+    {
+      "Opcode": 87,
+      "Name": "extract",
+      "Args": "B",
+      "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",
+      "ImmediateNote": "{uint8 start position} {uint8 length}",
+      "Groups": ["Byte Array Slicing"]
+    },
+    {
+      "Opcode": 88,
+      "Name": "extract3",
+      "Args": "BUU",
+      "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"]
+    },
+    {
+      "Opcode": 89,
+      "Name": "extract_uint16",
+      "Args": "BU",
+      "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"]
+    },
+    {
+      "Opcode": 90,
+      "Name": "extract_uint32",
+      "Args": "BU",
+      "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"]
+    },
+    {
+      "Opcode": 91,
+      "Name": "extract_uint64",
+      "Args": "BU",
+      "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"]
+    },
     {
       "Opcode": 96,
       "Name": "balance",
@@ -982,8 +1146,8 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "get balance 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: Txn.Accounts offset (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender). Return: value.",
+      "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.",
       "Groups": ["State Access"]
     },
     {
@@ -1016,7 +1180,7 @@
       "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 exist and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.",
+      "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.",
       "Groups": ["State Access"]
     },
     {
@@ -1038,7 +1202,7 @@
       "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 exist and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.",
+      "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.",
       "Groups": ["State Access"]
     },
     {
@@ -1090,7 +1254,7 @@
       "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 exist and 0 otherwise), 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.",
       "ImmediateNote": "{uint8 asset holding field index}",
       "Groups": ["State Access"]
     },
@@ -1112,14 +1276,39 @@
         "AssetManager",
         "AssetReserve",
         "AssetFreeze",
-        "AssetClawback"
+        "AssetClawback",
+        "AssetCreator"
       ],
-      "ArgEnumTypes": "UUUBBBBBBBB",
+      "ArgEnumTypes": "UUUBBBBBBBBB",
       "Doc": "read from asset A params field X (imm arg) =\u003e {0 or 1 (top), value}",
-      "DocExtra": "params: Txn.ForeignAssets offset (or, since v4, an asset id that appears in Txn.ForeignAssets). Return: did_exist flag (1 if exist and 0 otherwise), 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.",
       "ImmediateNote": "{uint8 asset params field index}",
       "Groups": ["State Access"]
     },
+    {
+      "Opcode": 114,
+      "Name": "app_params_get",
+      "Args": "U",
+      "Returns": ".U",
+      "Cost": 1,
+      "Size": 2,
+      "ArgEnum": [
+        "AppApprovalProgram",
+        "AppClearStateProgram",
+        "AppGlobalNumUint",
+        "AppGlobalNumByteSlice",
+        "AppLocalNumUint",
+        "AppLocalNumByteSlice",
+        "AppExtraProgramPages",
+        "AppCreator",
+        "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.",
+      "ImmediateNote": "{uint8 app params field index}",
+      "Groups": ["State Access"]
+    },
     {
       "Opcode": 120,
       "Name": "min_balance",
@@ -1127,8 +1316,8 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "get minimum required balance 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: Txn.Accounts offset (or, since v4, an account address that appears in Txn.Accounts or is Txn.Sender). Return: value.",
+      "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.",
       "Groups": ["State Access"]
     },
     {
@@ -1159,7 +1348,8 @@
       "Cost": 1,
       "Size": 3,
       "Doc": "branch unconditionally to TARGET, saving the next instruction on the call stack",
-      "DocExtra": "The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.`",
+      "DocExtra": "The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.",
+      "ImmediateNote": "{int16 branch offset, big endian}",
       "Groups": ["Flow Control"]
     },
     {
@@ -1168,7 +1358,7 @@
       "Cost": 1,
       "Size": 1,
       "Doc": "pop the top instruction from the call stack and branch to it",
-      "DocExtra": "The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.`",
+      "DocExtra": "The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.",
       "Groups": ["Flow Control"]
     },
     {
@@ -1198,7 +1388,7 @@
       "Returns": "U",
       "Cost": 4,
       "Size": 1,
-      "Doc": "The largest integer X such that X^2 \u003c= A",
+      "Doc": "The largest integer B such that B^2 \u003c= X",
       "Groups": ["Arithmetic"]
     },
     {
@@ -1208,7 +1398,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "The index of the highest bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer",
+      "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",
       "DocExtra": "bitlen interprets arrays as big-endian integers, unlike setbit/getbit",
       "Groups": ["Arithmetic"]
     },
@@ -1219,7 +1409,7 @@
       "Returns": "U",
       "Cost": 1,
       "Size": 1,
-      "Doc": "A raised to the Bth power. Panic if A == B == 0 and on overflow",
+      "Doc": "A raised to the Bth power. Fail if A == B == 0 and on overflow",
       "Groups": ["Arithmetic"]
     },
     {
@@ -1229,7 +1419,7 @@
       "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. Panic if A == B == 0 or if the results exceeds 2^128-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",
       "Groups": ["Arithmetic"]
     },
     {
@@ -1240,7 +1430,7 @@
       "Cost": 10,
       "Size": 1,
       "Doc": "A plus B, where A and B are byte-arrays interpreted as big-endian unsigned integers",
-      "Groups": ["Byteslice Arithmetic"]
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 161,
@@ -1249,8 +1439,8 @@
       "Returns": "B",
       "Cost": 10,
       "Size": 1,
-      "Doc": "A minus B, where A and B are byte-arrays interpreted as big-endian unsigned integers. Panic on underflow.",
-      "Groups": ["Byteslice Arithmetic"]
+      "Doc": "A minus B, where A and B are byte-arrays interpreted as big-endian unsigned integers. Fail on underflow.",
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 162,
@@ -1259,8 +1449,8 @@
       "Returns": "B",
       "Cost": 20,
       "Size": 1,
-      "Doc": "A divided by B, where A and B are byte-arrays interpreted as big-endian unsigned integers. Panic if B is zero.",
-      "Groups": ["Byteslice Arithmetic"]
+      "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.",
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 163,
@@ -1270,7 +1460,7 @@
       "Cost": 20,
       "Size": 1,
       "Doc": "A times B, where A and B are byte-arrays interpreted as big-endian unsigned integers.",
-      "Groups": ["Byteslice Arithmetic"]
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 164,
@@ -1280,7 +1470,7 @@
       "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}",
-      "Groups": ["Byteslice Arithmetic"]
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 165,
@@ -1290,7 +1480,7 @@
       "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}",
-      "Groups": ["Byteslice Arithmetic"]
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 166,
@@ -1300,7 +1490,7 @@
       "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}",
-      "Groups": ["Byteslice Arithmetic"]
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 167,
@@ -1310,7 +1500,7 @@
       "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}",
-      "Groups": ["Byteslice Arithmetic"]
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 168,
@@ -1320,7 +1510,7 @@
       "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}",
-      "Groups": ["Byteslice Arithmetic"]
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 169,
@@ -1330,7 +1520,7 @@
       "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}",
-      "Groups": ["Byteslice Arithmetic"]
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 170,
@@ -1339,8 +1529,8 @@
       "Returns": "B",
       "Cost": 20,
       "Size": 1,
-      "Doc": "A modulo B, where A and B are byte-arrays interpreted as big-endian unsigned integers. Panic if B is zero.",
-      "Groups": ["Byteslice Arithmetic"]
+      "Doc": "A modulo B, where A and B are byte-arrays interpreted as big-endian unsigned integers. Fail if B is zero.",
+      "Groups": ["Byte Array Arithmetic"]
     },
     {
       "Opcode": 171,
@@ -1350,7 +1540,7 @@
       "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",
-      "Groups": ["Byteslice Logic"]
+      "Groups": ["Byte Array Logic"]
     },
     {
       "Opcode": 172,
@@ -1360,7 +1550,7 @@
       "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",
-      "Groups": ["Byteslice Logic"]
+      "Groups": ["Byte Array Logic"]
     },
     {
       "Opcode": 173,
@@ -1370,7 +1560,7 @@
       "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",
-      "Groups": ["Byteslice Logic"]
+      "Groups": ["Byte Array Logic"]
     },
     {
       "Opcode": 174,
@@ -1379,8 +1569,8 @@
       "Returns": "B",
       "Cost": 4,
       "Size": 1,
-      "Doc": "A with all bits inverted",
-      "Groups": ["Byteslice Logic"]
+      "Doc": "X with all bits inverted",
+      "Groups": ["Byte Array Logic"]
     },
     {
       "Opcode": 175,
@@ -1389,7 +1579,132 @@
       "Returns": "B",
       "Cost": 1,
       "Size": 1,
-      "Doc": "push a byte-array of length A, containing all zero bytes",
+      "Doc": "push a byte-array of length X, containing all zero bytes",
+      "Groups": ["Loading Values"]
+    },
+    {
+      "Opcode": 176,
+      "Name": "log",
+      "Args": "B",
+      "Cost": 1,
+      "Size": 1,
+      "Doc": "write bytes 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"]
+    },
+    {
+      "Opcode": 177,
+      "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.",
+      "Groups": ["Inner Transactions"]
+    },
+    {
+      "Opcode": 178,
+      "Name": "itxn_field",
+      "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.)",
+      "ImmediateNote": "{uint8 transaction field index}",
+      "Groups": ["Inner Transactions"]
+    },
+    {
+      "Opcode": 179,
+      "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.",
+      "Groups": ["Inner Transactions"]
+    },
+    {
+      "Opcode": 180,
+      "Name": "itxn",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 2,
+      "Doc": "push field F of the last inner transaction to stack",
+      "ImmediateNote": "{uint8 transaction field index}",
+      "Groups": ["Inner Transactions"]
+    },
+    {
+      "Opcode": 181,
+      "Name": "itxna",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 3,
+      "Doc": "push Ith value of the array field F of the last inner transaction to stack",
+      "ImmediateNote": "{uint8 transaction field index} {uint8 transaction field array index}",
+      "Groups": ["Inner Transactions"]
+    },
+    {
+      "Opcode": 192,
+      "Name": "txnas",
+      "Args": "U",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 2,
+      "ArgEnum": [
+        "ApplicationArgs",
+        "Accounts",
+        "Assets",
+        "Applications",
+        "Logs"
+      ],
+      "ArgEnumTypes": "BBUUB",
+      "Doc": "push Xth value of the array field F of the current transaction",
+      "ImmediateNote": "{uint8 transaction field index}",
+      "Groups": ["Loading Values"]
+    },
+    {
+      "Opcode": 193,
+      "Name": "gtxnas",
+      "Args": "U",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 3,
+      "ArgEnum": [
+        "ApplicationArgs",
+        "Accounts",
+        "Assets",
+        "Applications",
+        "Logs"
+      ],
+      "ArgEnumTypes": "BBUUB",
+      "Doc": "push Xth 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"]
+    },
+    {
+      "Opcode": 194,
+      "Name": "gtxnsas",
+      "Args": "UU",
+      "Returns": ".",
+      "Cost": 1,
+      "Size": 2,
+      "ArgEnum": [
+        "ApplicationArgs",
+        "Accounts",
+        "Assets",
+        "Applications",
+        "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",
+      "ImmediateNote": "{uint8 transaction field index}",
+      "Groups": ["Loading Values"]
+    },
+    {
+      "Opcode": 195,
+      "Name": "args",
+      "Args": "U",
+      "Returns": "B",
+      "Cost": 1,
+      "Size": 1,
+      "Doc": "push Xth LogicSig argument to stack",
       "Groups": ["Loading Values"]
     }
   ]
diff --git a/src/main.ts b/src/main.ts
index c338c1d..f5050c4 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -237,14 +237,18 @@ export {
   isValidAddress,
   encodeAddress,
   decodeAddress,
+  getApplicationAddress,
 } from './encoding/address';
 export { encodeUint64, decodeUint64 } from './encoding/uint64';
 export { default as generateAccount } from './account';
-export { secretKeyToMnemonic, mnemonicToSecretKey } from './mnemonic/mnemonic';
 export * as modelsv2 from './client/v2/algod/models/types';
 export {
   mnemonicToMasterDerivationKey,
   masterDerivationKeyToMnemonic,
+  secretKeyToMnemonic,
+  mnemonicToSecretKey,
+  seedFromMnemonic,
+  mnemonicFromSeed,
 } from './mnemonic/mnemonic';
 export {
   microalgosToAlgos,
diff --git a/src/transaction.ts b/src/transaction.ts
index ad43b62..3aa0a83 100644
--- a/src/transaction.ts
+++ b/src/transaction.ts
@@ -430,6 +430,7 @@ export class Transaction implements TransactionStorageStructure {
     if (txn.selectionKey !== undefined) {
       txn.selectionKey = Buffer.from(txn.selectionKey as string, 'base64');
     }
+    // Checking non-participation key registration
     if (
       txn.nonParticipation &&
       (txn.voteKey ||
@@ -442,6 +443,30 @@ export class Transaction implements TransactionStorageStructure {
         'nonParticipation is true but participation params are present.'
       );
     }
+    // Checking online key registration
+    if (
+      !txn.nonParticipation &&
+      (txn.voteKey ||
+        txn.selectionKey ||
+        txn.voteFirst ||
+        txn.voteLast ||
+        txn.voteKeyDilution) &&
+      !(
+        txn.voteKey &&
+        txn.selectionKey &&
+        txn.voteFirst &&
+        txn.voteLast &&
+        txn.voteKeyDilution
+      )
+    ) {
+      throw new Error(
+        'online key registration missing at least one of the following fields: ' +
+          'voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution'
+      );
+    }
+    // The last option is an offline key registration where all the fields
+    // nonParticipation, voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution
+    // are all undefined/false
 
     // Remove unwanted properties and store transaction on instance
     delete ((txn as unknown) as AnyTransactionWithParams).suggestedParams;
@@ -530,12 +555,12 @@ export class Transaction implements TransactionStorageStructure {
       }
       if (this.nonParticipation) {
         txn.nonpart = true;
-        delete txn.votekey;
-        delete txn.selkey;
-        delete txn.votefst;
-        delete txn.votelst;
-        delete txn.votekd;
       }
+      if (!txn.selkey) delete txn.selkey;
+      if (!txn.votekey) delete txn.votekey;
+      if (!txn.votefst) delete txn.votefst;
+      if (!txn.votelst) delete txn.votelst;
+      if (!txn.votekd) delete txn.votekd;
       return txn;
     }
     if (this.type === 'acfg') {
@@ -790,12 +815,24 @@ export class Transaction implements TransactionStorageStructure {
           address.encodeAddress(txnForEnc.close)
         );
     } else if (txnForEnc.type === 'keyreg') {
-      txn.voteKey = Buffer.from(txnForEnc.votekey);
-      txn.selectionKey = Buffer.from(txnForEnc.selkey);
-      txn.voteKeyDilution = txnForEnc.votekd;
-      txn.voteFirst = txnForEnc.votefst;
-      txn.voteLast = txnForEnc.votelst;
-      txn.nonParticipation = txnForEnc.nonpart;
+      if (txnForEnc.votekey !== undefined) {
+        txn.voteKey = Buffer.from(txnForEnc.votekey);
+      }
+      if (txnForEnc.selkey !== undefined) {
+        txn.selectionKey = Buffer.from(txnForEnc.selkey);
+      }
+      if (txnForEnc.votekd !== undefined) {
+        txn.voteKeyDilution = txnForEnc.votekd;
+      }
+      if (txnForEnc.votefst !== undefined) {
+        txn.voteFirst = txnForEnc.votefst;
+      }
+      if (txnForEnc.votelst !== undefined) {
+        txn.voteLast = txnForEnc.votelst;
+      }
+      if (txnForEnc.nonpart !== undefined) {
+        txn.nonParticipation = txnForEnc.nonpart;
+      }
     } else if (txnForEnc.type === 'acfg') {
       // asset creation, or asset reconfigure, or asset destruction
       if (txnForEnc.caid !== undefined) {


Test patch:
diff --git a/tests/3.Address.js b/tests/3.Address.js
index 8c26b7d..a93bdad 100644
--- a/tests/3.Address.js
+++ b/tests/3.Address.js
@@ -101,4 +101,14 @@ describe('address', () => {
       assert.deepStrictEqual(actualAddr, expectAddr);
     });
   });
+
+  describe('#getApplicationAddress', () => {
+    it('should produce the correct address', () => {
+      const appID = 77;
+      const expected =
+        'PCYUFPA2ZTOYWTP43MX2MOX2OWAIAXUDNC2WFCXAGMRUZ3DYD6BWFDL5YM';
+      const actual = algosdk.getApplicationAddress(appID);
+      assert.strictEqual(actual, expected);
+    });
+  });
 });
diff --git a/tests/5.Transaction.js b/tests/5.Transaction.js
index 487f74d..48ceecb 100644
--- a/tests/5.Transaction.js
+++ b/tests/5.Transaction.js
@@ -366,6 +366,68 @@ describe('Sign', () => {
       assert.deepStrictEqual(reencRep, encRep);
     });
 
+    it('should correctly serialize and deserialize an offline key registration transaction from msgpack representation', () => {
+      const o = {
+        from: 'XMHLMNAVJIMAW2RHJXLXKKK4G3J3U6VONNO3BTAQYVDC3MHTGDP3J5OCRU',
+        fee: 10,
+        firstRound: 51,
+        lastRound: 61,
+        note: new Uint8Array([123, 12, 200]),
+        genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=',
+        genesisID: '',
+        type: 'keyreg',
+      };
+      const expectedTxn = new algosdk.Transaction(o);
+      const encRep = expectedTxn.get_obj_for_encoding();
+      const encTxn = algosdk.encodeObj(encRep);
+      const decEncRep = algosdk.decodeObj(encTxn);
+      const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep);
+      const reencRep = decTxn.get_obj_for_encoding();
+      assert.deepStrictEqual(reencRep, encRep);
+    });
+
+    it('should correctly serialize and deserialize an offline key registration transaction from msgpack representation with explicit nonParticipation=false', () => {
+      const o = {
+        from: 'XMHLMNAVJIMAW2RHJXLXKKK4G3J3U6VONNO3BTAQYVDC3MHTGDP3J5OCRU',
+        fee: 10,
+        firstRound: 51,
+        lastRound: 61,
+        note: new Uint8Array([123, 12, 200]),
+        genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=',
+        genesisID: '',
+        nonParticipation: false,
+        type: 'keyreg',
+      };
+      const expectedTxn = new algosdk.Transaction(o);
+      const encRep = expectedTxn.get_obj_for_encoding();
+      const encTxn = algosdk.encodeObj(encRep);
+      const decEncRep = algosdk.decodeObj(encTxn);
+      const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep);
+      const reencRep = decTxn.get_obj_for_encoding();
+      assert.deepStrictEqual(reencRep, encRep);
+    });
+
+    it('should correctly serialize and deserialize a nonparticipating key registration transaction from msgpack representation', () => {
+      const o = {
+        from: 'XMHLMNAVJIMAW2RHJXLXKKK4G3J3U6VONNO3BTAQYVDC3MHTGDP3J5OCRU',
+        fee: 10,
+        firstRound: 51,
+        lastRound: 61,
+        note: new Uint8Array([123, 12, 200]),
+        genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=',
+        nonParticipation: true,
+        genesisID: '',
+        type: 'keyreg',
+      };
+      const expectedTxn = new algosdk.Transaction(o);
+      const encRep = expectedTxn.get_obj_for_encoding();
+      const encTxn = algosdk.encodeObj(encRep);
+      const decEncRep = algosdk.decodeObj(encTxn);
+      const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep);
+      const reencRep = decTxn.get_obj_for_encoding();
+      assert.deepStrictEqual(reencRep, encRep);
+    });
+
     it('should correctly serialize and deserialize an asset configuration transaction from msgpack representation', () => {
       const address =
         'BH55E5RMBD4GYWXGX5W5PJ5JAHPGM5OXKDQH5DC4O2MGI7NW4H6VOE4CP4';
@@ -777,6 +839,70 @@ describe('Sign', () => {
       assert.deepStrictEqual(expectedTxn, actualTxn);
     });
 
+    it('should be able to use helper to make an offline keyreg transaction', () => {
+      const from = 'XMHLMNAVJIMAW2RHJXLXKKK4G3J3U6VONNO3BTAQYVDC3MHTGDP3J5OCRU';
+      const fee = 10;
+      const firstRound = 51;
+      const lastRound = 61;
+      const note = new Uint8Array([123, 12, 200]);
+      const genesisHash = 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=';
+      const genesisID = '';
+      const rekeyTo =
+        'GAQVB24XEPYOPBQNJQAE4K3OLNYTRYD65ZKR3OEW5TDOOGL7MDKABXHHTM';
+      const voteKey = undefined;
+      const selectionKey = undefined;
+      const voteKeyDilution = undefined;
+      const voteFirst = undefined;
+      const voteLast = undefined;
+      const o = {
+        from,
+        fee,
+        firstRound,
+        lastRound,
+        note,
+        genesisHash,
+        voteKey,
+        selectionKey,
+        voteFirst,
+        voteLast,
+        voteKeyDilution,
+        genesisID,
+        reKeyTo: rekeyTo,
+        type: 'keyreg',
+        nonParticipation: false,
+      };
+
+      assert.throws(
+        () =>
+          new algosdk.Transaction({
+            ...o,
+            voteKey: '5/D4TQaBHfnzHI2HixFV9GcdUaGFwgCQhmf0SVhwaKE=',
+          }),
+        new Error(
+          'online key registration missing at least one of the following fields: ' +
+            'voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution'
+        )
+      );
+
+      const expectedTxn = new algosdk.Transaction(o);
+      const actualTxn = algosdk.makeKeyRegistrationTxn(
+        from,
+        fee,
+        firstRound,
+        lastRound,
+        note,
+        genesisHash,
+        genesisID,
+        voteKey,
+        selectionKey,
+        voteFirst,
+        voteLast,
+        voteKeyDilution,
+        rekeyTo
+      );
+      assert.deepStrictEqual(expectedTxn, actualTxn);
+    });
+
     it('should be able to use helper to make a nonparticipating keyreg transaction', () => {
       const from = 'XMHLMNAVJIMAW2RHJXLXKKK4G3J3U6VONNO3BTAQYVDC3MHTGDP3J5OCRU';
       const fee = 10;
diff --git a/tests/8.LogicSig.ts b/tests/8.LogicSig.ts
index b774aea..491d7b5 100644
--- a/tests/8.LogicSig.ts
+++ b/tests/8.LogicSig.ts
@@ -1073,6 +1073,33 @@ describe('Program validation', () => {
       ]); // int 1; loop: int 2; *; dup; int 10; <; bnz loop; int 16; ==
       assert.ok(logic.checkProgram(program));
     });
+    it('should support TEAL v5 opcodes', () => {
+      assert.ok(logic.langspecEvalMaxVersion >= 5);
+
+      // itxn ops
+      let program = new Uint8Array(
+        Buffer.from('052001c0843db18101b21022b2083100b207b3b4082212', 'hex')
+      );
+      // itxn_begin; int pay; itxn_field TypeEnum; int 1000000; itxn_field Amount; txn Sender; itxn_field Receiver; itxn_submit; itxn Amount; int 1000000; ==
+      assert.ok(logic.checkProgram(program));
+
+      // ECDSA ops
+      program = new Uint8Array(
+        Buffer.from(
+          '058008746573746461746103802079bfa8245aeac0e714b7bd2b3252d03979e5e7a43cb039715a5f8109a7dd9ba180200753d317e54350d1d102289afbde3002add4529f10b9f7d3d223843985de62e0802103abfb5e6e331fb871e423f354e2bd78a384ef7cb07ac8bbf27d2dd1eca00e73c106000500',
+          'hex'
+        )
+      );
+      // byte "testdata"; sha512_256; byte 0x79bfa8245aeac0e714b7bd2b3252d03979e5e7a43cb039715a5f8109a7dd9ba1; byte 0x0753d317e54350d1d102289afbde3002add4529f10b9f7d3d223843985de62e0; byte 0x03abfb5e6e331fb871e423f354e2bd78a384ef7cb07ac8bbf27d2dd1eca00e73c1; ecdsa_pk_decompress Secp256k1; ecdsa_verify Secp256k1
+      assert.ok(logic.checkProgram(program));
+
+      // cover, uncover, log
+      program = new Uint8Array(
+        Buffer.from('058001618001628001634e024f025050b08101', 'hex')
+      );
+      // byte "a"; byte "b"; byte "c"; cover 2; uncover 2; concat; concat; log; int 1
+      assert.ok(logic.checkProgram(program));
+    });
   });
 });
 
diff --git a/tests/cucumber/steps/steps.js b/tests/cucumber/steps/steps.js
index bc63703..9b34f9e 100644
--- a/tests/cucumber/steps/steps.js
+++ b/tests/cucumber/steps/steps.js
@@ -2471,6 +2471,21 @@ module.exports = function getSteps(options) {
     }
   );
 
+  When(
+    'we make a LookupApplicationLogsByID call with applicationID {int} limit {int} minRound {int} maxRound {int} nextToken {string} sender {string} and txID {string}',
+    async function (appID, limit, minRound, maxRound, nextToken, sender, txID) {
+      await this.indexerClient
+        .lookupApplicationLogs(appID)
+        .limit(limit)
+        .maxRound(maxRound)
+        .minRound(minRound)
+        .nextToken(nextToken)
+        .sender(sender)
+        .txid(txID)
+        .do();
+    }
+  );
+
   When(
     'we make a Search Accounts call with assetID {int} limit {int} currencyGreaterThan {int} currencyLessThan {int} and nextToken {string}',
     async function (