algosdk 2.5.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +4 -4
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.map +1 -1
  4. package/dist/cjs/client/urlTokenBaseHTTPClient.js +3 -4
  5. package/dist/cjs/client/urlTokenBaseHTTPClient.js.map +1 -1
  6. package/dist/cjs/client/v2/algod/algod.js +17 -0
  7. package/dist/cjs/client/v2/algod/algod.js.map +1 -1
  8. package/dist/cjs/client/v2/algod/getBlockTxids.js +19 -0
  9. package/dist/cjs/client/v2/algod/getBlockTxids.js.map +1 -0
  10. package/dist/cjs/client/v2/algod/models/types.js +484 -11
  11. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  12. package/dist/cjs/signer.js +6 -1
  13. package/dist/cjs/signer.js.map +1 -1
  14. package/dist/esm/client/urlTokenBaseHTTPClient.js +0 -1
  15. package/dist/esm/client/urlTokenBaseHTTPClient.js.map +1 -1
  16. package/dist/esm/client/v2/algod/algod.js +17 -0
  17. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  18. package/dist/esm/client/v2/algod/getBlockTxids.js +13 -0
  19. package/dist/esm/client/v2/algod/getBlockTxids.js.map +1 -0
  20. package/dist/esm/client/v2/algod/models/types.js +472 -9
  21. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  22. package/dist/esm/signer.js +6 -1
  23. package/dist/esm/signer.js.map +1 -1
  24. package/dist/types/client/v2/algod/algod.d.ts +15 -0
  25. package/dist/types/client/v2/algod/getBlockTxids.d.ts +8 -0
  26. package/dist/types/client/v2/algod/models/types.d.ts +418 -12
  27. package/package.json +2 -3
  28. package/src/client/urlTokenBaseHTTPClient.ts +0 -1
  29. package/src/client/v2/algod/algod.ts +18 -0
  30. package/src/client/v2/algod/getBlockTxids.ts +18 -0
  31. package/src/client/v2/algod/models/types.ts +831 -2
  32. package/src/signer.ts +5 -1
@@ -10,6 +10,7 @@ import Genesis from './genesis';
10
10
  import GetAssetByID from './getAssetByID';
11
11
  import GetApplicationByID from './getApplicationByID';
12
12
  import GetBlockHash from './getBlockHash';
13
+ import GetBlockTxids from './getBlockTxids';
13
14
  import GetApplicationBoxByName from './getApplicationBoxByName';
14
15
  import GetApplicationBoxes from './getApplicationBoxes';
15
16
  import HealthCheck from './healthCheck';
@@ -238,6 +239,23 @@ export default class AlgodClient extends ServiceClient {
238
239
  return new GetBlockHash(this.c, this.intDecoding, roundNumber);
239
240
  }
240
241
 
242
+ /**
243
+ * Get the top level transaction IDs for the block on the given round.
244
+ *
245
+ * #### Example
246
+ * ```typescript
247
+ * const roundNumber = 18038133;
248
+ * const block = await algodClient.getBlockTxids(roundNumber).do();
249
+ * ```
250
+ *
251
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksroundtxids)
252
+ * @param roundNumber - The round number of the block to get.
253
+ * @category GET
254
+ */
255
+ getBlockTxids(roundNumber: number) {
256
+ return new GetBlockTxids(this.c, this.intDecoding, roundNumber);
257
+ }
258
+
241
259
  /**
242
260
  * Returns the transaction information for a specific pending transaction.
243
261
  *
@@ -0,0 +1,18 @@
1
+ import JSONRequest from '../jsonrequest';
2
+ import HTTPClient from '../../client';
3
+ import IntDecoding from '../../../types/intDecoding';
4
+
5
+ export default class GetBlockTxids extends JSONRequest {
6
+ round: number;
7
+
8
+ constructor(c: HTTPClient, intDecoding: IntDecoding, roundNumber: number) {
9
+ super(c, intDecoding);
10
+ if (!Number.isInteger(roundNumber))
11
+ throw Error('roundNumber should be an integer');
12
+ this.round = roundNumber;
13
+ }
14
+
15
+ path() {
16
+ return `/v2/blocks/${this.round}/txids`;
17
+ }
18
+ }