algosdk 1.24.1 → 2.0.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 (105) hide show
  1. package/README.md +4 -4
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.LICENSE.txt +0 -18
  4. package/dist/browser/algosdk.min.js.map +1 -1
  5. package/dist/cjs/client/v2/algod/algod.js +1 -1
  6. package/dist/cjs/client/v2/algod/algod.js.map +1 -1
  7. package/dist/cjs/client/v2/algod/models/types.js +161 -123
  8. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  9. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js +0 -7
  10. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  11. package/dist/cjs/dryrun.js +16 -7
  12. package/dist/cjs/dryrun.js.map +1 -1
  13. package/dist/cjs/logicsig.js +3 -14
  14. package/dist/cjs/logicsig.js.map +1 -1
  15. package/dist/cjs/main.js +3 -6
  16. package/dist/cjs/main.js.map +1 -1
  17. package/dist/cjs/makeTxn.js +1 -193
  18. package/dist/cjs/makeTxn.js.map +1 -1
  19. package/dist/esm/client/v2/algod/algod.js +1 -1
  20. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  21. package/dist/esm/client/v2/algod/models/types.js +160 -120
  22. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  23. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js +0 -7
  24. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  25. package/dist/esm/dryrun.js +16 -7
  26. package/dist/esm/dryrun.js.map +1 -1
  27. package/dist/esm/logicsig.js +2 -12
  28. package/dist/esm/logicsig.js.map +1 -1
  29. package/dist/esm/main.js +1 -4
  30. package/dist/esm/main.js.map +1 -1
  31. package/dist/esm/makeTxn.js +0 -185
  32. package/dist/esm/makeTxn.js.map +1 -1
  33. package/dist/types/client/v2/algod/algod.d.ts +1 -1
  34. package/dist/types/client/v2/algod/models/types.d.ts +122 -67
  35. package/dist/types/client/v2/indexer/lookupAssetTransactions.d.ts +0 -4
  36. package/dist/types/logicsig.d.ts +2 -10
  37. package/dist/types/main.d.ts +1 -3
  38. package/dist/types/makeTxn.d.ts +1 -147
  39. package/dist/types/types/transactions/encoded.d.ts +0 -15
  40. package/package.json +1 -1
  41. package/src/client/v2/algod/algod.ts +2 -2
  42. package/src/client/v2/algod/models/types.ts +318 -249
  43. package/src/client/v2/indexer/lookupAssetTransactions.ts +0 -8
  44. package/src/dryrun.ts +13 -13
  45. package/src/logicsig.ts +2 -13
  46. package/src/main.ts +1 -5
  47. package/src/makeTxn.ts +0 -421
  48. package/src/types/transactions/encoded.ts +0 -17
  49. package/dist/cjs/client/algod.js +0 -295
  50. package/dist/cjs/client/algod.js.map +0 -1
  51. package/dist/cjs/logic/langspec.json +0 -2014
  52. package/dist/cjs/logic/logic.js +0 -262
  53. package/dist/cjs/logic/logic.js.map +0 -1
  54. package/dist/cjs/logicTemplates/dynamicfee.js +0 -192
  55. package/dist/cjs/logicTemplates/dynamicfee.js.map +0 -1
  56. package/dist/cjs/logicTemplates/htlc.js +0 -145
  57. package/dist/cjs/logicTemplates/htlc.js.map +0 -1
  58. package/dist/cjs/logicTemplates/index.js +0 -19
  59. package/dist/cjs/logicTemplates/index.js.map +0 -1
  60. package/dist/cjs/logicTemplates/limitorder.js +0 -167
  61. package/dist/cjs/logicTemplates/limitorder.js.map +0 -1
  62. package/dist/cjs/logicTemplates/periodicpayment.js +0 -163
  63. package/dist/cjs/logicTemplates/periodicpayment.js.map +0 -1
  64. package/dist/cjs/logicTemplates/split.js +0 -154
  65. package/dist/cjs/logicTemplates/split.js.map +0 -1
  66. package/dist/cjs/logicTemplates/templates.js +0 -67
  67. package/dist/cjs/logicTemplates/templates.js.map +0 -1
  68. package/dist/esm/client/algod.js +0 -295
  69. package/dist/esm/client/algod.js.map +0 -1
  70. package/dist/esm/logic/langspec.json +0 -2014
  71. package/dist/esm/logic/logic.js +0 -249
  72. package/dist/esm/logic/logic.js.map +0 -1
  73. package/dist/esm/logicTemplates/dynamicfee.js +0 -192
  74. package/dist/esm/logicTemplates/dynamicfee.js.map +0 -1
  75. package/dist/esm/logicTemplates/htlc.js +0 -145
  76. package/dist/esm/logicTemplates/htlc.js.map +0 -1
  77. package/dist/esm/logicTemplates/index.js +0 -19
  78. package/dist/esm/logicTemplates/index.js.map +0 -1
  79. package/dist/esm/logicTemplates/limitorder.js +0 -167
  80. package/dist/esm/logicTemplates/limitorder.js.map +0 -1
  81. package/dist/esm/logicTemplates/periodicpayment.js +0 -163
  82. package/dist/esm/logicTemplates/periodicpayment.js.map +0 -1
  83. package/dist/esm/logicTemplates/split.js +0 -154
  84. package/dist/esm/logicTemplates/split.js.map +0 -1
  85. package/dist/esm/logicTemplates/templates.js +0 -67
  86. package/dist/esm/logicTemplates/templates.js.map +0 -1
  87. package/dist/types/client/algod.d.ts +0 -162
  88. package/dist/types/logic/logic.d.ts +0 -45
  89. package/dist/types/logicTemplates/dynamicfee.d.ts +0 -59
  90. package/dist/types/logicTemplates/htlc.d.ts +0 -51
  91. package/dist/types/logicTemplates/index.d.ts +0 -16
  92. package/dist/types/logicTemplates/limitorder.d.ts +0 -70
  93. package/dist/types/logicTemplates/periodicpayment.d.ts +0 -58
  94. package/dist/types/logicTemplates/split.d.ts +0 -57
  95. package/dist/types/logicTemplates/templates.d.ts +0 -6
  96. package/src/client/algod.js +0 -365
  97. package/src/logic/langspec.json +0 -2014
  98. package/src/logic/logic.ts +0 -316
  99. package/src/logicTemplates/dynamicfee.js +0 -219
  100. package/src/logicTemplates/htlc.js +0 -165
  101. package/src/logicTemplates/index.js +0 -20
  102. package/src/logicTemplates/limitorder.js +0 -227
  103. package/src/logicTemplates/periodicpayment.js +0 -208
  104. package/src/logicTemplates/split.js +0 -208
  105. package/src/logicTemplates/templates.js +0 -78
@@ -176,14 +176,6 @@ export default class LookupAssetTransactions extends JSONRequest {
176
176
  return this;
177
177
  }
178
178
 
179
- /**
180
- * @deprecated Redundant query parameter. Asset ID is already passed into the method.
181
- */
182
- assetID(id: number) {
183
- this.query['asset-id'] = id;
184
- return this;
185
- }
186
-
187
179
  /**
188
180
  * Maximum number of results to return.
189
181
  *
package/src/dryrun.ts CHANGED
@@ -92,22 +92,22 @@ export async function createDryrun({
92
92
  // Create application,
93
93
  if (t.txn.appIndex === undefined || t.txn.appIndex === 0) {
94
94
  appInfos.push(
95
- new Application(
96
- defaultAppId,
97
- new ApplicationParams({
95
+ new Application({
96
+ id: defaultAppId,
97
+ params: new ApplicationParams({
98
98
  creator: encodeAddress(t.txn.from.publicKey),
99
99
  approvalProgram: t.txn.appApprovalProgram,
100
100
  clearStateProgram: t.txn.appClearProgram,
101
- localStateSchema: new ApplicationStateSchema(
102
- t.txn.appLocalInts,
103
- t.txn.appLocalByteSlices
104
- ),
105
- globalStateSchema: new ApplicationStateSchema(
106
- t.txn.appGlobalInts,
107
- t.txn.appGlobalByteSlices
108
- ),
109
- })
110
- )
101
+ localStateSchema: new ApplicationStateSchema({
102
+ numUint: t.txn.appLocalInts,
103
+ numByteSlice: t.txn.appLocalByteSlices,
104
+ }),
105
+ globalStateSchema: new ApplicationStateSchema({
106
+ numUint: t.txn.appGlobalInts,
107
+ numByteSlice: t.txn.appGlobalByteSlices,
108
+ }),
109
+ }),
110
+ })
111
111
  );
112
112
  } else {
113
113
  apps.push(t.txn.appIndex);
package/src/logicsig.ts CHANGED
@@ -54,6 +54,8 @@ export function sanityCheckProgram(program: Uint8Array) {
54
54
 
55
55
  /**
56
56
  LogicSig implementation
57
+
58
+ LogicSig cannot sign transactions in all cases. Instead, use LogicSigAccount as a safe, general purpose signing mechanism. Since LogicSig does not track the provided signature's public key, LogicSig cannot sign transactions when delegated to a non-multisig account _and_ the sender is not the delegating account.
57
59
  */
58
60
  export class LogicSig implements LogicSigStorageStructure {
59
61
  tag = Buffer.from('Program');
@@ -375,19 +377,6 @@ export class LogicSigAccount {
375
377
  }
376
378
  }
377
379
 
378
- /**
379
- * makeLogicSig creates LogicSig object from program and arguments
380
- *
381
- * @deprecated Use new LogicSigAccount(...) instead
382
- *
383
- * @param program - Program to make LogicSig from
384
- * @param args - Arguments as array of Uint8Array
385
- * @returns LogicSig object
386
- */
387
- export function makeLogicSig(program: Uint8Array, args?: Uint8Array[]) {
388
- return new LogicSig(program, args);
389
- }
390
-
391
380
  function signLogicSigTransactionWithAddress(
392
381
  txn: txnBuilder.Transaction,
393
382
  lsig: LogicSig,
package/src/main.ts CHANGED
@@ -2,7 +2,6 @@ import * as nacl from './nacl/naclWrappers';
2
2
  import * as address from './encoding/address';
3
3
  import * as encoding from './encoding/encoding';
4
4
  import * as txnBuilder from './transaction';
5
- import * as LogicTemplatesCommonJSExport from './logicTemplates';
6
5
  import Bid, { BidOptions } from './bid';
7
6
  import * as convert from './convert';
8
7
  import * as utils from './utils/utils';
@@ -117,7 +116,6 @@ export const ERROR_INVALID_MICROALGOS = new Error(
117
116
  convert.INVALID_MICROALGOS_ERROR_MSG
118
117
  );
119
118
 
120
- export * from './client/algod';
121
119
  export { default as Algodv2 } from './client/v2/algod/algod';
122
120
  export { default as Kmd } from './client/kmd';
123
121
  export { default as IntDecoding } from './types/intDecoding';
@@ -155,8 +153,8 @@ export {
155
153
  } from './convert';
156
154
  export { computeGroupID, assignGroupID } from './group';
157
155
  export {
156
+ LogicSig,
158
157
  LogicSigAccount,
159
- makeLogicSig,
160
158
  signLogicSigTransaction,
161
159
  signLogicSigTransactionObject,
162
160
  logicSigFromByte,
@@ -174,8 +172,6 @@ export {
174
172
  } from './multisig';
175
173
  export { SourceMap } from './logic/sourcemap';
176
174
 
177
- export const LogicTemplates = LogicTemplatesCommonJSExport.default;
178
-
179
175
  export * from './dryrun';
180
176
  export * from './makeTxn';
181
177
  export * from './transaction';
package/src/makeTxn.ts CHANGED
@@ -7,9 +7,7 @@ import {
7
7
 
8
8
  // Utilities
9
9
  TransactionType,
10
- SuggestedParams,
11
10
  MustHaveSuggestedParams,
12
- MustHaveSuggestedParamsInline,
13
11
  AssetCreateTxn,
14
12
  AssetConfigTxn,
15
13
  AssetDestroyTxn,
@@ -64,53 +62,6 @@ export function makePaymentTxnWithSuggestedParams(
64
62
  return new txnBuilder.Transaction(o);
65
63
  }
66
64
 
67
- /**
68
- * makePaymentTxn takes payment arguments and returns a Transaction object
69
- * @param from - string representation of Algorand address of sender
70
- * @param to - string representation of Algorand address of recipient
71
- * @param fee - integer fee per byte, in microAlgos. for a flat fee, overwrite the fee property on the returned object
72
- * If the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.
73
- * @param amount - integer amount to send, in microAlgos
74
- * @param closeRemainderTo - optionally close out remaining account balance to this account, represented as string rep of Algorand address
75
- * @param firstRound - integer first protocol round on which this txn is valid
76
- * @param lastRound - integer last protocol round on which this txn is valid
77
- * @param note - uint8array of arbitrary data for sender to store
78
- * @param genesisHash - string specifies hash genesis block of network in use
79
- * @param genesisID - string specifies genesis ID of network in use
80
- * @param rekeyTo - rekeyTo address, optional
81
- * @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
82
- */
83
- export function makePaymentTxn(
84
- from: PaymentTxn['from'],
85
- to: PaymentTxn['to'],
86
- fee: MustHaveSuggestedParamsInline<PaymentTxn>['fee'],
87
- amount: PaymentTxn['amount'],
88
- closeRemainderTo: PaymentTxn['closeRemainderTo'],
89
- firstRound: MustHaveSuggestedParamsInline<PaymentTxn>['firstRound'],
90
- lastRound: MustHaveSuggestedParamsInline<PaymentTxn>['lastRound'],
91
- note: PaymentTxn['note'],
92
- genesisHash: MustHaveSuggestedParamsInline<PaymentTxn>['genesisHash'],
93
- genesisID: MustHaveSuggestedParamsInline<PaymentTxn>['genesisID'],
94
- rekeyTo?: PaymentTxn['reKeyTo']
95
- ) {
96
- const suggestedParams: SuggestedParams = {
97
- genesisHash,
98
- genesisID,
99
- firstRound,
100
- lastRound,
101
- fee,
102
- };
103
- return makePaymentTxnWithSuggestedParams(
104
- from,
105
- to,
106
- amount,
107
- closeRemainderTo,
108
- note,
109
- suggestedParams,
110
- rekeyTo
111
- );
112
- }
113
-
114
65
  // helper for above makePaymentTxnWithSuggestedParams, instead accepting an arguments object
115
66
  export function makePaymentTxnWithSuggestedParamsFromObject(
116
67
  o: Expand<
@@ -217,102 +168,6 @@ export function makeKeyRegistrationTxnWithSuggestedParams(
217
168
  return new txnBuilder.Transaction(o);
218
169
  }
219
170
 
220
- /**
221
- * makeKeyRegistrationTxn takes key registration arguments and returns a Transaction object for
222
- * that key registration operation
223
- *
224
- * @param from - string representation of Algorand address of sender
225
- * @param fee - integer fee per byte, in microAlgos. for a flat fee, overwrite the fee property on the returned object
226
- * If the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.
227
- * @param firstRound - integer first protocol round on which this txn is valid
228
- * @param lastRound - integer last protocol round on which this txn is valid
229
- * @param note - uint8array of arbitrary data for sender to store
230
- * @param genesisHash - string specifies hash genesis block of network in use
231
- * @param genesisID - string specifies genesis ID of network in use
232
- * @param voteKey - voting key. for key deregistration, leave undefined
233
- * @param selectionKey - selection key. for key deregistration, leave undefined
234
- * @param voteFirst - first round on which voteKey is valid
235
- * @param voteLast - last round on which voteKey is valid
236
- * @param voteKeyDilution - integer
237
- * @param rekeyTo - rekeyTo address, optional
238
- * @param nonParticipation - configure whether the address wants to stop participating. If true,
239
- * voteKey, selectionKey, voteFirst, voteLast, and voteKeyDilution must be undefined.
240
- * @param stateProofKey - state proof key. for key deregistration, leave undefined
241
- * @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
242
- */
243
- export function makeKeyRegistrationTxn(
244
- from: KeyRegistrationTxn['from'],
245
- fee: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['fee'],
246
- firstRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['firstRound'],
247
- lastRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['lastRound'],
248
- note: KeyRegistrationTxn['note'],
249
- genesisHash: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisHash'],
250
- genesisID: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisID'],
251
- voteKey: KeyRegistrationTxn['voteKey'],
252
- selectionKey: KeyRegistrationTxn['selectionKey'],
253
- voteFirst: KeyRegistrationTxn['voteFirst'],
254
- voteLast: KeyRegistrationTxn['voteLast'],
255
- voteKeyDilution: KeyRegistrationTxn['voteKeyDilution'],
256
- rekeyTo?: KeyRegistrationTxn['reKeyTo'],
257
- nonParticipation?: false,
258
- stateProofKey?: KeyRegistrationTxn['stateProofKey']
259
- ): txnBuilder.Transaction;
260
- export function makeKeyRegistrationTxn(
261
- from: KeyRegistrationTxn['from'],
262
- fee: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['fee'],
263
- firstRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['firstRound'],
264
- lastRound: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['lastRound'],
265
- note: KeyRegistrationTxn['note'],
266
- genesisHash: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisHash'],
267
- genesisID: MustHaveSuggestedParamsInline<KeyRegistrationTxn>['genesisID'],
268
- voteKey: undefined,
269
- selectionKey: undefined,
270
- voteFirst: undefined,
271
- voteLast: undefined,
272
- voteKeyDilution: undefined,
273
- rekeyTo?: KeyRegistrationTxn['reKeyTo'],
274
- nonParticipation?: true,
275
- stateProofKey?: undefined
276
- ): txnBuilder.Transaction;
277
- export function makeKeyRegistrationTxn(
278
- from: any,
279
- fee: any,
280
- firstRound: any,
281
- lastRound: any,
282
- note: any,
283
- genesisHash: any,
284
- genesisID: any,
285
- voteKey: any,
286
- selectionKey: any,
287
- voteFirst: any,
288
- voteLast: any,
289
- voteKeyDilution: any,
290
- rekeyTo?: any,
291
- nonParticipation: any = false,
292
- stateProofKey: any = undefined
293
- ) {
294
- const suggestedParams: SuggestedParams = {
295
- genesisHash,
296
- genesisID,
297
- firstRound,
298
- lastRound,
299
- fee,
300
- };
301
- return makeKeyRegistrationTxnWithSuggestedParams(
302
- from,
303
- note,
304
- voteKey,
305
- selectionKey,
306
- voteFirst,
307
- voteLast,
308
- voteKeyDilution,
309
- suggestedParams,
310
- rekeyTo,
311
- nonParticipation,
312
- stateProofKey
313
- );
314
- }
315
-
316
171
  // helper for above makeKeyRegistrationTxnWithSuggestedParams, instead accepting an arguments object
317
172
  export function makeKeyRegistrationTxnWithSuggestedParamsFromObject(
318
173
  o: Expand<
@@ -431,78 +286,6 @@ export function makeAssetCreateTxnWithSuggestedParams(
431
286
  return new txnBuilder.Transaction(o);
432
287
  }
433
288
 
434
- /** makeAssetCreateTxn takes asset creation arguments and returns a Transaction object
435
- * for creating that asset
436
- *
437
- * @param from - string representation of Algorand address of sender
438
- * @param fee - integer fee per byte, in microAlgos. for a flat fee, overwrite the fee property on the returned object
439
- * If the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.
440
- * @param firstRound - integer first protocol round on which this txn is valid
441
- * @param lastRound - integer last protocol round on which this txn is valid
442
- * @param note - uint8array of arbitrary data for sender to store
443
- * @param genesisHash - string specifies hash genesis block of network in use
444
- * @param genesisID - string specifies genesis ID of network in use
445
- * @param total - integer total supply of the asset
446
- * @param decimals - integer number of decimals for asset unit calculation
447
- * @param defaultFrozen - boolean whether asset accounts should default to being frozen
448
- * @param manager - string representation of Algorand address in charge of reserve, freeze, clawback, destruction, etc
449
- * @param reserve - string representation of Algorand address representing asset reserve
450
- * @param freeze - string representation of Algorand address with power to freeze/unfreeze asset holdings
451
- * @param clawback - string representation of Algorand address with power to revoke asset holdings
452
- * @param unitName - string units name for this asset
453
- * @param assetName - string name for this asset
454
- * @param assetURL - string URL relating to this asset
455
- * @param assetMetadataHash - Uint8Array or UTF-8 string representation of a hash commitment with respect to the asset. Must be exactly 32 bytes long.
456
- * @param rekeyTo - rekeyTo address, optional
457
- * @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
458
- */
459
- export function makeAssetCreateTxn(
460
- from: AssetCreateTxn['from'],
461
- fee: MustHaveSuggestedParamsInline<AssetCreateTxn>['fee'],
462
- firstRound: MustHaveSuggestedParamsInline<AssetCreateTxn>['firstRound'],
463
- lastRound: MustHaveSuggestedParamsInline<AssetCreateTxn>['lastRound'],
464
- note: AssetCreateTxn['note'],
465
- genesisHash: MustHaveSuggestedParamsInline<AssetCreateTxn>['genesisHash'],
466
- genesisID: MustHaveSuggestedParamsInline<AssetCreateTxn>['genesisID'],
467
- total: AssetCreateTxn['assetTotal'],
468
- decimals: AssetCreateTxn['assetDecimals'],
469
- defaultFrozen: AssetCreateTxn['assetDefaultFrozen'],
470
- manager: AssetCreateTxn['assetManager'],
471
- reserve: AssetCreateTxn['assetManager'],
472
- freeze: AssetCreateTxn['assetFreeze'],
473
- clawback: AssetCreateTxn['assetClawback'],
474
- unitName: AssetCreateTxn['assetUnitName'],
475
- assetName: AssetCreateTxn['assetName'],
476
- assetURL: AssetCreateTxn['assetURL'],
477
- assetMetadataHash?: AssetCreateTxn['assetMetadataHash'],
478
- rekeyTo?: AssetCreateTxn['reKeyTo']
479
- ) {
480
- const suggestedParams: SuggestedParams = {
481
- genesisHash,
482
- genesisID,
483
- firstRound,
484
- lastRound,
485
- fee,
486
- };
487
- return makeAssetCreateTxnWithSuggestedParams(
488
- from,
489
- note,
490
- total,
491
- decimals,
492
- defaultFrozen,
493
- manager,
494
- reserve,
495
- freeze,
496
- clawback,
497
- unitName,
498
- assetName,
499
- assetURL,
500
- assetMetadataHash,
501
- suggestedParams,
502
- rekeyTo
503
- );
504
- }
505
-
506
289
  // helper for above makeAssetCreateTxnWithSuggestedParams, instead accepting an arguments object
507
290
  export function makeAssetCreateTxnWithSuggestedParamsFromObject(
508
291
  o: Expand<
@@ -618,64 +401,6 @@ export function makeAssetConfigTxnWithSuggestedParams(
618
401
  return new txnBuilder.Transaction(o);
619
402
  }
620
403
 
621
- /** makeAssetConfigTxn can be issued by the asset manager to change the manager, reserve, freeze, or clawback
622
- * you must respecify existing addresses to keep them the same; leaving a field blank is the same as turning
623
- * that feature off for this asset
624
- *
625
- * @param from - string representation of Algorand address of sender
626
- * @param fee - integer fee per byte, in microAlgos. for a flat fee, overwrite the fee property on the returned object
627
- * If the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.
628
- * @param firstRound - integer first protocol round on which this txn is valid
629
- * @param lastRound - integer last protocol round on which this txn is valid
630
- * @param note - uint8array of arbitrary data for sender to store
631
- * @param genesisHash - string specifies hash genesis block of network in use
632
- * @param genesisID - string specifies genesis ID of network in use
633
- * @param assetIndex - int asset index uniquely specifying the asset
634
- * @param manager - string representation of new asset manager Algorand address
635
- * @param reserve - string representation of new reserve Algorand address
636
- * @param freeze - string representation of new freeze manager Algorand address
637
- * @param clawback - string representation of new revocation manager Algorand address
638
- * @param strictEmptyAddressChecking - boolean - throw an error if any of manager, reserve, freeze, or clawback are undefined. optional, defaults to true.
639
- * @param rekeyTo - rekeyTo address, optional
640
- * @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
641
- */
642
- export function makeAssetConfigTxn(
643
- from: AssetConfigTxn['from'],
644
- fee: MustHaveSuggestedParamsInline<AssetConfigTxn>['fee'],
645
- firstRound: MustHaveSuggestedParamsInline<AssetConfigTxn>['firstRound'],
646
- lastRound: MustHaveSuggestedParamsInline<AssetConfigTxn>['lastRound'],
647
- note: AssetConfigTxn['note'],
648
- genesisHash: MustHaveSuggestedParamsInline<AssetConfigTxn>['genesisHash'],
649
- genesisID: MustHaveSuggestedParamsInline<AssetConfigTxn>['genesisID'],
650
- assetIndex: AssetConfigTxn['assetIndex'],
651
- manager: AssetConfigTxn['assetManager'],
652
- reserve: AssetConfigTxn['assetReserve'],
653
- freeze: AssetConfigTxn['assetFreeze'],
654
- clawback: AssetConfigTxn['assetClawback'],
655
- strictEmptyAddressChecking = true,
656
- rekeyTo?: AssetConfigTxn['reKeyTo']
657
- ) {
658
- const suggestedParams: SuggestedParams = {
659
- genesisHash,
660
- genesisID,
661
- firstRound,
662
- lastRound,
663
- fee,
664
- };
665
- return makeAssetConfigTxnWithSuggestedParams(
666
- from,
667
- note,
668
- assetIndex,
669
- manager,
670
- reserve,
671
- freeze,
672
- clawback,
673
- suggestedParams,
674
- strictEmptyAddressChecking,
675
- rekeyTo
676
- );
677
- }
678
-
679
404
  // helper for above makeAssetConfigTxnWithSuggestedParams, instead accepting an arguments object
680
405
  export function makeAssetConfigTxnWithSuggestedParamsFromObject(
681
406
  o: Expand<
@@ -752,48 +477,6 @@ export function makeAssetDestroyTxnWithSuggestedParams(
752
477
  return new txnBuilder.Transaction(o);
753
478
  }
754
479
 
755
- /** makeAssetDestroyTxn will allow the asset's manager to remove this asset from the ledger, so long
756
- * as all outstanding assets are held by the creator.
757
- *
758
- * @param from - string representation of Algorand address of sender
759
- * @param fee - integer fee per byte, in microAlgos. for a flat fee, overwrite the fee property on the returned object
760
- * If the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.
761
- * @param firstRound - integer first protocol round on which this txn is valid
762
- * @param lastRound - integer last protocol round on which this txn is valid
763
- * @param note - uint8array of arbitrary data for sender to store
764
- * @param genesisHash - string specifies hash genesis block of network in use
765
- * @param genesisID - string specifies genesis ID of network in use
766
- * @param assetIndex - int asset index uniquely specifying the asset
767
- * @param rekeyTo - rekeyTo address, optional
768
- * @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
769
- */
770
- export function makeAssetDestroyTxn(
771
- from: AssetDestroyTxn['from'],
772
- fee: MustHaveSuggestedParamsInline<AssetDestroyTxn>['fee'],
773
- firstRound: MustHaveSuggestedParamsInline<AssetDestroyTxn>['firstRound'],
774
- lastRound: MustHaveSuggestedParamsInline<AssetDestroyTxn>['lastRound'],
775
- note: AssetDestroyTxn['note'],
776
- genesisHash: MustHaveSuggestedParamsInline<AssetDestroyTxn>['genesisHash'],
777
- genesisID: MustHaveSuggestedParamsInline<AssetDestroyTxn>['genesisID'],
778
- assetIndex: AssetDestroyTxn['assetIndex'],
779
- rekeyTo?: AssetDestroyTxn['reKeyTo']
780
- ) {
781
- const suggestedParams: SuggestedParams = {
782
- genesisHash,
783
- genesisID,
784
- firstRound,
785
- lastRound,
786
- fee,
787
- };
788
- return makeAssetDestroyTxnWithSuggestedParams(
789
- from,
790
- note,
791
- assetIndex,
792
- suggestedParams,
793
- rekeyTo
794
- );
795
- }
796
-
797
480
  // helper for above makeAssetDestroyTxnWithSuggestedParams, instead accepting an arguments object
798
481
  export function makeAssetDestroyTxnWithSuggestedParamsFromObject(
799
482
  o: Expand<
@@ -856,54 +539,6 @@ export function makeAssetFreezeTxnWithSuggestedParams(
856
539
  return new txnBuilder.Transaction(o);
857
540
  }
858
541
 
859
- /** makeAssetFreezeTxn will allow the asset's freeze manager to freeze or un-freeze an account,
860
- * blocking or allowing asset transfers to and from the targeted account.
861
- *
862
- * @param from - string representation of Algorand address of sender
863
- * @param fee - integer fee per byte, in microAlgos. for a flat fee, overwrite the fee property on the returned object
864
- * If the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.
865
- * @param firstRound - integer first protocol round on which this txn is valid
866
- * @param lastRound - integer last protocol round on which this txn is valid
867
- * @param note - uint8array of arbitrary data for sender to store
868
- * @param genesisHash - string specifies hash genesis block of network in use
869
- * @param genesisID - string specifies genesis ID of network in use
870
- * @param assetIndex - int asset index uniquely specifying the asset
871
- * @param freezeTarget - string representation of Algorand address being frozen or unfrozen
872
- * @param freezeState - true if freezeTarget should be frozen, false if freezeTarget should be allowed to transact
873
- * @param rekeyTo - rekeyTo address, optional
874
- * @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
875
- */
876
- export function makeAssetFreezeTxn(
877
- from: AssetFreezeTxn['from'],
878
- fee: MustHaveSuggestedParamsInline<AssetFreezeTxn>['fee'],
879
- firstRound: MustHaveSuggestedParamsInline<AssetFreezeTxn>['firstRound'],
880
- lastRound: MustHaveSuggestedParamsInline<AssetFreezeTxn>['lastRound'],
881
- note: MustHaveSuggestedParamsInline<AssetFreezeTxn>['note'],
882
- genesisHash: MustHaveSuggestedParamsInline<AssetFreezeTxn>['genesisHash'],
883
- genesisID: MustHaveSuggestedParamsInline<AssetFreezeTxn>['genesisID'],
884
- assetIndex: AssetFreezeTxn['assetIndex'],
885
- freezeTarget: AssetFreezeTxn['freezeAccount'],
886
- freezeState: AssetFreezeTxn['freezeState'],
887
- rekeyTo?: AssetFreezeTxn['reKeyTo']
888
- ) {
889
- const suggestedParams: SuggestedParams = {
890
- genesisHash,
891
- genesisID,
892
- firstRound,
893
- lastRound,
894
- fee,
895
- };
896
- return makeAssetFreezeTxnWithSuggestedParams(
897
- from,
898
- note,
899
- assetIndex,
900
- freezeTarget,
901
- freezeState,
902
- suggestedParams,
903
- rekeyTo
904
- );
905
- }
906
-
907
542
  // helper for above makeAssetFreezeTxnWithSuggestedParams, instead accepting an arguments object
908
543
  export function makeAssetFreezeTxnWithSuggestedParamsFromObject(
909
544
  o: Expand<
@@ -986,62 +621,6 @@ export function makeAssetTransferTxnWithSuggestedParams(
986
621
  return new txnBuilder.Transaction(o);
987
622
  }
988
623
 
989
- /** makeAssetTransferTxn allows for the creation of an asset transfer transaction.
990
- * Special case: to begin accepting assets, set amount=0 and from=to.
991
- *
992
- * @param from - string representation of Algorand address of sender
993
- * @param to - string representation of Algorand address of asset recipient
994
- * @param closeRemainderTo - optional - string representation of Algorand address - if provided,
995
- * send all remaining assets after transfer to the "closeRemainderTo" address and close "from"'s asset holdings
996
- * @param revocationTarget - optional - string representation of Algorand address - if provided,
997
- * and if "from" is the asset's revocation manager, then deduct from "revocationTarget" rather than "from"
998
- * @param fee - integer fee per byte, in microAlgos. for a flat fee, overwrite the fee property on the returned object
999
- * If the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.
1000
- * @param amount - integer amount of assets to send
1001
- * @param firstRound - integer first protocol round on which this txn is valid
1002
- * @param lastRound - integer last protocol round on which this txn is valid
1003
- * @param note - uint8array of arbitrary data for sender to store
1004
- * @param genesisHash - string specifies hash genesis block of network in use
1005
- * @param genesisID - string specifies genesis ID of network in use
1006
- * @param assetIndex - int asset index uniquely specifying the asset
1007
- * @param rekeyTo - rekeyTo address, optional
1008
- * @Deprecated in version 2.0 this will change to use the "WithSuggestedParams" signature.
1009
- */
1010
- export function makeAssetTransferTxn(
1011
- from: AssetTransferTxn['from'],
1012
- to: AssetTransferTxn['to'],
1013
- closeRemainderTo: AssetTransferTxn['closeRemainderTo'],
1014
- revocationTarget: AssetTransferTxn['assetRevocationTarget'],
1015
- fee: MustHaveSuggestedParamsInline<AssetTransferTxn>['fee'],
1016
- amount: AssetTransferTxn['amount'],
1017
- firstRound: MustHaveSuggestedParamsInline<AssetTransferTxn>['firstRound'],
1018
- lastRound: MustHaveSuggestedParamsInline<AssetTransferTxn>['lastRound'],
1019
- note: AssetTransferTxn['note'],
1020
- genesisHash: MustHaveSuggestedParamsInline<AssetTransferTxn>['genesisHash'],
1021
- genesisID: MustHaveSuggestedParamsInline<AssetTransferTxn>['genesisID'],
1022
- assetIndex: AssetTransferTxn['assetIndex'],
1023
- rekeyTo?: AssetTransferTxn['reKeyTo']
1024
- ) {
1025
- const suggestedParams: SuggestedParams = {
1026
- genesisHash,
1027
- genesisID,
1028
- firstRound,
1029
- lastRound,
1030
- fee,
1031
- };
1032
- return makeAssetTransferTxnWithSuggestedParams(
1033
- from,
1034
- to,
1035
- closeRemainderTo,
1036
- revocationTarget,
1037
- amount,
1038
- note,
1039
- assetIndex,
1040
- suggestedParams,
1041
- rekeyTo
1042
- );
1043
- }
1044
-
1045
624
  // helper for above makeAssetTransferTxnWithSuggestedParams, instead accepting an arguments object
1046
625
  export function makeAssetTransferTxnWithSuggestedParamsFromObject(
1047
626
  o: Expand<
@@ -363,23 +363,6 @@ export interface EncodedMultisig {
363
363
  subsig: EncodedSubsig[];
364
364
  }
365
365
 
366
- /**
367
- * An encoded multisig blob that contains the encoded multisig as well as a copy of the encoded transaction
368
- *
369
- * @deprecated Use EncodedSignedTransaction instead.
370
- */
371
- export interface EncodedMultisigBlob {
372
- /**
373
- * Encoded multisig
374
- */
375
- msig: EncodedMultisig;
376
-
377
- /**
378
- * Encoded transaction
379
- */
380
- txn: EncodedTransaction;
381
- }
382
-
383
366
  export interface EncodedLogicSig {
384
367
  l: Uint8Array;
385
368
  arg?: Uint8Array[];