algosdk 3.5.2 → 3.7.0-beta.1

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 (133) 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/appAccess.js +8 -5
  5. package/dist/cjs/appAccess.js.map +1 -1
  6. package/dist/cjs/client/v2/algod/accountApplicationsInformation.js +38 -0
  7. package/dist/cjs/client/v2/algod/accountApplicationsInformation.js.map +1 -0
  8. package/dist/cjs/client/v2/algod/accountAssetsInformation.js +31 -0
  9. package/dist/cjs/client/v2/algod/accountAssetsInformation.js.map +1 -0
  10. package/dist/cjs/client/v2/algod/algod.js +23 -19
  11. package/dist/cjs/client/v2/algod/algod.js.map +1 -1
  12. package/dist/cjs/client/v2/algod/getApplicationBoxes.js +116 -5
  13. package/dist/cjs/client/v2/algod/getApplicationBoxes.js.map +1 -1
  14. package/dist/cjs/client/v2/algod/models/types.js +243 -452
  15. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  16. package/dist/cjs/ed25519-signer.js +76 -0
  17. package/dist/cjs/ed25519-signer.js.map +1 -0
  18. package/dist/cjs/encoding/address.js +61 -1
  19. package/dist/cjs/encoding/address.js.map +1 -1
  20. package/dist/cjs/falcon-signer.js +17 -0
  21. package/dist/cjs/falcon-signer.js.map +1 -0
  22. package/dist/cjs/logicsig.js +201 -16
  23. package/dist/cjs/logicsig.js.map +1 -1
  24. package/dist/cjs/main.js +32 -63
  25. package/dist/cjs/main.js.map +1 -1
  26. package/dist/cjs/mnemonic/mnemonic.js +26 -1
  27. package/dist/cjs/mnemonic/mnemonic.js.map +1 -1
  28. package/dist/cjs/multisigSigning.js +78 -1
  29. package/dist/cjs/multisigSigning.js.map +1 -1
  30. package/dist/cjs/pq-signer.js +54 -0
  31. package/dist/cjs/pq-signer.js.map +1 -0
  32. package/dist/cjs/signedTransaction.js +15 -1
  33. package/dist/cjs/signedTransaction.js.map +1 -1
  34. package/dist/cjs/signer.js.map +1 -1
  35. package/dist/cjs/signing.js +94 -7
  36. package/dist/cjs/signing.js.map +1 -1
  37. package/dist/cjs/transaction.js +9 -1
  38. package/dist/cjs/transaction.js.map +1 -1
  39. package/dist/cjs/types/transactions/encoded.js +51 -1
  40. package/dist/cjs/types/transactions/encoded.js.map +1 -1
  41. package/dist/cjs/utils/ed25519-check.js +69 -0
  42. package/dist/cjs/utils/ed25519-check.js.map +1 -0
  43. package/dist/esm/appAccess.js +8 -5
  44. package/dist/esm/appAccess.js.map +1 -1
  45. package/dist/esm/client/v2/algod/accountApplicationsInformation.js +32 -0
  46. package/dist/esm/client/v2/algod/accountApplicationsInformation.js.map +1 -0
  47. package/dist/esm/client/v2/algod/accountAssetsInformation.js +25 -0
  48. package/dist/esm/client/v2/algod/accountAssetsInformation.js.map +1 -0
  49. package/dist/esm/client/v2/algod/algod.js +23 -19
  50. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  51. package/dist/esm/client/v2/algod/getApplicationBoxes.js +116 -5
  52. package/dist/esm/client/v2/algod/getApplicationBoxes.js.map +1 -1
  53. package/dist/esm/client/v2/algod/models/types.js +239 -445
  54. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  55. package/dist/esm/ed25519-signer.js +72 -0
  56. package/dist/esm/ed25519-signer.js.map +1 -0
  57. package/dist/esm/encoding/address.js +58 -0
  58. package/dist/esm/encoding/address.js.map +1 -1
  59. package/dist/esm/falcon-signer.js +13 -0
  60. package/dist/esm/falcon-signer.js.map +1 -0
  61. package/dist/esm/logicsig.js +200 -15
  62. package/dist/esm/logicsig.js.map +1 -1
  63. package/dist/esm/main.js +8 -56
  64. package/dist/esm/main.js.map +1 -1
  65. package/dist/esm/mnemonic/mnemonic.js +25 -1
  66. package/dist/esm/mnemonic/mnemonic.js.map +1 -1
  67. package/dist/esm/multisigSigning.js +75 -0
  68. package/dist/esm/multisigSigning.js.map +1 -1
  69. package/dist/esm/pq-signer.js +50 -0
  70. package/dist/esm/pq-signer.js.map +1 -0
  71. package/dist/esm/signedTransaction.js +16 -2
  72. package/dist/esm/signedTransaction.js.map +1 -1
  73. package/dist/esm/signer.js.map +1 -1
  74. package/dist/esm/signing.js +91 -8
  75. package/dist/esm/signing.js.map +1 -1
  76. package/dist/esm/transaction.js +9 -1
  77. package/dist/esm/transaction.js.map +1 -1
  78. package/dist/esm/types/transactions/encoded.js +49 -1
  79. package/dist/esm/types/transactions/encoded.js.map +1 -1
  80. package/dist/esm/utils/ed25519-check.js +65 -0
  81. package/dist/esm/utils/ed25519-check.js.map +1 -0
  82. package/dist/types/client/v2/algod/accountApplicationsInformation.d.ts +16 -0
  83. package/dist/types/client/v2/algod/accountAssetsInformation.d.ts +12 -0
  84. package/dist/types/client/v2/algod/algod.d.ts +19 -17
  85. package/dist/types/client/v2/algod/getApplicationBoxes.d.ts +100 -5
  86. package/dist/types/client/v2/algod/models/types.d.ts +146 -232
  87. package/dist/types/ed25519-signer.d.ts +7 -0
  88. package/dist/types/encoding/address.d.ts +37 -0
  89. package/dist/types/falcon-signer.d.ts +11 -0
  90. package/dist/types/logicsig.d.ts +72 -1
  91. package/dist/types/main.d.ts +8 -44
  92. package/dist/types/mnemonic/mnemonic.d.ts +13 -0
  93. package/dist/types/multisigSigning.d.ts +49 -0
  94. package/dist/types/pq-signer.d.ts +8 -0
  95. package/dist/types/signedTransaction.d.ts +7 -2
  96. package/dist/types/signer.d.ts +38 -0
  97. package/dist/types/signing.d.ts +45 -0
  98. package/dist/types/transaction.d.ts +9 -0
  99. package/dist/types/types/transactions/encoded.d.ts +27 -0
  100. package/dist/types/utils/ed25519-check.d.ts +10 -0
  101. package/package.json +2 -1
  102. package/src/appAccess.ts +10 -5
  103. package/src/client/v2/algod/accountApplicationsInformation.ts +46 -0
  104. package/src/client/v2/algod/accountAssetsInformation.ts +33 -0
  105. package/src/client/v2/algod/algod.ts +25 -20
  106. package/src/client/v2/algod/getApplicationBoxes.ts +123 -5
  107. package/src/client/v2/algod/models/types.ts +523 -846
  108. package/src/ed25519-signer.ts +125 -0
  109. package/src/encoding/address.ts +80 -0
  110. package/src/falcon-signer.ts +30 -0
  111. package/src/logicsig.ts +258 -16
  112. package/src/main.ts +30 -60
  113. package/src/mnemonic/mnemonic.ts +34 -1
  114. package/src/multisigSigning.ts +111 -0
  115. package/src/pq-signer.ts +90 -0
  116. package/src/signedTransaction.ts +24 -0
  117. package/src/signer.ts +53 -0
  118. package/src/signing.ts +109 -8
  119. package/src/transaction.ts +9 -1
  120. package/src/types/transactions/encoded.ts +88 -0
  121. package/src/utils/ed25519-check.ts +67 -0
  122. package/dist/cjs/client/v2/algod/dryrun.js +0 -34
  123. package/dist/cjs/client/v2/algod/dryrun.js.map +0 -1
  124. package/dist/cjs/dryrun.js +0 -214
  125. package/dist/cjs/dryrun.js.map +0 -1
  126. package/dist/esm/client/v2/algod/dryrun.js +0 -28
  127. package/dist/esm/client/v2/algod/dryrun.js.map +0 -1
  128. package/dist/esm/dryrun.js +0 -208
  129. package/dist/esm/dryrun.js.map +0 -1
  130. package/dist/types/client/v2/algod/dryrun.d.ts +0 -11
  131. package/dist/types/dryrun.d.ts +0 -28
  132. package/src/client/v2/algod/dryrun.ts +0 -38
  133. package/src/dryrun.ts +0 -292
@@ -238,6 +238,60 @@ export declare class Account implements Encodable {
238
238
  toEncodingData(): Map<string, unknown>;
239
239
  static fromEncodingData(data: unknown): Account;
240
240
  }
241
+ /**
242
+ * AccountApplicationResource describes the account's application resource (local
243
+ * state and params if the account is the creator) for a specific application ID.
244
+ */
245
+ export declare class AccountApplicationResource implements Encodable {
246
+ private static encodingSchemaValue;
247
+ static get encodingSchema(): Schema;
248
+ /**
249
+ * The application ID.
250
+ */
251
+ id: number;
252
+ /**
253
+ * (appl) the application local data stored in this account.
254
+ * The raw account uses `AppLocalState` for this type.
255
+ */
256
+ appLocalState?: ApplicationLocalState;
257
+ /**
258
+ * Round when the account opted into or created the application.
259
+ */
260
+ createdAtRound?: number;
261
+ /**
262
+ * Whether the application has been deleted.
263
+ */
264
+ deleted?: boolean;
265
+ /**
266
+ * (appp) parameters of the application created by this account including app
267
+ * global data.
268
+ * The raw account uses `AppParams` for this type.
269
+ * Only present if the account is the creator and `include=params` is specified.
270
+ */
271
+ params?: ApplicationParams;
272
+ /**
273
+ * Creates a new `AccountApplicationResource` object.
274
+ * @param id - The application ID.
275
+ * @param appLocalState - (appl) the application local data stored in this account.
276
+ * The raw account uses `AppLocalState` for this type.
277
+ * @param createdAtRound - Round when the account opted into or created the application.
278
+ * @param deleted - Whether the application has been deleted.
279
+ * @param params - (appp) parameters of the application created by this account including app
280
+ * global data.
281
+ * The raw account uses `AppParams` for this type.
282
+ * Only present if the account is the creator and `include=params` is specified.
283
+ */
284
+ constructor({ id, appLocalState, createdAtRound, deleted, params, }: {
285
+ id: number | bigint;
286
+ appLocalState?: ApplicationLocalState;
287
+ createdAtRound?: number | bigint;
288
+ deleted?: boolean;
289
+ params?: ApplicationParams;
290
+ });
291
+ getEncodingSchema(): Schema;
292
+ toEncodingData(): Map<string, unknown>;
293
+ static fromEncodingData(data: unknown): AccountApplicationResource;
294
+ }
241
295
  /**
242
296
  * AccountApplicationResponse describes the account's application local state and
243
297
  * global state (AppLocalState and AppParams, if either exists) for a specific
@@ -280,6 +334,41 @@ export declare class AccountApplicationResponse implements Encodable {
280
334
  toEncodingData(): Map<string, unknown>;
281
335
  static fromEncodingData(data: unknown): AccountApplicationResponse;
282
336
  }
337
+ /**
338
+ * AccountApplicationsInformationResponse contains a list of application resources
339
+ * for an account.
340
+ */
341
+ export declare class AccountApplicationsInformationResponse implements Encodable {
342
+ private static encodingSchemaValue;
343
+ static get encodingSchema(): Schema;
344
+ /**
345
+ * The round for which this information is relevant.
346
+ */
347
+ round: number;
348
+ applicationResources?: AccountApplicationResource[];
349
+ /**
350
+ * Used for pagination, when making another request provide this token with the
351
+ * next parameter. The next token is the next application ID to use as the
352
+ * pagination cursor.
353
+ */
354
+ nextToken?: string;
355
+ /**
356
+ * Creates a new `AccountApplicationsInformationResponse` object.
357
+ * @param round - The round for which this information is relevant.
358
+ * @param applicationResources -
359
+ * @param nextToken - Used for pagination, when making another request provide this token with the
360
+ * next parameter. The next token is the next application ID to use as the
361
+ * pagination cursor.
362
+ */
363
+ constructor({ round, applicationResources, nextToken, }: {
364
+ round: number | bigint;
365
+ applicationResources?: AccountApplicationResource[];
366
+ nextToken?: string;
367
+ });
368
+ getEncodingSchema(): Schema;
369
+ toEncodingData(): Map<string, unknown>;
370
+ static fromEncodingData(data: unknown): AccountApplicationsInformationResponse;
371
+ }
283
372
  /**
284
373
  * AccountAssetHolding describes the account's asset holding and asset parameters
285
374
  * (if either exist) for a specific asset ID.
@@ -508,7 +597,7 @@ export declare class Application implements Encodable {
508
597
  /**
509
598
  * (appparams) application parameters.
510
599
  */
511
- params: ApplicationParams;
600
+ params?: ApplicationParams;
512
601
  /**
513
602
  * Creates a new `Application` object.
514
603
  * @param id - (appidx) application index.
@@ -516,7 +605,7 @@ export declare class Application implements Encodable {
516
605
  */
517
606
  constructor({ id, params, }: {
518
607
  id: number | bigint;
519
- params: ApplicationParams;
608
+ params?: ApplicationParams;
520
609
  });
521
610
  getEncodingSchema(): Schema;
522
611
  toEncodingData(): Map<string, unknown>;
@@ -684,6 +773,10 @@ export declare class ApplicationParams implements Encodable {
684
773
  * (lsch) local schema
685
774
  */
686
775
  localStateSchema?: ApplicationStateSchema;
776
+ /**
777
+ * (ss) the account responsible for extra pages and global state MBR
778
+ */
779
+ sizeSponsor?: Address;
687
780
  /**
688
781
  * (v) the number of updates to the application programs
689
782
  */
@@ -698,9 +791,10 @@ export declare class ApplicationParams implements Encodable {
698
791
  * @param globalState - (gs) global state
699
792
  * @param globalStateSchema - (gsch) global schema
700
793
  * @param localStateSchema - (lsch) local schema
794
+ * @param sizeSponsor - (ss) the account responsible for extra pages and global state MBR
701
795
  * @param version - (v) the number of updates to the application programs
702
796
  */
703
- constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, version, }: {
797
+ constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, sizeSponsor, version, }: {
704
798
  approvalProgram: string | Uint8Array;
705
799
  clearStateProgram: string | Uint8Array;
706
800
  creator: Address | string;
@@ -708,6 +802,7 @@ export declare class ApplicationParams implements Encodable {
708
802
  globalState?: TealKeyValue[];
709
803
  globalStateSchema?: ApplicationStateSchema;
710
804
  localStateSchema?: ApplicationStateSchema;
805
+ sizeSponsor?: Address | string;
711
806
  version?: number | bigint;
712
807
  });
713
808
  getEncodingSchema(): Schema;
@@ -806,7 +901,7 @@ export declare class Asset implements Encodable {
806
901
  * Definition:
807
902
  * data/transactions/asset.go : AssetParams
808
903
  */
809
- params: AssetParams;
904
+ params?: AssetParams;
810
905
  /**
811
906
  * Creates a new `Asset` object.
812
907
  * @param index - unique asset identifier
@@ -817,7 +912,7 @@ export declare class Asset implements Encodable {
817
912
  */
818
913
  constructor({ index, params, }: {
819
914
  index: number | bigint;
820
- params: AssetParams;
915
+ params?: AssetParams;
821
916
  });
822
917
  getEncodingSchema(): Schema;
823
918
  toEncodingData(): Map<string, unknown>;
@@ -1210,12 +1305,20 @@ export declare class BoxDescriptor implements Encodable {
1210
1305
  * Base64 encoded box name
1211
1306
  */
1212
1307
  name: Uint8Array;
1308
+ /**
1309
+ * Base64 encoded box value. Present only when the `values` query parameter is set
1310
+ * to true.
1311
+ */
1312
+ value?: Uint8Array;
1213
1313
  /**
1214
1314
  * Creates a new `BoxDescriptor` object.
1215
1315
  * @param name - Base64 encoded box name
1316
+ * @param value - Base64 encoded box value. Present only when the `values` query parameter is set
1317
+ * to true.
1216
1318
  */
1217
- constructor({ name }: {
1319
+ constructor({ name, value, }: {
1218
1320
  name: string | Uint8Array;
1321
+ value?: string | Uint8Array;
1219
1322
  });
1220
1323
  getEncodingSchema(): Schema;
1221
1324
  toEncodingData(): Map<string, unknown>;
@@ -1249,18 +1352,34 @@ export declare class BoxReference implements Encodable {
1249
1352
  static fromEncodingData(data: unknown): BoxReference;
1250
1353
  }
1251
1354
  /**
1252
- * Box names of an application
1355
+ * Boxes of an application
1253
1356
  */
1254
1357
  export declare class BoxesResponse implements Encodable {
1255
1358
  private static encodingSchemaValue;
1256
1359
  static get encodingSchema(): Schema;
1257
1360
  boxes: BoxDescriptor[];
1361
+ /**
1362
+ * Used for pagination, when making another request provide this token with the
1363
+ * next parameter. The next token is the box name to use as the pagination cursor,
1364
+ * encoded in the goal app call arg form.
1365
+ */
1366
+ nextToken?: string;
1367
+ /**
1368
+ * The round for which this information is relevant.
1369
+ */
1370
+ round?: number;
1258
1371
  /**
1259
1372
  * Creates a new `BoxesResponse` object.
1260
1373
  * @param boxes -
1374
+ * @param nextToken - Used for pagination, when making another request provide this token with the
1375
+ * next parameter. The next token is the box name to use as the pagination cursor,
1376
+ * encoded in the goal app call arg form.
1377
+ * @param round - The round for which this information is relevant.
1261
1378
  */
1262
- constructor({ boxes }: {
1379
+ constructor({ boxes, nextToken, round, }: {
1263
1380
  boxes: BoxDescriptor[];
1381
+ nextToken?: string;
1382
+ round?: number | bigint;
1264
1383
  });
1265
1384
  getEncodingSchema(): Schema;
1266
1385
  toEncodingData(): Map<string, unknown>;
@@ -1350,223 +1469,6 @@ export declare class DisassembleResponse implements Encodable {
1350
1469
  toEncodingData(): Map<string, unknown>;
1351
1470
  static fromEncodingData(data: unknown): DisassembleResponse;
1352
1471
  }
1353
- /**
1354
- * Request data type for dryrun endpoint. Given the Transactions and simulated
1355
- * ledger state upload, run TEAL scripts and return debugging information.
1356
- */
1357
- export declare class DryrunRequest implements Encodable {
1358
- private static encodingSchemaValue;
1359
- static get encodingSchema(): Schema;
1360
- accounts: Account[];
1361
- apps: Application[];
1362
- /**
1363
- * LatestTimestamp is available to some TEAL scripts. Defaults to the latest
1364
- * confirmed timestamp this algod is attached to.
1365
- */
1366
- latestTimestamp: number;
1367
- /**
1368
- * ProtocolVersion specifies a specific version string to operate under, otherwise
1369
- * whatever the current protocol of the network this algod is running in.
1370
- */
1371
- protocolVersion: string;
1372
- /**
1373
- * Round is available to some TEAL scripts. Defaults to the current round on the
1374
- * network this algod is attached to.
1375
- */
1376
- round: bigint;
1377
- sources: DryrunSource[];
1378
- txns: SignedTransaction[];
1379
- /**
1380
- * Creates a new `DryrunRequest` object.
1381
- * @param accounts -
1382
- * @param apps -
1383
- * @param latestTimestamp - LatestTimestamp is available to some TEAL scripts. Defaults to the latest
1384
- * confirmed timestamp this algod is attached to.
1385
- * @param protocolVersion - ProtocolVersion specifies a specific version string to operate under, otherwise
1386
- * whatever the current protocol of the network this algod is running in.
1387
- * @param round - Round is available to some TEAL scripts. Defaults to the current round on the
1388
- * network this algod is attached to.
1389
- * @param sources -
1390
- * @param txns -
1391
- */
1392
- constructor({ accounts, apps, latestTimestamp, protocolVersion, round, sources, txns, }: {
1393
- accounts: Account[];
1394
- apps: Application[];
1395
- latestTimestamp: number | bigint;
1396
- protocolVersion: string;
1397
- round: number | bigint;
1398
- sources: DryrunSource[];
1399
- txns: SignedTransaction[];
1400
- });
1401
- getEncodingSchema(): Schema;
1402
- toEncodingData(): Map<string, unknown>;
1403
- static fromEncodingData(data: unknown): DryrunRequest;
1404
- }
1405
- /**
1406
- * DryrunResponse contains per-txn debug information from a dryrun.
1407
- */
1408
- export declare class DryrunResponse implements Encodable {
1409
- private static encodingSchemaValue;
1410
- static get encodingSchema(): Schema;
1411
- error: string;
1412
- /**
1413
- * Protocol version is the protocol version Dryrun was operated under.
1414
- */
1415
- protocolVersion: string;
1416
- txns: DryrunTxnResult[];
1417
- /**
1418
- * Creates a new `DryrunResponse` object.
1419
- * @param error -
1420
- * @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.
1421
- * @param txns -
1422
- */
1423
- constructor({ error, protocolVersion, txns, }: {
1424
- error: string;
1425
- protocolVersion: string;
1426
- txns: DryrunTxnResult[];
1427
- });
1428
- getEncodingSchema(): Schema;
1429
- toEncodingData(): Map<string, unknown>;
1430
- static fromEncodingData(data: unknown): DryrunResponse;
1431
- }
1432
- /**
1433
- * DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into
1434
- * transactions or application state.
1435
- */
1436
- export declare class DryrunSource implements Encodable {
1437
- private static encodingSchemaValue;
1438
- static get encodingSchema(): Schema;
1439
- appIndex: bigint;
1440
- /**
1441
- * FieldName is what kind of sources this is. If lsig then it goes into the
1442
- * transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the
1443
- * Approval Program or Clear State Program of application[this.AppIndex].
1444
- */
1445
- fieldName: string;
1446
- source: string;
1447
- txnIndex: number;
1448
- /**
1449
- * Creates a new `DryrunSource` object.
1450
- * @param appIndex -
1451
- * @param fieldName - FieldName is what kind of sources this is. If lsig then it goes into the
1452
- * transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the
1453
- * Approval Program or Clear State Program of application[this.AppIndex].
1454
- * @param source -
1455
- * @param txnIndex -
1456
- */
1457
- constructor({ appIndex, fieldName, source, txnIndex, }: {
1458
- appIndex: number | bigint;
1459
- fieldName: string;
1460
- source: string;
1461
- txnIndex: number | bigint;
1462
- });
1463
- getEncodingSchema(): Schema;
1464
- toEncodingData(): Map<string, unknown>;
1465
- static fromEncodingData(data: unknown): DryrunSource;
1466
- }
1467
- /**
1468
- * Stores the TEAL eval step data
1469
- */
1470
- export declare class DryrunState implements Encodable {
1471
- private static encodingSchemaValue;
1472
- static get encodingSchema(): Schema;
1473
- /**
1474
- * Line number
1475
- */
1476
- line: number;
1477
- /**
1478
- * Program counter
1479
- */
1480
- pc: number;
1481
- stack: TealValue[];
1482
- /**
1483
- * Evaluation error if any
1484
- */
1485
- error?: string;
1486
- scratch?: TealValue[];
1487
- /**
1488
- * Creates a new `DryrunState` object.
1489
- * @param line - Line number
1490
- * @param pc - Program counter
1491
- * @param stack -
1492
- * @param error - Evaluation error if any
1493
- * @param scratch -
1494
- */
1495
- constructor({ line, pc, stack, error, scratch, }: {
1496
- line: number | bigint;
1497
- pc: number | bigint;
1498
- stack: TealValue[];
1499
- error?: string;
1500
- scratch?: TealValue[];
1501
- });
1502
- getEncodingSchema(): Schema;
1503
- toEncodingData(): Map<string, unknown>;
1504
- static fromEncodingData(data: unknown): DryrunState;
1505
- }
1506
- /**
1507
- * DryrunTxnResult contains any LogicSig or ApplicationCall program debug
1508
- * information and state updates from a dryrun.
1509
- */
1510
- export declare class DryrunTxnResult implements Encodable {
1511
- private static encodingSchemaValue;
1512
- static get encodingSchema(): Schema;
1513
- /**
1514
- * Disassembled program line by line.
1515
- */
1516
- disassembly: string[];
1517
- appCallMessages?: string[];
1518
- appCallTrace?: DryrunState[];
1519
- /**
1520
- * Budget added during execution of app call transaction.
1521
- */
1522
- budgetAdded?: number;
1523
- /**
1524
- * Budget consumed during execution of app call transaction.
1525
- */
1526
- budgetConsumed?: number;
1527
- /**
1528
- * Application state delta.
1529
- */
1530
- globalDelta?: EvalDeltaKeyValue[];
1531
- localDeltas?: AccountStateDelta[];
1532
- /**
1533
- * Disassembled lsig program line by line.
1534
- */
1535
- logicSigDisassembly?: string[];
1536
- logicSigMessages?: string[];
1537
- logicSigTrace?: DryrunState[];
1538
- logs?: Uint8Array[];
1539
- /**
1540
- * Creates a new `DryrunTxnResult` object.
1541
- * @param disassembly - Disassembled program line by line.
1542
- * @param appCallMessages -
1543
- * @param appCallTrace -
1544
- * @param budgetAdded - Budget added during execution of app call transaction.
1545
- * @param budgetConsumed - Budget consumed during execution of app call transaction.
1546
- * @param globalDelta - Application state delta.
1547
- * @param localDeltas -
1548
- * @param logicSigDisassembly - Disassembled lsig program line by line.
1549
- * @param logicSigMessages -
1550
- * @param logicSigTrace -
1551
- * @param logs -
1552
- */
1553
- constructor({ disassembly, appCallMessages, appCallTrace, budgetAdded, budgetConsumed, globalDelta, localDeltas, logicSigDisassembly, logicSigMessages, logicSigTrace, logs, }: {
1554
- disassembly: string[];
1555
- appCallMessages?: string[];
1556
- appCallTrace?: DryrunState[];
1557
- budgetAdded?: number | bigint;
1558
- budgetConsumed?: number | bigint;
1559
- globalDelta?: EvalDeltaKeyValue[];
1560
- localDeltas?: AccountStateDelta[];
1561
- logicSigDisassembly?: string[];
1562
- logicSigMessages?: string[];
1563
- logicSigTrace?: DryrunState[];
1564
- logs?: Uint8Array[];
1565
- });
1566
- getEncodingSchema(): Schema;
1567
- toEncodingData(): Map<string, unknown>;
1568
- static fromEncodingData(data: unknown): DryrunTxnResult;
1569
- }
1570
1472
  /**
1571
1473
  * An error response with optional data field.
1572
1474
  */
@@ -2897,9 +2799,16 @@ export declare class SupplyResponse implements Encodable {
2897
2799
  */
2898
2800
  currentRound: bigint;
2899
2801
  /**
2900
- * OnlineMoney
2802
+ * Total stake held by accounts with status Online at current_round, including
2803
+ * those whose participation keys have expired but have not yet been marked
2804
+ * offline.
2901
2805
  */
2902
2806
  onlineMoney: bigint;
2807
+ /**
2808
+ * Online stake used by agreement to vote for current_round, excluding accounts
2809
+ * whose participation keys have expired.
2810
+ */
2811
+ onlineStake: bigint;
2903
2812
  /**
2904
2813
  * TotalMoney
2905
2814
  */
@@ -2907,12 +2816,17 @@ export declare class SupplyResponse implements Encodable {
2907
2816
  /**
2908
2817
  * Creates a new `SupplyResponse` object.
2909
2818
  * @param currentRound - Round
2910
- * @param onlineMoney - OnlineMoney
2819
+ * @param onlineMoney - Total stake held by accounts with status Online at current_round, including
2820
+ * those whose participation keys have expired but have not yet been marked
2821
+ * offline.
2822
+ * @param onlineStake - Online stake used by agreement to vote for current_round, excluding accounts
2823
+ * whose participation keys have expired.
2911
2824
  * @param totalMoney - TotalMoney
2912
2825
  */
2913
- constructor({ currentRound, onlineMoney, totalMoney, }: {
2826
+ constructor({ currentRound, onlineMoney, onlineStake, totalMoney, }: {
2914
2827
  currentRound: number | bigint;
2915
2828
  onlineMoney: number | bigint;
2829
+ onlineStake: number | bigint;
2916
2830
  totalMoney: number | bigint;
2917
2831
  });
2918
2832
  getEncodingSchema(): Schema;
@@ -3027,8 +2941,8 @@ export declare class TransactionParametersResponse implements Encodable {
3027
2941
  */
3028
2942
  lastRound: bigint;
3029
2943
  /**
3030
- * The minimum transaction fee (not per byte) required for the
3031
- * txn to validate for the current network protocol.
2944
+ * The minimum transaction fee (not per byte) required for the txn to validate for
2945
+ * the current network protocol.
3032
2946
  */
3033
2947
  minFee: bigint;
3034
2948
  /**
@@ -3042,8 +2956,8 @@ export declare class TransactionParametersResponse implements Encodable {
3042
2956
  * @param genesisHash - GenesisHash is the hash of the genesis block.
3043
2957
  * @param genesisId - GenesisID is an ID listed in the genesis block.
3044
2958
  * @param lastRound - LastRound indicates the last round seen
3045
- * @param minFee - The minimum transaction fee (not per byte) required for the
3046
- * txn to validate for the current network protocol.
2959
+ * @param minFee - The minimum transaction fee (not per byte) required for the txn to validate for
2960
+ * the current network protocol.
3047
2961
  */
3048
2962
  constructor({ consensusVersion, fee, genesisHash, genesisId, lastRound, minFee, }: {
3049
2963
  consensusVersion: string;
@@ -0,0 +1,7 @@
1
+ import { Address } from './encoding/address.js';
2
+ import { AddressWithDelegatedLsigSigner, AddressWithMxBytesSigner, AddressWithProgramDataSigner, AddressWithTransactionSigner } from './signer.js';
3
+ export interface Ed25519SigningKey {
4
+ ed25519PublicKey: Uint8Array;
5
+ ed25519Signer: (bytesToSign: Uint8Array) => Promise<Uint8Array>;
6
+ }
7
+ export declare function addressWithSignersFromRawEd25519Signer(ed25519SigningKey: Ed25519SigningKey, sendingAddress?: Address): AddressWithTransactionSigner & AddressWithDelegatedLsigSigner & AddressWithMxBytesSigner & AddressWithProgramDataSigner;
@@ -1,9 +1,19 @@
1
+ import type { EncodedPQSig } from '../types/transactions/encoded.js';
1
2
  export declare const ALGORAND_ADDRESS_BYTE_LENGTH = 36;
2
3
  export declare const ALGORAND_CHECKSUM_BYTE_LENGTH = 4;
3
4
  export declare const ALGORAND_ADDRESS_LENGTH = 58;
4
5
  export declare const ALGORAND_ZERO_ADDRESS_STRING = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ";
5
6
  export declare const MALFORMED_ADDRESS_ERROR_MSG = "address seems to be malformed";
6
7
  export declare const CHECKSUM_ADDRESS_ERROR_MSG = "wrong checksum for address";
8
+ /**
9
+ * The required byte length of a post-quantum signature scheme identifier.
10
+ */
11
+ export declare const PQ_SCHEME_SIZE = 2;
12
+ /**
13
+ * The largest value a post-quantum address salt may take. The salt occupies a
14
+ * single byte of the address preimage.
15
+ */
16
+ export declare const PQ_SALT_MAX = 255;
7
17
  /**
8
18
  * Represents an Algorand address
9
19
  */
@@ -64,3 +74,30 @@ export declare function encodeAddress(address: Uint8Array): string;
64
74
  * @returns The address corresponding to that application's escrow account.
65
75
  */
66
76
  export declare function getApplicationAddress(appID: number | bigint): Address;
77
+ /**
78
+ * Derive a post-quantum (PQ) account address together with the canonical salt
79
+ * used to derive it.
80
+ *
81
+ * @param schemeBytes - The 2-byte ASCII PQ scheme identifier (e.g. "f1" for Falcon-1024).
82
+ * @param key - The scheme's canonical public key.
83
+ * @returns The derived Address and the canonical 1-byte salt.
84
+ */
85
+ export declare function addressFromPQKey(schemeBytes: Uint8Array, key: Uint8Array): {
86
+ address: Address;
87
+ salt: number;
88
+ };
89
+ /**
90
+ * Derive the account address that a post-quantum signature authorizes.
91
+ *
92
+ * Unlike an Ed25519 signature, a PQ signature carries the scheme, salt and
93
+ * public key of the signing account, so the address it authorizes is fully
94
+ * determined by the signature and does not have to be supplied out of band.
95
+ *
96
+ * This also validates the signature's self-consistency: the salt must be the
97
+ * canonical one for the given scheme and public key, which is what the network
98
+ * requires.
99
+ *
100
+ * @param pqsig - The post-quantum signature to derive the address from.
101
+ * @returns The address of the account the signature authorizes.
102
+ */
103
+ export declare function addressFromPQSig(pqsig: EncodedPQSig): Address;
@@ -0,0 +1,11 @@
1
+ import { Address } from './encoding/address.js';
2
+ import { AddressWithDelegatedLsigSigner, AddressWithTransactionSigner } from './signer.js';
3
+ /**
4
+ * The 2-byte ASCII identifier of the Falcon-1024 post-quantum signature scheme.
5
+ */
6
+ export declare const FALCON_1024_SCHEME: Uint8Array;
7
+ export interface Falcon1024SigningKey {
8
+ falcon1024PublicKey: Uint8Array;
9
+ falcon1024Signer: (bytesToSign: Uint8Array) => Promise<Uint8Array>;
10
+ }
11
+ export declare function addressWithSignersFromRawFalcon1024Signer(falconSigningKey: Falcon1024SigningKey, sendingAddress?: Address): AddressWithTransactionSigner & AddressWithDelegatedLsigSigner;