Skip to content

Commit

Permalink
Merge branch 'release/v2.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Algo-devops-service committed Sep 21, 2023
2 parents d5ab014 + 5004152 commit ec7bf1c
Show file tree
Hide file tree
Showing 15 changed files with 1,250 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ commands:
<< parameters.sudo >> apt -y update
<< parameters.sudo >> apt -y install curl make git build-essential jq unzip
- node/install:
node-version: '16'
node-version: '18'
- run:
name: npm ci
command: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
required: true
type: string
pre_release_version:
description: "Pre-Release version, e.g. 'beta.1'"
description: "(Optional) Pre-Release version, e.g. 'beta.1'. Used mainly to support consensus release on betanet."
required: false
type: string

Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Update Version References in Source
env:
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# v2.6.0

<!-- Release notes generated using configuration in .github/release.yml at release/v2.6.0 -->

## What's Changed

### Bugfixes

- signer: Only merge multisigs if there are more than 1 by @acfunk in https://github.com/algorand/js-algorand-sdk/pull/822

### New Features

- Simulate: Application State Change and Hash of Executed Bytecode by @ahangsu in https://github.com/algorand/js-algorand-sdk/pull/818

### Enhancements

- node: Update to node 18, drop support for node 16 by @jasonpaulos in https://github.com/algorand/js-algorand-sdk/pull/827
- api: Regenerate client. by @winder in https://github.com/algorand/js-algorand-sdk/pull/826

## New Contributors

- @acfunk made their first contribution in https://github.com/algorand/js-algorand-sdk/pull/822

**Full Changelog**: https://github.com/algorand/js-algorand-sdk/compare/v2.5.0...v2.6.0

# v2.5.0

<!-- Release notes generated using configuration in .github/release.yml at release/v2.5.0 -->
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Include a minified browser bundle directly in your HTML like so:

```html
<script
src="https://unpkg.com/algosdk@v2.5.0/dist/browser/algosdk.min.js"
integrity="sha384-6PTPyb/CJ0CVqEu9Ff7ss4fpdAI0H9DgjQ1y0ftafqNMTC0I9sJvkSu1rHuWT5vf"
src="https://unpkg.com/algosdk@v2.6.0/dist/browser/algosdk.min.js"
integrity="sha384-lQFw8cXCcsNWUXAkEbZNvOieLVDwHbFLQILZZ2yr3CQlzBYQKUE0MjsiQe7GsP09"
crossorigin="anonymous"
></script>
```
Expand All @@ -30,8 +30,8 @@ or

```html
<script
src="https://cdn.jsdelivr.net/npm/algosdk@v2.5.0/dist/browser/algosdk.min.js"
integrity="sha384-6PTPyb/CJ0CVqEu9Ff7ss4fpdAI0H9DgjQ1y0ftafqNMTC0I9sJvkSu1rHuWT5vf"
src="https://cdn.jsdelivr.net/npm/algosdk@v2.6.0/dist/browser/algosdk.min.js"
integrity="sha384-lQFw8cXCcsNWUXAkEbZNvOieLVDwHbFLQILZZ2yr3CQlzBYQKUE0MjsiQe7GsP09"
crossorigin="anonymous"
></script>
```
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "algosdk",
"version": "2.5.0",
"version": "2.6.0",
"description": "The official JavaScript SDK for Algorand",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -80,6 +80,6 @@
"author": "Algorand, llc",
"license": "MIT",
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
}
}
18 changes: 18 additions & 0 deletions src/client/v2/algod/algod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Genesis from './genesis';
import GetAssetByID from './getAssetByID';
import GetApplicationByID from './getApplicationByID';
import GetBlockHash from './getBlockHash';
import GetBlockTxids from './getBlockTxids';
import GetApplicationBoxByName from './getApplicationBoxByName';
import GetApplicationBoxes from './getApplicationBoxes';
import HealthCheck from './healthCheck';
Expand Down Expand Up @@ -238,6 +239,23 @@ export default class AlgodClient extends ServiceClient {
return new GetBlockHash(this.c, this.intDecoding, roundNumber);
}

/**
* Get the top level transaction IDs for the block on the given round.
*
* #### Example
* ```typescript
* const roundNumber = 18038133;
* const block = await algodClient.getBlockTxids(roundNumber).do();
* ```
*
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksroundtxids)
* @param roundNumber - The round number of the block to get.
* @category GET
*/
getBlockTxids(roundNumber: number) {
return new GetBlockTxids(this.c, this.intDecoding, roundNumber);
}

/**
* Returns the transaction information for a specific pending transaction.
*
Expand Down
18 changes: 18 additions & 0 deletions src/client/v2/algod/getBlockTxids.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import JSONRequest from '../jsonrequest';
import HTTPClient from '../../client';
import IntDecoding from '../../../types/intDecoding';

export default class GetBlockTxids extends JSONRequest {
round: number;

constructor(c: HTTPClient, intDecoding: IntDecoding, roundNumber: number) {
super(c, intDecoding);
if (!Number.isInteger(roundNumber))
throw Error('roundNumber should be an integer');
this.round = roundNumber;
}

path() {
return `/v2/blocks/${this.round}/txids`;
}
}
Loading

0 comments on commit ec7bf1c

Please sign in to comment.