algosdk 3.3.1 → 3.4.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 (33) hide show
  1. package/README.md +5 -5
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.map +1 -1
  4. package/dist/cjs/client/v2/algod/getTransactionProof.js +1 -1
  5. package/dist/cjs/client/v2/algod/getTransactionProof.js.map +1 -1
  6. package/dist/cjs/client/v2/algod/models/types.js +8 -8
  7. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  8. package/dist/cjs/client/v2/indexer/models/types.js +75 -3
  9. package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
  10. package/dist/cjs/client/v2/indexer/searchForTransactions.js +19 -0
  11. package/dist/cjs/client/v2/indexer/searchForTransactions.js.map +1 -1
  12. package/dist/cjs/encoding/schema/bytearray.js +3 -0
  13. package/dist/cjs/encoding/schema/bytearray.js.map +1 -1
  14. package/dist/esm/client/v2/algod/getTransactionProof.js +2 -2
  15. package/dist/esm/client/v2/algod/getTransactionProof.js.map +1 -1
  16. package/dist/esm/client/v2/algod/models/types.js +6 -6
  17. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  18. package/dist/esm/client/v2/indexer/models/types.js +72 -1
  19. package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
  20. package/dist/esm/client/v2/indexer/searchForTransactions.js +19 -0
  21. package/dist/esm/client/v2/indexer/searchForTransactions.js.map +1 -1
  22. package/dist/esm/encoding/schema/bytearray.js +3 -0
  23. package/dist/esm/encoding/schema/bytearray.js.map +1 -1
  24. package/dist/types/client/v2/algod/getTransactionProof.d.ts +3 -3
  25. package/dist/types/client/v2/algod/models/types.d.ts +4 -4
  26. package/dist/types/client/v2/indexer/models/types.d.ts +46 -1
  27. package/dist/types/client/v2/indexer/searchForTransactions.d.ts +16 -0
  28. package/package.json +2 -2
  29. package/src/client/v2/algod/getTransactionProof.ts +4 -4
  30. package/src/client/v2/algod/models/types.ts +7 -7
  31. package/src/client/v2/indexer/models/types.ts +119 -0
  32. package/src/client/v2/indexer/searchForTransactions.ts +20 -0
  33. package/src/encoding/schema/bytearray.ts +3 -0
@@ -98,6 +98,25 @@ export default class SearchForTransactions extends JSONRequest {
98
98
  this.query.txid = txid;
99
99
  return this;
100
100
  }
101
+ /**
102
+ * Lookup transactions by group ID.
103
+ *
104
+ * #### Example
105
+ * ```typescript
106
+ * const groupIdBase64Encoded = "A62qVigWtWo0laUzcE1iZY8+KXWzK1vSkgwN/eKgvjc=";
107
+ * const txns = await indexerClient
108
+ * .searchForTransactions()
109
+ * .groupid(groupIdBase64Encoded)
110
+ * .do();
111
+ * ```
112
+ *
113
+ * @param groupid - base64 string or uint8array
114
+ * @category query
115
+ */
116
+ groupid(groupid) {
117
+ this.query['group-id'] = base64StringFunnel(groupid);
118
+ return this;
119
+ }
101
120
  /**
102
121
  * Include results for the specified round.
103
122
  *
@@ -1 +1 @@
1
- {"version":3,"file":"searchForTransactions.js","sourceRoot":"","sources":["../../../../../src/client/v2/indexer/searchForTransactions.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAiC;IAClF;;OAEG;IACH,kDAAkD;IAClD,IAAI;QACF,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,MAA2B;QACpC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;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AI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,mBAAmB,CAAC,OAAwB;QAC1C,uGAAuG;QACvG,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,gBAAgB,CAAC,MAAuB;QACtC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kDAAkD;IAClD,OAAO,CAAC,QAA4B;QAClC,OAAO,UAAU,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,oBAAoB,CAAC,CAAC;IAClE,CAAC;CACF"}
1
+ {"version":3,"file":"searchForTransactions.js","sourceRoot":"","sources":["../../../../../src/client/v2/indexer/searchForTransactions.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAiC;IAClF;;OAEG;IACH,kDAAkD;IAClD,IAAI;QACF,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,MAA2B;QACpC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAY;QACjB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,C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B;QAC1C,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,mBAAmB,CAAC,OAAwB;QAC1C,uGAAuG;QACvG,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,gBAAgB,CAAC,MAAuB;QACtC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kDAAkD;IAClD,OAAO,CAAC,QAA4B;QAClC,OAAO,UAAU,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,oBAAoB,CAAC,CAAC;IAClE,CAAC;CACF"}
@@ -31,6 +31,9 @@ export class ByteArraySchema extends Schema {
31
31
  throw new Error(`Invalid byte array: (${typeof data}) ${data}`);
32
32
  }
33
33
  fromPreparedJSON(encoded) {
34
+ if (encoded === null || encoded === undefined) {
35
+ return this.defaultValue();
36
+ }
34
37
  if (typeof encoded === 'string') {
35
38
  return base64ToBytes(encoded);
36
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bytearray.js","sourceRoot":"","sources":["../../../../src/encoding/schema/bytearray.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,GAKP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEhE,2CAA2C;AAE3C,MAAM,OAAO,eAAgB,SAAQ,MAAM;IAClC,YAAY;QACjB,OAAO,IAAI,UAAU,EAAE,CAAC;IAC1B,CAAC;IAEM,cAAc,CAAC,IAAa;QACjC,OAAO,IAAI,YAAY,UAAU,IAAI,IAAI,CAAC,UAAU,KAAK,CA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2B,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import JSONRequest from '../jsonrequest.js';
2
2
  import { HTTPClient, HTTPClientResponse } from '../../client.js';
3
- import { TransactionProofResponse } from './models/types.js';
4
- export default class GetTransactionProof extends JSONRequest<TransactionProofResponse> {
3
+ import { TransactionProof } from './models/types.js';
4
+ export default class GetTransactionProof extends JSONRequest<TransactionProof> {
5
5
  private txID;
6
6
  private round;
7
7
  constructor(c: HTTPClient, round: number | bigint, txID: string);
@@ -24,5 +24,5 @@ export default class GetTransactionProof extends JSONRequest<TransactionProofRes
24
24
  * @category query
25
25
  */
26
26
  hashType(hashType: string): this;
27
- prepare(response: HTTPClientResponse): TransactionProofResponse;
27
+ prepare(response: HTTPClientResponse): TransactionProof;
28
28
  }
@@ -1249,7 +1249,7 @@ export declare class BoxReference implements Encodable {
1249
1249
  static fromEncodingData(data: unknown): BoxReference;
1250
1250
  }
1251
1251
  /**
1252
- * * Box names of an application
1252
+ * Box names of an application
1253
1253
  */
1254
1254
  export declare class BoxesResponse implements Encodable {
1255
1255
  private static encodingSchemaValue;
@@ -3060,7 +3060,7 @@ export declare class TransactionParametersResponse implements Encodable {
3060
3060
  /**
3061
3061
  * Proof of transaction in a block.
3062
3062
  */
3063
- export declare class TransactionProofResponse implements Encodable {
3063
+ export declare class TransactionProof implements Encodable {
3064
3064
  private static encodingSchemaValue;
3065
3065
  static get encodingSchema(): Schema;
3066
3066
  /**
@@ -3087,7 +3087,7 @@ export declare class TransactionProofResponse implements Encodable {
3087
3087
  */
3088
3088
  hashtype?: string;
3089
3089
  /**
3090
- * Creates a new `TransactionProofResponse` object.
3090
+ * Creates a new `TransactionProof` object.
3091
3091
  * @param idx - Index of the transaction in the block's payset.
3092
3092
  * @param proof - Proof of transaction membership.
3093
3093
  * @param stibhash - Hash of SignedTxnInBlock for verifying proof.
@@ -3106,7 +3106,7 @@ export declare class TransactionProofResponse implements Encodable {
3106
3106
  });
3107
3107
  getEncodingSchema(): Schema;
3108
3108
  toEncodingData(): Map<string, unknown>;
3109
- static fromEncodingData(data: unknown): TransactionProofResponse;
3109
+ static fromEncodingData(data: unknown): TransactionProof;
3110
3110
  }
3111
3111
  /**
3112
3112
  * algod version information.
@@ -1475,6 +1475,35 @@ export declare class BoxDescriptor implements Encodable {
1475
1475
  toEncodingData(): Map<string, unknown>;
1476
1476
  static fromEncodingData(data: unknown): BoxDescriptor;
1477
1477
  }
1478
+ /**
1479
+ * BoxReference names a box by its name and the application ID it belongs to.
1480
+ */
1481
+ export declare class BoxReference implements Encodable {
1482
+ private static encodingSchemaValue;
1483
+ static get encodingSchema(): Schema;
1484
+ /**
1485
+ * Application ID to which the box belongs, or zero if referring to the called
1486
+ * application.
1487
+ */
1488
+ app: number;
1489
+ /**
1490
+ * Base64 encoded box name
1491
+ */
1492
+ name: Uint8Array;
1493
+ /**
1494
+ * Creates a new `BoxReference` object.
1495
+ * @param app - Application ID to which the box belongs, or zero if referring to the called
1496
+ * application.
1497
+ * @param name - Base64 encoded box name
1498
+ */
1499
+ constructor({ app, name, }: {
1500
+ app: number | bigint;
1501
+ name: string | Uint8Array;
1502
+ });
1503
+ getEncodingSchema(): Schema;
1504
+ toEncodingData(): Map<string, unknown>;
1505
+ static fromEncodingData(data: unknown): BoxReference;
1506
+ }
1478
1507
  /**
1479
1508
  * Box names of an application
1480
1509
  */
@@ -2490,6 +2519,11 @@ export declare class TransactionApplication implements Encodable {
2490
2519
  * reject the transaction.
2491
2520
  */
2492
2521
  approvalProgram?: Uint8Array;
2522
+ /**
2523
+ * (apbx) the boxes that can be accessed by this transaction (and others in the
2524
+ * same group).
2525
+ */
2526
+ boxReferences?: BoxReference[];
2493
2527
  /**
2494
2528
  * (apsu) Logic executed for application transactions with on-completion set to
2495
2529
  * "clear". It can read and write global state for the application, as well as
@@ -2538,6 +2572,11 @@ export declare class TransactionApplication implements Encodable {
2538
2572
  * * delete
2539
2573
  */
2540
2574
  onCompletion?: string;
2575
+ /**
2576
+ * (aprv) the lowest application version for which this transaction should
2577
+ * immediately fail. 0 indicates that no version check should be performed.
2578
+ */
2579
+ rejectVersion?: number;
2541
2580
  /**
2542
2581
  * Creates a new `TransactionApplication` object.
2543
2582
  * @param applicationId - (apid) ID of the application being configured or empty if creating.
@@ -2549,6 +2588,8 @@ export declare class TransactionApplication implements Encodable {
2549
2588
  * on-completion is set to "clear". It can read and write global state for the
2550
2589
  * application, as well as account-specific local state. Approval programs may
2551
2590
  * reject the transaction.
2591
+ * @param boxReferences - (apbx) the boxes that can be accessed by this transaction (and others in the
2592
+ * same group).
2552
2593
  * @param clearStateProgram - (apsu) Logic executed for application transactions with on-completion set to
2553
2594
  * "clear". It can read and write global state for the application, as well as
2554
2595
  * account-specific local state. Clear state programs cannot reject the
@@ -2576,12 +2617,15 @@ export declare class TransactionApplication implements Encodable {
2576
2617
  * * update
2577
2618
  * * update
2578
2619
  * * delete
2620
+ * @param rejectVersion - (aprv) the lowest application version for which this transaction should
2621
+ * immediately fail. 0 indicates that no version check should be performed.
2579
2622
  */
2580
- constructor({ applicationId, accounts, applicationArgs, approvalProgram, clearStateProgram, extraProgramPages, foreignApps, foreignAssets, globalStateSchema, localStateSchema, onCompletion, }: {
2623
+ constructor({ applicationId, accounts, applicationArgs, approvalProgram, boxReferences, clearStateProgram, extraProgramPages, foreignApps, foreignAssets, globalStateSchema, localStateSchema, onCompletion, rejectVersion, }: {
2581
2624
  applicationId: number | bigint;
2582
2625
  accounts?: (Address | string)[];
2583
2626
  applicationArgs?: Uint8Array[];
2584
2627
  approvalProgram?: string | Uint8Array;
2628
+ boxReferences?: BoxReference[];
2585
2629
  clearStateProgram?: string | Uint8Array;
2586
2630
  extraProgramPages?: number | bigint;
2587
2631
  foreignApps?: (number | bigint)[];
@@ -2589,6 +2633,7 @@ export declare class TransactionApplication implements Encodable {
2589
2633
  globalStateSchema?: StateSchema;
2590
2634
  localStateSchema?: StateSchema;
2591
2635
  onCompletion?: string;
2636
+ rejectVersion?: number | bigint;
2592
2637
  });
2593
2638
  getEncodingSchema(): Schema;
2594
2639
  toEncodingData(): Map<string, unknown>;
@@ -83,6 +83,22 @@ export default class SearchForTransactions extends JSONRequest<TransactionsRespo
83
83
  * @category query
84
84
  */
85
85
  txid(txid: string): this;
86
+ /**
87
+ * Lookup transactions by group ID.
88
+ *
89
+ * #### Example
90
+ * ```typescript
91
+ * const groupIdBase64Encoded = "A62qVigWtWo0laUzcE1iZY8+KXWzK1vSkgwN/eKgvjc=";
92
+ * const txns = await indexerClient
93
+ * .searchForTransactions()
94
+ * .groupid(groupIdBase64Encoded)
95
+ * .do();
96
+ * ```
97
+ *
98
+ * @param groupid - base64 string or uint8array
99
+ * @category query
100
+ */
101
+ groupid(groupid: Uint8Array | string): this;
86
102
  /**
87
103
  * Include results for the specified round.
88
104
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "algosdk",
3
- "version": "3.3.1",
3
+ "version": "3.4.0",
4
4
  "description": "The official JavaScript SDK for Algorand",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -64,7 +64,7 @@
64
64
  "@typescript-eslint/eslint-plugin": "^6.18.1",
65
65
  "@typescript-eslint/parser": "^6.18.1",
66
66
  "assert": "^2.0.0",
67
- "chromedriver": "^126.0.3",
67
+ "chromedriver": "^136.0.3",
68
68
  "concurrently": "^6.2.0",
69
69
  "cucumber": "^5.1.0",
70
70
  "es-abstract": "^1.18.3",
@@ -1,9 +1,9 @@
1
1
  import JSONRequest from '../jsonrequest.js';
2
2
  import { HTTPClient, HTTPClientResponse } from '../../client.js';
3
3
  import { decodeJSON } from '../../../encoding/encoding.js';
4
- import { TransactionProofResponse } from './models/types.js';
4
+ import { TransactionProof } from './models/types.js';
5
5
 
6
- export default class GetTransactionProof extends JSONRequest<TransactionProofResponse> {
6
+ export default class GetTransactionProof extends JSONRequest<TransactionProof> {
7
7
  private round: bigint;
8
8
 
9
9
  constructor(
@@ -42,7 +42,7 @@ export default class GetTransactionProof extends JSONRequest<TransactionProofRes
42
42
  }
43
43
 
44
44
  // eslint-disable-next-line class-methods-use-this
45
- prepare(response: HTTPClientResponse): TransactionProofResponse {
46
- return decodeJSON(response.getJSONText(), TransactionProofResponse);
45
+ prepare(response: HTTPClientResponse): TransactionProof {
46
+ return decodeJSON(response.getJSONText(), TransactionProof);
47
47
  }
48
48
  }
@@ -3297,7 +3297,7 @@ export class BoxReference implements Encodable {
3297
3297
  }
3298
3298
 
3299
3299
  /**
3300
- * * Box names of an application
3300
+ * Box names of an application
3301
3301
  */
3302
3302
  export class BoxesResponse implements Encodable {
3303
3303
  private static encodingSchemaValue: Schema | undefined;
@@ -8439,7 +8439,7 @@ export class TransactionParametersResponse implements Encodable {
8439
8439
  /**
8440
8440
  * Proof of transaction in a block.
8441
8441
  */
8442
- export class TransactionProofResponse implements Encodable {
8442
+ export class TransactionProof implements Encodable {
8443
8443
  private static encodingSchemaValue: Schema | undefined;
8444
8444
 
8445
8445
  static get encodingSchema(): Schema {
@@ -8493,7 +8493,7 @@ export class TransactionProofResponse implements Encodable {
8493
8493
  public hashtype?: string;
8494
8494
 
8495
8495
  /**
8496
- * Creates a new `TransactionProofResponse` object.
8496
+ * Creates a new `TransactionProof` object.
8497
8497
  * @param idx - Index of the transaction in the block's payset.
8498
8498
  * @param proof - Proof of transaction membership.
8499
8499
  * @param stibhash - Hash of SignedTxnInBlock for verifying proof.
@@ -8526,7 +8526,7 @@ export class TransactionProofResponse implements Encodable {
8526
8526
 
8527
8527
  // eslint-disable-next-line class-methods-use-this
8528
8528
  getEncodingSchema(): Schema {
8529
- return TransactionProofResponse.encodingSchema;
8529
+ return TransactionProof.encodingSchema;
8530
8530
  }
8531
8531
 
8532
8532
  toEncodingData(): Map<string, unknown> {
@@ -8539,11 +8539,11 @@ export class TransactionProofResponse implements Encodable {
8539
8539
  ]);
8540
8540
  }
8541
8541
 
8542
- static fromEncodingData(data: unknown): TransactionProofResponse {
8542
+ static fromEncodingData(data: unknown): TransactionProof {
8543
8543
  if (!(data instanceof Map)) {
8544
- throw new Error(`Invalid decoded TransactionProofResponse: ${data}`);
8544
+ throw new Error(`Invalid decoded TransactionProof: ${data}`);
8545
8545
  }
8546
- return new TransactionProofResponse({
8546
+ return new TransactionProof({
8547
8547
  idx: data.get('idx'),
8548
8548
  proof: data.get('proof'),
8549
8549
  stibhash: data.get('stibhash'),
@@ -4016,6 +4016,74 @@ export class BoxDescriptor implements Encodable {
4016
4016
  }
4017
4017
  }
4018
4018
 
4019
+ /**
4020
+ * BoxReference names a box by its name and the application ID it belongs to.
4021
+ */
4022
+ export class BoxReference implements Encodable {
4023
+ private static encodingSchemaValue: Schema | undefined;
4024
+
4025
+ static get encodingSchema(): Schema {
4026
+ if (!this.encodingSchemaValue) {
4027
+ this.encodingSchemaValue = new NamedMapSchema([]);
4028
+ (this.encodingSchemaValue as NamedMapSchema).pushEntries(
4029
+ { key: 'app', valueSchema: new Uint64Schema(), omitEmpty: true },
4030
+ { key: 'name', valueSchema: new ByteArraySchema(), omitEmpty: true }
4031
+ );
4032
+ }
4033
+ return this.encodingSchemaValue;
4034
+ }
4035
+
4036
+ /**
4037
+ * Application ID to which the box belongs, or zero if referring to the called
4038
+ * application.
4039
+ */
4040
+ public app: number;
4041
+
4042
+ /**
4043
+ * Base64 encoded box name
4044
+ */
4045
+ public name: Uint8Array;
4046
+
4047
+ /**
4048
+ * Creates a new `BoxReference` object.
4049
+ * @param app - Application ID to which the box belongs, or zero if referring to the called
4050
+ * application.
4051
+ * @param name - Base64 encoded box name
4052
+ */
4053
+ constructor({
4054
+ app,
4055
+ name,
4056
+ }: {
4057
+ app: number | bigint;
4058
+ name: string | Uint8Array;
4059
+ }) {
4060
+ this.app = ensureSafeInteger(app);
4061
+ this.name = typeof name === 'string' ? base64ToBytes(name) : name;
4062
+ }
4063
+
4064
+ // eslint-disable-next-line class-methods-use-this
4065
+ getEncodingSchema(): Schema {
4066
+ return BoxReference.encodingSchema;
4067
+ }
4068
+
4069
+ toEncodingData(): Map<string, unknown> {
4070
+ return new Map<string, unknown>([
4071
+ ['app', this.app],
4072
+ ['name', this.name],
4073
+ ]);
4074
+ }
4075
+
4076
+ static fromEncodingData(data: unknown): BoxReference {
4077
+ if (!(data instanceof Map)) {
4078
+ throw new Error(`Invalid decoded BoxReference: ${data}`);
4079
+ }
4080
+ return new BoxReference({
4081
+ app: data.get('app'),
4082
+ name: data.get('name'),
4083
+ });
4084
+ }
4085
+ }
4086
+
4019
4087
  /**
4020
4088
  * Box names of an application
4021
4089
  */
@@ -6909,6 +6977,13 @@ export class TransactionApplication implements Encodable {
6909
6977
  valueSchema: new OptionalSchema(new ByteArraySchema()),
6910
6978
  omitEmpty: true,
6911
6979
  },
6980
+ {
6981
+ key: 'box-references',
6982
+ valueSchema: new OptionalSchema(
6983
+ new ArraySchema(BoxReference.encodingSchema)
6984
+ ),
6985
+ omitEmpty: true,
6986
+ },
6912
6987
  {
6913
6988
  key: 'clear-state-program',
6914
6989
  valueSchema: new OptionalSchema(new ByteArraySchema()),
@@ -6943,6 +7018,11 @@ export class TransactionApplication implements Encodable {
6943
7018
  key: 'on-completion',
6944
7019
  valueSchema: new OptionalSchema(new StringSchema()),
6945
7020
  omitEmpty: true,
7021
+ },
7022
+ {
7023
+ key: 'reject-version',
7024
+ valueSchema: new OptionalSchema(new Uint64Schema()),
7025
+ omitEmpty: true,
6946
7026
  }
6947
7027
  );
6948
7028
  }
@@ -6974,6 +7054,12 @@ export class TransactionApplication implements Encodable {
6974
7054
  */
6975
7055
  public approvalProgram?: Uint8Array;
6976
7056
 
7057
+ /**
7058
+ * (apbx) the boxes that can be accessed by this transaction (and others in the
7059
+ * same group).
7060
+ */
7061
+ public boxReferences?: BoxReference[];
7062
+
6977
7063
  /**
6978
7064
  * (apsu) Logic executed for application transactions with on-completion set to
6979
7065
  * "clear". It can read and write global state for the application, as well as
@@ -7029,6 +7115,12 @@ export class TransactionApplication implements Encodable {
7029
7115
  */
7030
7116
  public onCompletion?: string;
7031
7117
 
7118
+ /**
7119
+ * (aprv) the lowest application version for which this transaction should
7120
+ * immediately fail. 0 indicates that no version check should be performed.
7121
+ */
7122
+ public rejectVersion?: number;
7123
+
7032
7124
  /**
7033
7125
  * Creates a new `TransactionApplication` object.
7034
7126
  * @param applicationId - (apid) ID of the application being configured or empty if creating.
@@ -7040,6 +7132,8 @@ export class TransactionApplication implements Encodable {
7040
7132
  * on-completion is set to "clear". It can read and write global state for the
7041
7133
  * application, as well as account-specific local state. Approval programs may
7042
7134
  * reject the transaction.
7135
+ * @param boxReferences - (apbx) the boxes that can be accessed by this transaction (and others in the
7136
+ * same group).
7043
7137
  * @param clearStateProgram - (apsu) Logic executed for application transactions with on-completion set to
7044
7138
  * "clear". It can read and write global state for the application, as well as
7045
7139
  * account-specific local state. Clear state programs cannot reject the
@@ -7067,12 +7161,15 @@ export class TransactionApplication implements Encodable {
7067
7161
  * * update
7068
7162
  * * update
7069
7163
  * * delete
7164
+ * @param rejectVersion - (aprv) the lowest application version for which this transaction should
7165
+ * immediately fail. 0 indicates that no version check should be performed.
7070
7166
  */
7071
7167
  constructor({
7072
7168
  applicationId,
7073
7169
  accounts,
7074
7170
  applicationArgs,
7075
7171
  approvalProgram,
7172
+ boxReferences,
7076
7173
  clearStateProgram,
7077
7174
  extraProgramPages,
7078
7175
  foreignApps,
@@ -7080,11 +7177,13 @@ export class TransactionApplication implements Encodable {
7080
7177
  globalStateSchema,
7081
7178
  localStateSchema,
7082
7179
  onCompletion,
7180
+ rejectVersion,
7083
7181
  }: {
7084
7182
  applicationId: number | bigint;
7085
7183
  accounts?: (Address | string)[];
7086
7184
  applicationArgs?: Uint8Array[];
7087
7185
  approvalProgram?: string | Uint8Array;
7186
+ boxReferences?: BoxReference[];
7088
7187
  clearStateProgram?: string | Uint8Array;
7089
7188
  extraProgramPages?: number | bigint;
7090
7189
  foreignApps?: (number | bigint)[];
@@ -7092,6 +7191,7 @@ export class TransactionApplication implements Encodable {
7092
7191
  globalStateSchema?: StateSchema;
7093
7192
  localStateSchema?: StateSchema;
7094
7193
  onCompletion?: string;
7194
+ rejectVersion?: number | bigint;
7095
7195
  }) {
7096
7196
  this.applicationId = ensureBigInt(applicationId);
7097
7197
  this.accounts =
@@ -7105,6 +7205,7 @@ export class TransactionApplication implements Encodable {
7105
7205
  typeof approvalProgram === 'string'
7106
7206
  ? base64ToBytes(approvalProgram)
7107
7207
  : approvalProgram;
7208
+ this.boxReferences = boxReferences;
7108
7209
  this.clearStateProgram =
7109
7210
  typeof clearStateProgram === 'string'
7110
7211
  ? base64ToBytes(clearStateProgram)
@@ -7124,6 +7225,10 @@ export class TransactionApplication implements Encodable {
7124
7225
  this.globalStateSchema = globalStateSchema;
7125
7226
  this.localStateSchema = localStateSchema;
7126
7227
  this.onCompletion = onCompletion;
7228
+ this.rejectVersion =
7229
+ typeof rejectVersion === 'undefined'
7230
+ ? undefined
7231
+ : ensureSafeInteger(rejectVersion);
7127
7232
  }
7128
7233
 
7129
7234
  // eslint-disable-next-line class-methods-use-this
@@ -7142,6 +7247,12 @@ export class TransactionApplication implements Encodable {
7142
7247
  ],
7143
7248
  ['application-args', this.applicationArgs],
7144
7249
  ['approval-program', this.approvalProgram],
7250
+ [
7251
+ 'box-references',
7252
+ typeof this.boxReferences !== 'undefined'
7253
+ ? this.boxReferences.map((v) => v.toEncodingData())
7254
+ : undefined,
7255
+ ],
7145
7256
  ['clear-state-program', this.clearStateProgram],
7146
7257
  ['extra-program-pages', this.extraProgramPages],
7147
7258
  ['foreign-apps', this.foreignApps],
@@ -7159,6 +7270,7 @@ export class TransactionApplication implements Encodable {
7159
7270
  : undefined,
7160
7271
  ],
7161
7272
  ['on-completion', this.onCompletion],
7273
+ ['reject-version', this.rejectVersion],
7162
7274
  ]);
7163
7275
  }
7164
7276
 
@@ -7171,6 +7283,12 @@ export class TransactionApplication implements Encodable {
7171
7283
  accounts: data.get('accounts'),
7172
7284
  applicationArgs: data.get('application-args'),
7173
7285
  approvalProgram: data.get('approval-program'),
7286
+ boxReferences:
7287
+ typeof data.get('box-references') !== 'undefined'
7288
+ ? data
7289
+ .get('box-references')
7290
+ .map((v: unknown) => BoxReference.fromEncodingData(v))
7291
+ : undefined,
7174
7292
  clearStateProgram: data.get('clear-state-program'),
7175
7293
  extraProgramPages: data.get('extra-program-pages'),
7176
7294
  foreignApps: data.get('foreign-apps'),
@@ -7184,6 +7302,7 @@ export class TransactionApplication implements Encodable {
7184
7302
  ? StateSchema.fromEncodingData(data.get('local-state-schema'))
7185
7303
  : undefined,
7186
7304
  onCompletion: data.get('on-completion'),
7305
+ rejectVersion: data.get('reject-version'),
7187
7306
  });
7188
7307
  }
7189
7308
  }
@@ -106,6 +106,26 @@ export default class SearchForTransactions extends JSONRequest<TransactionsRespo
106
106
  return this;
107
107
  }
108
108
 
109
+ /**
110
+ * Lookup transactions by group ID.
111
+ *
112
+ * #### Example
113
+ * ```typescript
114
+ * const groupIdBase64Encoded = "A62qVigWtWo0laUzcE1iZY8+KXWzK1vSkgwN/eKgvjc=";
115
+ * const txns = await indexerClient
116
+ * .searchForTransactions()
117
+ * .groupid(groupIdBase64Encoded)
118
+ * .do();
119
+ * ```
120
+ *
121
+ * @param groupid - base64 string or uint8array
122
+ * @category query
123
+ */
124
+ groupid(groupid: Uint8Array | string) {
125
+ this.query['group-id'] = base64StringFunnel(groupid);
126
+ return this;
127
+ }
128
+
109
129
  /**
110
130
  * Include results for the specified round.
111
131
  *
@@ -48,6 +48,9 @@ export class ByteArraySchema extends Schema {
48
48
  }
49
49
 
50
50
  public fromPreparedJSON(encoded: JSONEncodingData): Uint8Array {
51
+ if (encoded === null || encoded === undefined) {
52
+ return this.defaultValue();
53
+ }
51
54
  if (typeof encoded === 'string') {
52
55
  return base64ToBytes(encoded);
53
56
  }