algosdk 3.5.0 → 3.5.2

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.
@@ -314,6 +314,7 @@ export interface ApplicationTransactionFields {
314
314
  readonly foreignAssets: ReadonlyArray<bigint>;
315
315
  readonly boxes: ReadonlyArray<TransactionBoxReference>;
316
316
  readonly access: ReadonlyArray<TransactionResourceReference>;
317
+ readonly rejectVersion: number;
317
318
  }
318
319
 
319
320
  export interface StateProofTransactionFields {
@@ -587,6 +588,7 @@ export class Transaction implements encoding.Encodable {
587
588
  ),
588
589
  },
589
590
  { key: 'apep', valueSchema: new OptionalSchema(new Uint64Schema()) },
591
+ { key: 'aprv', valueSchema: new OptionalSchema(new Uint64Schema()) },
590
592
  // StateProof
591
593
  { key: 'sptype', valueSchema: new OptionalSchema(new Uint64Schema()) },
592
594
  { key: 'sp', valueSchema: new OptionalSchema(StateProof.encodingSchema) },
@@ -851,6 +853,9 @@ export class Transaction implements encoding.Encodable {
851
853
  access: ensureArray(params.appCallParams.access ?? []).map(
852
854
  ensureResourceReference
853
855
  ),
856
+ rejectVersion: utils.ensureSafeUnsignedInteger(
857
+ params.appCallParams.rejectVersion ?? 0
858
+ ),
854
859
  };
855
860
  }
856
861
 
@@ -1002,6 +1007,7 @@ export class Transaction implements encoding.Encodable {
1002
1007
  ])
1003
1008
  );
1004
1009
  data.set('apep', this.applicationCall.extraPages);
1010
+ data.set('aprv', this.applicationCall.rejectVersion);
1005
1011
  return data;
1006
1012
  }
1007
1013
 
@@ -1146,6 +1152,7 @@ export class Transaction implements encoding.Encodable {
1146
1152
  approvalProgram: data.get('apap'),
1147
1153
  clearProgram: data.get('apsu'),
1148
1154
  extraPages: data.get('apep'),
1155
+ rejectVersion: data.get('aprv') ?? 0,
1149
1156
  };
1150
1157
  const localSchema = data.get('apls') as Map<string, number> | undefined;
1151
1158
  if (localSchema) {
@@ -536,6 +536,12 @@ export interface ApplicationCallTransactionParams {
536
536
  * Resources accessed by the application
537
537
  */
538
538
  access?: ResourceReference[];
539
+
540
+ /**
541
+ * The lowest application version for which this transaction should immediately fail.
542
+ * 0 indicates that no version check should be performed.
543
+ */
544
+ rejectVersion?: number | bigint;
539
545
  }
540
546
 
541
547
  /**