algosdk 3.3.1 → 3.5.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 (64) 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/appAccess.js +261 -0
  5. package/dist/cjs/appAccess.js.map +1 -0
  6. package/dist/cjs/client/v2/algod/getTransactionProof.js +1 -1
  7. package/dist/cjs/client/v2/algod/getTransactionProof.js.map +1 -1
  8. package/dist/cjs/client/v2/algod/models/types.js +8 -8
  9. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  10. package/dist/cjs/client/v2/indexer/models/types.js +338 -8
  11. package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
  12. package/dist/cjs/client/v2/indexer/searchForTransactions.js +19 -0
  13. package/dist/cjs/client/v2/indexer/searchForTransactions.js.map +1 -1
  14. package/dist/cjs/encoding/schema/bytearray.js +3 -0
  15. package/dist/cjs/encoding/schema/bytearray.js.map +1 -1
  16. package/dist/cjs/logicsig.js +54 -17
  17. package/dist/cjs/logicsig.js.map +1 -1
  18. package/dist/cjs/makeTxn.js +66 -12
  19. package/dist/cjs/makeTxn.js.map +1 -1
  20. package/dist/cjs/signing.js +4 -4
  21. package/dist/cjs/signing.js.map +1 -1
  22. package/dist/cjs/transaction.js +107 -0
  23. package/dist/cjs/transaction.js.map +1 -1
  24. package/dist/esm/appAccess.js +255 -0
  25. package/dist/esm/appAccess.js.map +1 -0
  26. package/dist/esm/client/v2/algod/getTransactionProof.js +2 -2
  27. package/dist/esm/client/v2/algod/getTransactionProof.js.map +1 -1
  28. package/dist/esm/client/v2/algod/models/types.js +6 -6
  29. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  30. package/dist/esm/client/v2/indexer/models/types.js +332 -6
  31. package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
  32. package/dist/esm/client/v2/indexer/searchForTransactions.js +19 -0
  33. package/dist/esm/client/v2/indexer/searchForTransactions.js.map +1 -1
  34. package/dist/esm/encoding/schema/bytearray.js +3 -0
  35. package/dist/esm/encoding/schema/bytearray.js.map +1 -1
  36. package/dist/esm/logicsig.js +54 -17
  37. package/dist/esm/logicsig.js.map +1 -1
  38. package/dist/esm/makeTxn.js +66 -12
  39. package/dist/esm/makeTxn.js.map +1 -1
  40. package/dist/esm/signing.js +4 -4
  41. package/dist/esm/signing.js.map +1 -1
  42. package/dist/esm/transaction.js +107 -0
  43. package/dist/esm/transaction.js.map +1 -1
  44. package/dist/types/appAccess.d.ts +28 -0
  45. package/dist/types/client/v2/algod/getTransactionProof.d.ts +3 -3
  46. package/dist/types/client/v2/algod/models/types.d.ts +4 -4
  47. package/dist/types/client/v2/indexer/models/types.d.ts +202 -8
  48. package/dist/types/client/v2/indexer/searchForTransactions.d.ts +16 -0
  49. package/dist/types/logicsig.d.ts +2 -0
  50. package/dist/types/makeTxn.d.ts +9 -9
  51. package/dist/types/transaction.d.ts +17 -0
  52. package/dist/types/types/transactions/base.d.ts +71 -0
  53. package/package.json +2 -2
  54. package/src/appAccess.ts +298 -0
  55. package/src/client/v2/algod/getTransactionProof.ts +4 -4
  56. package/src/client/v2/algod/models/types.ts +7 -7
  57. package/src/client/v2/indexer/models/types.ts +542 -5
  58. package/src/client/v2/indexer/searchForTransactions.ts +20 -0
  59. package/src/encoding/schema/bytearray.ts +3 -0
  60. package/src/logicsig.ts +68 -17
  61. package/src/makeTxn.ts +110 -12
  62. package/src/signing.ts +4 -4
  63. package/src/transaction.ts +162 -0
  64. package/src/types/transactions/base.ts +85 -0
@@ -1153,6 +1153,10 @@ export declare class Block implements Encodable {
1153
1153
  * Participation account data that needs to be checked/acted on by the network.
1154
1154
  */
1155
1155
  participationUpdates?: ParticipationUpdates;
1156
+ /**
1157
+ * (prev512) Previous block hash, using SHA-512.
1158
+ */
1159
+ previousBlockHash512?: Uint8Array;
1156
1160
  /**
1157
1161
  * the proposer of this block.
1158
1162
  */
@@ -1173,6 +1177,12 @@ export declare class Block implements Encodable {
1173
1177
  * (txns) list of transactions corresponding to a given round.
1174
1178
  */
1175
1179
  transactions?: Transaction[];
1180
+ /**
1181
+ * (txn512) TransactionsRootSHA512 is an auxiliary TransactionRoot, built using a
1182
+ * vector commitment instead of a merkle tree, and SHA512 hash function instead of
1183
+ * the default SHA512_256.
1184
+ */
1185
+ transactionsRootSha512?: Uint8Array;
1176
1186
  /**
1177
1187
  * (tc) TxnCounter counts the number of transactions committed in the ledger, from
1178
1188
  * the time at which support for this feature was introduced.
@@ -1210,11 +1220,15 @@ export declare class Block implements Encodable {
1210
1220
  * @param bonus - the potential bonus payout for this block.
1211
1221
  * @param feesCollected - the sum of all fees paid by transactions in this block.
1212
1222
  * @param participationUpdates - Participation account data that needs to be checked/acted on by the network.
1223
+ * @param previousBlockHash512 - (prev512) Previous block hash, using SHA-512.
1213
1224
  * @param proposer - the proposer of this block.
1214
1225
  * @param proposerPayout - the actual amount transferred to the proposer from the fee sink.
1215
1226
  * @param rewards - Fields relating to rewards,
1216
1227
  * @param stateProofTracking - Tracks the status of state proofs.
1217
1228
  * @param transactions - (txns) list of transactions corresponding to a given round.
1229
+ * @param transactionsRootSha512 - (txn512) TransactionsRootSHA512 is an auxiliary TransactionRoot, built using a
1230
+ * vector commitment instead of a merkle tree, and SHA512 hash function instead of
1231
+ * the default SHA512_256.
1218
1232
  * @param txnCounter - (tc) TxnCounter counts the number of transactions committed in the ledger, from
1219
1233
  * the time at which support for this feature was introduced.
1220
1234
  * Specifically, TxnCounter is the number of the next transaction that will be
@@ -1223,7 +1237,7 @@ export declare class Block implements Encodable {
1223
1237
  * @param upgradeState - Fields relating to a protocol upgrade.
1224
1238
  * @param upgradeVote - Fields relating to voting for a protocol upgrade.
1225
1239
  */
1226
- constructor({ genesisHash, genesisId, previousBlockHash, round, seed, timestamp, transactionsRoot, transactionsRootSha256, bonus, feesCollected, participationUpdates, proposer, proposerPayout, rewards, stateProofTracking, transactions, txnCounter, upgradeState, upgradeVote, }: {
1240
+ constructor({ genesisHash, genesisId, previousBlockHash, round, seed, timestamp, transactionsRoot, transactionsRootSha256, bonus, feesCollected, participationUpdates, previousBlockHash512, proposer, proposerPayout, rewards, stateProofTracking, transactions, transactionsRootSha512, txnCounter, upgradeState, upgradeVote, }: {
1227
1241
  genesisHash: string | Uint8Array;
1228
1242
  genesisId: string;
1229
1243
  previousBlockHash: string | Uint8Array;
@@ -1235,11 +1249,13 @@ export declare class Block implements Encodable {
1235
1249
  bonus?: number | bigint;
1236
1250
  feesCollected?: number | bigint;
1237
1251
  participationUpdates?: ParticipationUpdates;
1252
+ previousBlockHash512?: string | Uint8Array;
1238
1253
  proposer?: Address | string;
1239
1254
  proposerPayout?: number | bigint;
1240
1255
  rewards?: BlockRewards;
1241
1256
  stateProofTracking?: StateProofTracking[];
1242
1257
  transactions?: Transaction[];
1258
+ transactionsRootSha512?: string | Uint8Array;
1243
1259
  txnCounter?: number | bigint;
1244
1260
  upgradeState?: BlockUpgradeState;
1245
1261
  upgradeVote?: BlockUpgradeVote;
@@ -1475,6 +1491,35 @@ export declare class BoxDescriptor implements Encodable {
1475
1491
  toEncodingData(): Map<string, unknown>;
1476
1492
  static fromEncodingData(data: unknown): BoxDescriptor;
1477
1493
  }
1494
+ /**
1495
+ * BoxReference names a box by its name and the application ID it belongs to.
1496
+ */
1497
+ export declare class BoxReference implements Encodable {
1498
+ private static encodingSchemaValue;
1499
+ static get encodingSchema(): Schema;
1500
+ /**
1501
+ * Application ID to which the box belongs, or zero if referring to the called
1502
+ * application.
1503
+ */
1504
+ app: number;
1505
+ /**
1506
+ * Base64 encoded box name
1507
+ */
1508
+ name: Uint8Array;
1509
+ /**
1510
+ * Creates a new `BoxReference` object.
1511
+ * @param app - Application ID to which the box belongs, or zero if referring to the called
1512
+ * application.
1513
+ * @param name - Base64 encoded box name
1514
+ */
1515
+ constructor({ app, name, }: {
1516
+ app: number | bigint;
1517
+ name: string | Uint8Array;
1518
+ });
1519
+ getEncodingSchema(): Schema;
1520
+ toEncodingData(): Map<string, unknown>;
1521
+ static fromEncodingData(data: unknown): BoxReference;
1522
+ }
1478
1523
  /**
1479
1524
  * Box names of an application
1480
1525
  */
@@ -1692,6 +1737,33 @@ export declare class HealthCheck implements Encodable {
1692
1737
  toEncodingData(): Map<string, unknown>;
1693
1738
  static fromEncodingData(data: unknown): HealthCheck;
1694
1739
  }
1740
+ /**
1741
+ * HoldingRef names a holding by referring to an Address and Asset it belongs to.
1742
+ */
1743
+ export declare class HoldingRef implements Encodable {
1744
+ private static encodingSchemaValue;
1745
+ static get encodingSchema(): Schema;
1746
+ /**
1747
+ * (d) Address in access list, or the sender of the transaction.
1748
+ */
1749
+ address: Address;
1750
+ /**
1751
+ * (s) Asset ID for asset in access list.
1752
+ */
1753
+ asset: number;
1754
+ /**
1755
+ * Creates a new `HoldingRef` object.
1756
+ * @param address - (d) Address in access list, or the sender of the transaction.
1757
+ * @param asset - (s) Asset ID for asset in access list.
1758
+ */
1759
+ constructor({ address, asset, }: {
1760
+ address: Address | string;
1761
+ asset: number | bigint;
1762
+ });
1763
+ getEncodingSchema(): Schema;
1764
+ toEncodingData(): Map<string, unknown>;
1765
+ static fromEncodingData(data: unknown): HoldingRef;
1766
+ }
1695
1767
  export declare class IndexerStateProofMessage implements Encodable {
1696
1768
  private static encodingSchemaValue;
1697
1769
  static get encodingSchema(): Schema;
@@ -1734,6 +1806,35 @@ export declare class IndexerStateProofMessage implements Encodable {
1734
1806
  toEncodingData(): Map<string, unknown>;
1735
1807
  static fromEncodingData(data: unknown): IndexerStateProofMessage;
1736
1808
  }
1809
+ /**
1810
+ * LocalsRef names a local state by referring to an Address and App it belongs to.
1811
+ */
1812
+ export declare class LocalsRef implements Encodable {
1813
+ private static encodingSchemaValue;
1814
+ static get encodingSchema(): Schema;
1815
+ /**
1816
+ * (d) Address in access list, or the sender of the transaction.
1817
+ */
1818
+ address: Address;
1819
+ /**
1820
+ * (p) Application ID for app in access list, or zero if referring to the called
1821
+ * application.
1822
+ */
1823
+ app: number;
1824
+ /**
1825
+ * Creates a new `LocalsRef` object.
1826
+ * @param address - (d) Address in access list, or the sender of the transaction.
1827
+ * @param app - (p) Application ID for app in access list, or zero if referring to the called
1828
+ * application.
1829
+ */
1830
+ constructor({ address, app, }: {
1831
+ address: Address | string;
1832
+ app: number | bigint;
1833
+ });
1834
+ getEncodingSchema(): Schema;
1835
+ toEncodingData(): Map<string, unknown>;
1836
+ static fromEncodingData(data: unknown): LocalsRef;
1837
+ }
1737
1838
  export declare class MerkleArrayProof implements Encodable {
1738
1839
  private static encodingSchemaValue;
1739
1840
  static get encodingSchema(): Schema;
@@ -1832,6 +1933,63 @@ export declare class ParticipationUpdates implements Encodable {
1832
1933
  toEncodingData(): Map<string, unknown>;
1833
1934
  static fromEncodingData(data: unknown): ParticipationUpdates;
1834
1935
  }
1936
+ /**
1937
+ * ResourceRef names a single resource. Only one of the fields should be set.
1938
+ */
1939
+ export declare class ResourceRef implements Encodable {
1940
+ private static encodingSchemaValue;
1941
+ static get encodingSchema(): Schema;
1942
+ /**
1943
+ * (d) Account whose balance record is accessible by the executing ApprovalProgram
1944
+ * or ClearStateProgram.
1945
+ */
1946
+ address?: Address;
1947
+ /**
1948
+ * (p) Application id whose GlobalState may be read by the executing
1949
+ * ApprovalProgram or ClearStateProgram.
1950
+ */
1951
+ applicationId?: number;
1952
+ /**
1953
+ * (s) Asset whose AssetParams may be read by the executing
1954
+ * ApprovalProgram or ClearStateProgram.
1955
+ */
1956
+ assetId?: number;
1957
+ /**
1958
+ * BoxReference names a box by its name and the application ID it belongs to.
1959
+ */
1960
+ box?: BoxReference;
1961
+ /**
1962
+ * HoldingRef names a holding by referring to an Address and Asset it belongs to.
1963
+ */
1964
+ holding?: HoldingRef;
1965
+ /**
1966
+ * LocalsRef names a local state by referring to an Address and App it belongs to.
1967
+ */
1968
+ local?: LocalsRef;
1969
+ /**
1970
+ * Creates a new `ResourceRef` object.
1971
+ * @param address - (d) Account whose balance record is accessible by the executing ApprovalProgram
1972
+ * or ClearStateProgram.
1973
+ * @param applicationId - (p) Application id whose GlobalState may be read by the executing
1974
+ * ApprovalProgram or ClearStateProgram.
1975
+ * @param assetId - (s) Asset whose AssetParams may be read by the executing
1976
+ * ApprovalProgram or ClearStateProgram.
1977
+ * @param box - BoxReference names a box by its name and the application ID it belongs to.
1978
+ * @param holding - HoldingRef names a holding by referring to an Address and Asset it belongs to.
1979
+ * @param local - LocalsRef names a local state by referring to an Address and App it belongs to.
1980
+ */
1981
+ constructor({ address, applicationId, assetId, box, holding, local, }: {
1982
+ address?: Address | string;
1983
+ applicationId?: number | bigint;
1984
+ assetId?: number | bigint;
1985
+ box?: BoxReference;
1986
+ holding?: HoldingRef;
1987
+ local?: LocalsRef;
1988
+ });
1989
+ getEncodingSchema(): Schema;
1990
+ toEncodingData(): Map<string, unknown>;
1991
+ static fromEncodingData(data: unknown): ResourceRef;
1992
+ }
1835
1993
  /**
1836
1994
  * (sp) represents a state proof.
1837
1995
  * Definition:
@@ -2473,6 +2631,12 @@ export declare class TransactionApplication implements Encodable {
2473
2631
  * (apid) ID of the application being configured or empty if creating.
2474
2632
  */
2475
2633
  applicationId: bigint;
2634
+ /**
2635
+ * (al) Access unifies `accounts`, `foreign-apps`, `foreign-assets`, and
2636
+ * `box-references` under a single list. If access is non-empty, these lists must
2637
+ * be empty. If access is empty, those lists may be non-empty.
2638
+ */
2639
+ access?: ResourceRef[];
2476
2640
  /**
2477
2641
  * (apat) List of accounts in addition to the sender that may be accessed from the
2478
2642
  * application's approval-program and clear-state-program.
@@ -2490,6 +2654,11 @@ export declare class TransactionApplication implements Encodable {
2490
2654
  * reject the transaction.
2491
2655
  */
2492
2656
  approvalProgram?: Uint8Array;
2657
+ /**
2658
+ * (apbx) the boxes that can be accessed by this transaction (and others in the
2659
+ * same group).
2660
+ */
2661
+ boxReferences?: BoxReference[];
2493
2662
  /**
2494
2663
  * (apsu) Logic executed for application transactions with on-completion set to
2495
2664
  * "clear". It can read and write global state for the application, as well as
@@ -2538,9 +2707,17 @@ export declare class TransactionApplication implements Encodable {
2538
2707
  * * delete
2539
2708
  */
2540
2709
  onCompletion?: string;
2710
+ /**
2711
+ * (aprv) the lowest application version for which this transaction should
2712
+ * immediately fail. 0 indicates that no version check should be performed.
2713
+ */
2714
+ rejectVersion?: number;
2541
2715
  /**
2542
2716
  * Creates a new `TransactionApplication` object.
2543
2717
  * @param applicationId - (apid) ID of the application being configured or empty if creating.
2718
+ * @param access - (al) Access unifies `accounts`, `foreign-apps`, `foreign-assets`, and
2719
+ * `box-references` under a single list. If access is non-empty, these lists must
2720
+ * be empty. If access is empty, those lists may be non-empty.
2544
2721
  * @param accounts - (apat) List of accounts in addition to the sender that may be accessed from the
2545
2722
  * application's approval-program and clear-state-program.
2546
2723
  * @param applicationArgs - (apaa) transaction specific arguments accessed from the application's
@@ -2549,6 +2726,8 @@ export declare class TransactionApplication implements Encodable {
2549
2726
  * on-completion is set to "clear". It can read and write global state for the
2550
2727
  * application, as well as account-specific local state. Approval programs may
2551
2728
  * reject the transaction.
2729
+ * @param boxReferences - (apbx) the boxes that can be accessed by this transaction (and others in the
2730
+ * same group).
2552
2731
  * @param clearStateProgram - (apsu) Logic executed for application transactions with on-completion set to
2553
2732
  * "clear". It can read and write global state for the application, as well as
2554
2733
  * account-specific local state. Clear state programs cannot reject the
@@ -2576,12 +2755,16 @@ export declare class TransactionApplication implements Encodable {
2576
2755
  * * update
2577
2756
  * * update
2578
2757
  * * delete
2758
+ * @param rejectVersion - (aprv) the lowest application version for which this transaction should
2759
+ * immediately fail. 0 indicates that no version check should be performed.
2579
2760
  */
2580
- constructor({ applicationId, accounts, applicationArgs, approvalProgram, clearStateProgram, extraProgramPages, foreignApps, foreignAssets, globalStateSchema, localStateSchema, onCompletion, }: {
2761
+ constructor({ applicationId, access, accounts, applicationArgs, approvalProgram, boxReferences, clearStateProgram, extraProgramPages, foreignApps, foreignAssets, globalStateSchema, localStateSchema, onCompletion, rejectVersion, }: {
2581
2762
  applicationId: number | bigint;
2763
+ access?: ResourceRef[];
2582
2764
  accounts?: (Address | string)[];
2583
2765
  applicationArgs?: Uint8Array[];
2584
2766
  approvalProgram?: string | Uint8Array;
2767
+ boxReferences?: BoxReference[];
2585
2768
  clearStateProgram?: string | Uint8Array;
2586
2769
  extraProgramPages?: number | bigint;
2587
2770
  foreignApps?: (number | bigint)[];
@@ -2589,6 +2772,7 @@ export declare class TransactionApplication implements Encodable {
2589
2772
  globalStateSchema?: StateSchema;
2590
2773
  localStateSchema?: StateSchema;
2591
2774
  onCompletion?: string;
2775
+ rejectVersion?: number | bigint;
2592
2776
  });
2593
2777
  getEncodingSchema(): Schema;
2594
2778
  toEncodingData(): Map<string, unknown>;
@@ -2935,7 +3119,7 @@ export declare class TransactionSignature implements Encodable {
2935
3119
  */
2936
3120
  logicsig?: TransactionSignatureLogicsig;
2937
3121
  /**
2938
- * (msig) structure holding multiple subsignatures.
3122
+ * structure holding multiple subsignatures.
2939
3123
  * Definition:
2940
3124
  * crypto/multisig.go : MultisigSig
2941
3125
  */
@@ -2949,7 +3133,7 @@ export declare class TransactionSignature implements Encodable {
2949
3133
  * @param logicsig - (lsig) Programatic transaction signature.
2950
3134
  * Definition:
2951
3135
  * data/transactions/logicsig.go
2952
- * @param multisig - (msig) structure holding multiple subsignatures.
3136
+ * @param multisig - structure holding multiple subsignatures.
2953
3137
  * Definition:
2954
3138
  * crypto/multisig.go : MultisigSig
2955
3139
  * @param sig - (sig) Standard ed25519 signature.
@@ -2981,7 +3165,13 @@ export declare class TransactionSignatureLogicsig implements Encodable {
2981
3165
  */
2982
3166
  args?: Uint8Array[];
2983
3167
  /**
2984
- * (msig) structure holding multiple subsignatures.
3168
+ * structure holding multiple subsignatures.
3169
+ * Definition:
3170
+ * crypto/multisig.go : MultisigSig
3171
+ */
3172
+ logicMultisigSignature?: TransactionSignatureMultisig;
3173
+ /**
3174
+ * structure holding multiple subsignatures.
2985
3175
  * Definition:
2986
3176
  * crypto/multisig.go : MultisigSig
2987
3177
  */
@@ -2995,14 +3185,18 @@ export declare class TransactionSignatureLogicsig implements Encodable {
2995
3185
  * @param logic - (l) Program signed by a signature or multi signature, or hashed to be the
2996
3186
  * address of ana ccount. Base64 encoded TEAL program.
2997
3187
  * @param args - (arg) Logic arguments, base64 encoded.
2998
- * @param multisigSignature - (msig) structure holding multiple subsignatures.
3188
+ * @param logicMultisigSignature - structure holding multiple subsignatures.
3189
+ * Definition:
3190
+ * crypto/multisig.go : MultisigSig
3191
+ * @param multisigSignature - structure holding multiple subsignatures.
2999
3192
  * Definition:
3000
3193
  * crypto/multisig.go : MultisigSig
3001
3194
  * @param signature - (sig) ed25519 signature.
3002
3195
  */
3003
- constructor({ logic, args, multisigSignature, signature, }: {
3196
+ constructor({ logic, args, logicMultisigSignature, multisigSignature, signature, }: {
3004
3197
  logic: string | Uint8Array;
3005
3198
  args?: Uint8Array[];
3199
+ logicMultisigSignature?: TransactionSignatureMultisig;
3006
3200
  multisigSignature?: TransactionSignatureMultisig;
3007
3201
  signature?: string | Uint8Array;
3008
3202
  });
@@ -3011,7 +3205,7 @@ export declare class TransactionSignatureLogicsig implements Encodable {
3011
3205
  static fromEncodingData(data: unknown): TransactionSignatureLogicsig;
3012
3206
  }
3013
3207
  /**
3014
- * (msig) structure holding multiple subsignatures.
3208
+ * structure holding multiple subsignatures.
3015
3209
  * Definition:
3016
3210
  * crypto/multisig.go : MultisigSig
3017
3211
  */
@@ -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
  *
@@ -20,6 +20,7 @@ export declare class LogicSig implements encoding.Encodable {
20
20
  args: Uint8Array[];
21
21
  sig?: Uint8Array;
22
22
  msig?: EncodedMultisig;
23
+ lmsig?: EncodedMultisig;
23
24
  constructor(program: Uint8Array, programArgs?: Array<Uint8Array> | null);
24
25
  getEncodingSchema(): encoding.Schema;
25
26
  toEncodingData(): Map<string, unknown>;
@@ -46,6 +47,7 @@ export declare class LogicSig implements encoding.Encodable {
46
47
  */
47
48
  appendToMultisig(secretKey: Uint8Array): void;
48
49
  signProgram(secretKey: Uint8Array): Uint8Array;
50
+ signProgramMultisig(secretKey: Uint8Array, msig: EncodedMultisig): Uint8Array;
49
51
  singleSignMultisig(secretKey: Uint8Array, msig: EncodedMultisig): [sig: Uint8Array, index: number];
50
52
  toByte(): Uint8Array;
51
53
  static fromByte(encoded: ArrayLike<any>): LogicSig;
@@ -1,5 +1,5 @@
1
1
  import { Transaction } from './transaction.js';
2
- import { SuggestedParams, PaymentTransactionParams, KeyRegistrationTransactionParams, AssetConfigurationTransactionParams, AssetTransferTransactionParams, AssetFreezeTransactionParams, ApplicationCallTransactionParams } from './types/transactions/base.js';
2
+ import { SuggestedParams, PaymentTransactionParams, KeyRegistrationTransactionParams, AssetConfigurationTransactionParams, AssetTransferTransactionParams, AssetFreezeTransactionParams, ApplicationCallTransactionParams, ApplicationCallReferenceParams } from './types/transactions/base.js';
3
3
  import { Address } from './encoding/address.js';
4
4
  /** Contains parameters common to every transaction type */
5
5
  export interface CommonTransactionParams {
@@ -120,46 +120,46 @@ export declare function makeAssetTransferTxnWithSuggestedParamsFromObject({ send
120
120
  *
121
121
  * @param options - Application call transaction parameters
122
122
  */
123
- export declare function makeApplicationCallTxnFromObject({ sender, appIndex, onComplete, appArgs, accounts, foreignApps, foreignAssets, boxes, approvalProgram, clearProgram, numLocalInts, numLocalByteSlices, numGlobalInts, numGlobalByteSlices, extraPages, note, lease, rekeyTo, suggestedParams, }: ApplicationCallTransactionParams & CommonTransactionParams): Transaction;
123
+ export declare function makeApplicationCallTxnFromObject({ sender, appIndex, onComplete, appArgs, accounts, foreignApps, foreignAssets, boxes, convertToAccess, holdings, locals, access, approvalProgram, clearProgram, numLocalInts, numLocalByteSlices, numGlobalInts, numGlobalByteSlices, extraPages, note, lease, rekeyTo, suggestedParams, }: ApplicationCallTransactionParams & CommonTransactionParams & ApplicationCallReferenceParams): Transaction;
124
124
  /**
125
125
  * Make a transaction that will create an application.
126
126
  *
127
127
  * @param options - Application creation transaction parameters
128
128
  */
129
- export declare function makeApplicationCreateTxnFromObject({ sender, onComplete, appArgs, accounts, foreignApps, foreignAssets, boxes, approvalProgram, clearProgram, numLocalInts, numLocalByteSlices, numGlobalInts, numGlobalByteSlices, extraPages, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'appIndex' | 'approvalProgram' | 'clearProgram'> & Required<Pick<ApplicationCallTransactionParams, 'approvalProgram' | 'clearProgram'>> & CommonTransactionParams): Transaction;
129
+ export declare function makeApplicationCreateTxnFromObject({ sender, onComplete, appArgs, accounts, foreignApps, foreignAssets, boxes, convertToAccess, holdings, locals, access, approvalProgram, clearProgram, numLocalInts, numLocalByteSlices, numGlobalInts, numGlobalByteSlices, extraPages, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'appIndex' | 'approvalProgram' | 'clearProgram'> & Required<Pick<ApplicationCallTransactionParams, 'approvalProgram' | 'clearProgram'>> & CommonTransactionParams & ApplicationCallReferenceParams): Transaction;
130
130
  /**
131
131
  * Make a transaction that changes an application's approval and clear programs
132
132
  *
133
133
  * @param options - Application update transaction parameters
134
134
  */
135
- export declare function makeApplicationUpdateTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, approvalProgram, clearProgram, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & Required<Pick<ApplicationCallTransactionParams, 'approvalProgram' | 'clearProgram'>> & CommonTransactionParams): Transaction;
135
+ export declare function makeApplicationUpdateTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, convertToAccess, holdings, locals, access, approvalProgram, clearProgram, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & Required<Pick<ApplicationCallTransactionParams, 'approvalProgram' | 'clearProgram'>> & CommonTransactionParams & ApplicationCallReferenceParams): Transaction;
136
136
  /**
137
137
  * Make a transaction that deletes an application
138
138
  *
139
139
  * @param options - Application deletion transaction parameters
140
140
  */
141
- export declare function makeApplicationDeleteTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & CommonTransactionParams): Transaction;
141
+ export declare function makeApplicationDeleteTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, convertToAccess, holdings, locals, access, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & CommonTransactionParams & ApplicationCallReferenceParams): Transaction;
142
142
  /**
143
143
  * Make a transaction that opts in to use an application
144
144
  *
145
145
  * @param options - Application opt-in transaction parameters
146
146
  */
147
- export declare function makeApplicationOptInTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & CommonTransactionParams): Transaction;
147
+ export declare function makeApplicationOptInTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, convertToAccess, holdings, locals, access, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & CommonTransactionParams & ApplicationCallReferenceParams): Transaction;
148
148
  /**
149
149
  * Make a transaction that closes out a user's state in an application
150
150
  *
151
151
  * @param options - Application close-out transaction parameters
152
152
  */
153
- export declare function makeApplicationCloseOutTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & CommonTransactionParams): Transaction;
153
+ export declare function makeApplicationCloseOutTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, convertToAccess, holdings, locals, access, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & CommonTransactionParams & ApplicationCallReferenceParams): Transaction;
154
154
  /**
155
155
  * Make a transaction that clears a user's state in an application
156
156
  *
157
157
  * @param options - Application clear state transaction parameters
158
158
  */
159
- export declare function makeApplicationClearStateTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & CommonTransactionParams): Transaction;
159
+ export declare function makeApplicationClearStateTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, convertToAccess, holdings, locals, access, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & CommonTransactionParams & ApplicationCallReferenceParams): Transaction;
160
160
  /**
161
161
  * Make a transaction that just calls an application, doing nothing on completion
162
162
  *
163
163
  * @param options - Application no-op transaction parameters
164
164
  */
165
- export declare function makeApplicationNoOpTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & CommonTransactionParams): Transaction;
165
+ export declare function makeApplicationNoOpTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, convertToAccess, holdings, locals, access, note, lease, rekeyTo, suggestedParams, }: Omit<ApplicationCallTransactionParams, 'onComplete' | 'numLocalInts' | 'numLocalByteSlices' | 'numGlobalInts' | 'numGlobalByteSlices' | 'extraPages' | 'approvalProgram' | 'clearProgram'> & CommonTransactionParams & ApplicationCallReferenceParams): Transaction;
@@ -8,6 +8,22 @@ export interface TransactionBoxReference {
8
8
  readonly appIndex: bigint;
9
9
  readonly name: Uint8Array;
10
10
  }
11
+ export interface TransactionHoldingReference {
12
+ readonly assetIndex: bigint;
13
+ readonly address: Address;
14
+ }
15
+ export interface TransactionLocalsReference {
16
+ readonly appIndex: bigint;
17
+ readonly address: Address;
18
+ }
19
+ export interface TransactionResourceReference {
20
+ readonly address?: Readonly<Address>;
21
+ readonly appIndex?: Readonly<bigint>;
22
+ readonly assetIndex?: Readonly<bigint>;
23
+ readonly holding?: Readonly<TransactionHoldingReference>;
24
+ readonly locals?: Readonly<TransactionLocalsReference>;
25
+ readonly box?: Readonly<TransactionBoxReference>;
26
+ }
11
27
  export interface PaymentTransactionFields {
12
28
  readonly receiver: Address;
13
29
  readonly amount: bigint;
@@ -63,6 +79,7 @@ export interface ApplicationTransactionFields {
63
79
  readonly foreignApps: ReadonlyArray<bigint>;
64
80
  readonly foreignAssets: ReadonlyArray<bigint>;
65
81
  readonly boxes: ReadonlyArray<TransactionBoxReference>;
82
+ readonly access: ReadonlyArray<TransactionResourceReference>;
66
83
  }
67
84
  export interface StateProofTransactionFields {
68
85
  readonly stateProofType: number;
@@ -134,6 +134,73 @@ export interface BoxReference {
134
134
  */
135
135
  name: Uint8Array;
136
136
  }
137
+ /**
138
+ * A grouping of the asset index and address of the account
139
+ */
140
+ export interface HoldingReference {
141
+ /**
142
+ * The asset index of the holding
143
+ */
144
+ assetIndex: number | bigint;
145
+ /**
146
+ * The address of the account holding the asset
147
+ */
148
+ address: string | Address;
149
+ }
150
+ /** A grouping of the application index and address of the account
151
+ */
152
+ export interface LocalsReference {
153
+ /**
154
+ * The application index of the local state
155
+ */
156
+ appIndex: number | bigint;
157
+ /**
158
+ * The address of the account holding the local state
159
+ */
160
+ address: string | Address;
161
+ }
162
+ /**
163
+ * Parameters for resource references in application transactions
164
+ */
165
+ export interface ApplicationCallReferenceParams {
166
+ /**
167
+ * A grouping of the asset index and address of the account
168
+ */
169
+ holdings?: HoldingReference[];
170
+ /** A grouping of the application index and address of the account
171
+ */
172
+ locals?: LocalsReference[];
173
+ /**
174
+ * If true, use the foreign accounts, apps, assets, boxes, holdings, and locals fields to construct the access list
175
+ */
176
+ convertToAccess?: boolean;
177
+ }
178
+ export interface ResourceReference {
179
+ /**
180
+ * Address string, any additional accounts to supply to the application
181
+ */
182
+ address?: string | Address;
183
+ /**
184
+ * Asset index uniquely specifying the asset
185
+ */
186
+ assetIndex?: number | bigint;
187
+ /**
188
+ * A unique application ID
189
+ */
190
+ appIndex?: number | bigint;
191
+ /**
192
+ * Holding definition: asset ID and account address
193
+ */
194
+ holding?: HoldingReference;
195
+ /**
196
+ * Local state definition: application ID and account address
197
+ */
198
+ locals?: LocalsReference;
199
+ /**
200
+ * Box definition: application ID and a name of the box
201
+ */
202
+ box?: BoxReference;
203
+ }
137
204
  /**
138
205
  * Contains payment transaction parameters.
139
206
  *
@@ -361,6 +428,10 @@ export interface ApplicationCallTransactionParams {
361
428
  * A grouping of the app ID and name of the box in an Uint8Array
362
429
  */
363
430
  boxes?: BoxReference[];
431
+ /**
432
+ * Resources accessed by the application
433
+ */
434
+ access?: ResourceReference[];
364
435
  }
365
436
  /**
366
437
  * Contains state proof transaction parameters.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "algosdk",
3
- "version": "3.3.1",
3
+ "version": "3.5.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",