algosdk 1.24.1 → 2.1.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 (222) 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/abi/abi_type.js +6 -5
  6. package/dist/cjs/abi/abi_type.js.map +1 -1
  7. package/dist/cjs/bid.js +6 -5
  8. package/dist/cjs/bid.js.map +1 -1
  9. package/dist/cjs/client/client.js +4 -3
  10. package/dist/cjs/client/client.js.map +1 -1
  11. package/dist/cjs/client/kmd.js +12 -11
  12. package/dist/cjs/client/kmd.js.map +1 -1
  13. package/dist/cjs/client/urlTokenBaseHTTPClient.js +2 -1
  14. package/dist/cjs/client/urlTokenBaseHTTPClient.js.map +1 -1
  15. package/dist/cjs/client/v2/algod/algod.js +17 -1
  16. package/dist/cjs/client/v2/algod/algod.js.map +1 -1
  17. package/dist/cjs/client/v2/algod/compile.js +2 -1
  18. package/dist/cjs/client/v2/algod/compile.js.map +1 -1
  19. package/dist/cjs/client/v2/algod/disassemble.js +46 -0
  20. package/dist/cjs/client/v2/algod/disassemble.js.map +1 -0
  21. package/dist/cjs/client/v2/algod/dryrun.js +2 -1
  22. package/dist/cjs/client/v2/algod/dryrun.js.map +1 -1
  23. package/dist/cjs/client/v2/algod/getApplicationBoxByName.js +2 -1
  24. package/dist/cjs/client/v2/algod/getApplicationBoxByName.js.map +1 -1
  25. package/dist/cjs/client/v2/algod/models/types.js +182 -143
  26. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  27. package/dist/cjs/client/v2/algod/sendRawTransaction.js +2 -1
  28. package/dist/cjs/client/v2/algod/sendRawTransaction.js.map +1 -1
  29. package/dist/cjs/client/v2/basemodel.js +3 -2
  30. package/dist/cjs/client/v2/basemodel.js.map +1 -1
  31. package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js +2 -1
  32. package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
  33. package/dist/cjs/client/v2/indexer/lookupApplicationBoxByIDandName.js +2 -1
  34. package/dist/cjs/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -1
  35. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js +0 -7
  36. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  37. package/dist/cjs/client/v2/indexer/models/types.js +39 -38
  38. package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
  39. package/dist/cjs/composer.js +7 -6
  40. package/dist/cjs/composer.js.map +1 -1
  41. package/dist/cjs/dryrun.js +22 -12
  42. package/dist/cjs/dryrun.js.map +1 -1
  43. package/dist/cjs/encoding/address.js +2 -1
  44. package/dist/cjs/encoding/address.js.map +1 -1
  45. package/dist/cjs/encoding/bigint.js +2 -1
  46. package/dist/cjs/encoding/bigint.js.map +1 -1
  47. package/dist/cjs/encoding/uint64.js +14 -8
  48. package/dist/cjs/encoding/uint64.js.map +1 -1
  49. package/dist/cjs/group.js +6 -5
  50. package/dist/cjs/group.js.map +1 -1
  51. package/dist/cjs/logicsig.js +24 -21
  52. package/dist/cjs/logicsig.js.map +1 -1
  53. package/dist/cjs/main.js +8 -9
  54. package/dist/cjs/main.js.map +1 -1
  55. package/dist/cjs/makeTxn.js +1 -193
  56. package/dist/cjs/makeTxn.js.map +1 -1
  57. package/dist/cjs/multisig.js +6 -5
  58. package/dist/cjs/multisig.js.map +1 -1
  59. package/dist/cjs/transaction.js +64 -63
  60. package/dist/cjs/transaction.js.map +1 -1
  61. package/dist/cjs/types/transactions/encoded.js +0 -3
  62. package/dist/cjs/types/transactions/encoded.js.map +1 -1
  63. package/dist/cjs/utils/utils.js +5 -1
  64. package/dist/cjs/utils/utils.js.map +1 -1
  65. package/dist/esm/abi/abi_type.js +1 -0
  66. package/dist/esm/abi/abi_type.js.map +1 -1
  67. package/dist/esm/bid.js +1 -0
  68. package/dist/esm/bid.js.map +1 -1
  69. package/dist/esm/client/client.js +1 -0
  70. package/dist/esm/client/client.js.map +1 -1
  71. package/dist/esm/client/kmd.js +1 -0
  72. package/dist/esm/client/kmd.js.map +1 -1
  73. package/dist/esm/client/urlTokenBaseHTTPClient.js +1 -0
  74. package/dist/esm/client/urlTokenBaseHTTPClient.js.map +1 -1
  75. package/dist/esm/client/v2/algod/algod.js +17 -1
  76. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  77. package/dist/esm/client/v2/algod/compile.js +1 -0
  78. package/dist/esm/client/v2/algod/compile.js.map +1 -1
  79. package/dist/esm/client/v2/algod/disassemble.js +38 -0
  80. package/dist/esm/client/v2/algod/disassemble.js.map +1 -0
  81. package/dist/esm/client/v2/algod/dryrun.js +1 -0
  82. package/dist/esm/client/v2/algod/dryrun.js.map +1 -1
  83. package/dist/esm/client/v2/algod/getApplicationBoxByName.js +1 -0
  84. package/dist/esm/client/v2/algod/getApplicationBoxByName.js.map +1 -1
  85. package/dist/esm/client/v2/algod/models/types.js +161 -120
  86. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  87. package/dist/esm/client/v2/algod/sendRawTransaction.js +1 -0
  88. package/dist/esm/client/v2/algod/sendRawTransaction.js.map +1 -1
  89. package/dist/esm/client/v2/basemodel.js +1 -0
  90. package/dist/esm/client/v2/basemodel.js.map +1 -1
  91. package/dist/esm/client/v2/indexer/lookupAccountTransactions.js +1 -0
  92. package/dist/esm/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
  93. package/dist/esm/client/v2/indexer/lookupApplicationBoxByIDandName.js +1 -0
  94. package/dist/esm/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -1
  95. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js +0 -7
  96. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  97. package/dist/esm/client/v2/indexer/models/types.js +1 -0
  98. package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
  99. package/dist/esm/composer.js +5 -4
  100. package/dist/esm/composer.js.map +1 -1
  101. package/dist/esm/dryrun.js +17 -7
  102. package/dist/esm/dryrun.js.map +1 -1
  103. package/dist/esm/encoding/address.js +1 -0
  104. package/dist/esm/encoding/address.js.map +1 -1
  105. package/dist/esm/encoding/bigint.js +1 -0
  106. package/dist/esm/encoding/bigint.js.map +1 -1
  107. package/dist/esm/encoding/uint64.js +14 -8
  108. package/dist/esm/encoding/uint64.js.map +1 -1
  109. package/dist/esm/group.js +1 -0
  110. package/dist/esm/group.js.map +1 -1
  111. package/dist/esm/logicsig.js +15 -12
  112. package/dist/esm/logicsig.js.map +1 -1
  113. package/dist/esm/main.js +2 -4
  114. package/dist/esm/main.js.map +1 -1
  115. package/dist/esm/makeTxn.js +0 -185
  116. package/dist/esm/makeTxn.js.map +1 -1
  117. package/dist/esm/multisig.js +1 -0
  118. package/dist/esm/multisig.js.map +1 -1
  119. package/dist/esm/transaction.js +1 -0
  120. package/dist/esm/transaction.js.map +1 -1
  121. package/dist/esm/types/transactions/encoded.js +0 -3
  122. package/dist/esm/types/transactions/encoded.js.map +1 -1
  123. package/dist/esm/utils/utils.js +5 -1
  124. package/dist/esm/utils/utils.js.map +1 -1
  125. package/dist/types/client/v2/algod/algod.d.ts +15 -1
  126. package/dist/types/client/v2/algod/disassemble.d.ts +20 -0
  127. package/dist/types/client/v2/algod/models/types.d.ts +122 -67
  128. package/dist/types/client/v2/basemodel.d.ts +0 -3
  129. package/dist/types/client/v2/indexer/lookupAssetTransactions.d.ts +0 -4
  130. package/dist/types/composer.d.ts +7 -1
  131. package/dist/types/logicsig.d.ts +10 -10
  132. package/dist/types/main.d.ts +1 -3
  133. package/dist/types/makeTxn.d.ts +1 -147
  134. package/dist/types/types/transactions/encoded.d.ts +1 -16
  135. package/package.json +2 -3
  136. package/src/abi/abi_type.ts +1 -0
  137. package/src/bid.ts +1 -0
  138. package/src/client/client.ts +1 -0
  139. package/src/client/kmd.ts +1 -0
  140. package/src/client/urlTokenBaseHTTPClient.ts +1 -0
  141. package/src/client/v2/algod/algod.ts +19 -2
  142. package/src/client/v2/algod/compile.ts +1 -0
  143. package/src/client/v2/algod/disassemble.ts +46 -0
  144. package/src/client/v2/algod/dryrun.ts +1 -0
  145. package/src/client/v2/algod/getApplicationBoxByName.ts +1 -0
  146. package/src/client/v2/algod/models/types.ts +319 -249
  147. package/src/client/v2/algod/sendRawTransaction.ts +1 -0
  148. package/src/client/v2/basemodel.ts +2 -0
  149. package/src/client/v2/indexer/lookupAccountTransactions.ts +1 -0
  150. package/src/client/v2/indexer/lookupApplicationBoxByIDandName.ts +1 -0
  151. package/src/client/v2/indexer/lookupAssetTransactions.ts +0 -8
  152. package/src/client/v2/indexer/models/types.ts +1 -0
  153. package/src/composer.ts +16 -3
  154. package/src/dryrun.ts +14 -13
  155. package/src/encoding/address.ts +1 -0
  156. package/src/encoding/bigint.ts +2 -0
  157. package/src/encoding/uint64.ts +16 -10
  158. package/src/group.ts +1 -0
  159. package/src/logicsig.ts +26 -13
  160. package/src/main.ts +3 -5
  161. package/src/makeTxn.ts +0 -421
  162. package/src/multisig.ts +1 -0
  163. package/src/transaction.ts +1 -0
  164. package/src/types/transactions/encoded.ts +2 -17
  165. package/src/utils/utils.ts +3 -0
  166. package/dist/cjs/client/algod.js +0 -295
  167. package/dist/cjs/client/algod.js.map +0 -1
  168. package/dist/cjs/logic/langspec.json +0 -2014
  169. package/dist/cjs/logic/logic.js +0 -262
  170. package/dist/cjs/logic/logic.js.map +0 -1
  171. package/dist/cjs/logicTemplates/dynamicfee.js +0 -192
  172. package/dist/cjs/logicTemplates/dynamicfee.js.map +0 -1
  173. package/dist/cjs/logicTemplates/htlc.js +0 -145
  174. package/dist/cjs/logicTemplates/htlc.js.map +0 -1
  175. package/dist/cjs/logicTemplates/index.js +0 -19
  176. package/dist/cjs/logicTemplates/index.js.map +0 -1
  177. package/dist/cjs/logicTemplates/limitorder.js +0 -167
  178. package/dist/cjs/logicTemplates/limitorder.js.map +0 -1
  179. package/dist/cjs/logicTemplates/periodicpayment.js +0 -163
  180. package/dist/cjs/logicTemplates/periodicpayment.js.map +0 -1
  181. package/dist/cjs/logicTemplates/split.js +0 -154
  182. package/dist/cjs/logicTemplates/split.js.map +0 -1
  183. package/dist/cjs/logicTemplates/templates.js +0 -67
  184. package/dist/cjs/logicTemplates/templates.js.map +0 -1
  185. package/dist/esm/client/algod.js +0 -295
  186. package/dist/esm/client/algod.js.map +0 -1
  187. package/dist/esm/logic/langspec.json +0 -2014
  188. package/dist/esm/logic/logic.js +0 -249
  189. package/dist/esm/logic/logic.js.map +0 -1
  190. package/dist/esm/logicTemplates/dynamicfee.js +0 -192
  191. package/dist/esm/logicTemplates/dynamicfee.js.map +0 -1
  192. package/dist/esm/logicTemplates/htlc.js +0 -145
  193. package/dist/esm/logicTemplates/htlc.js.map +0 -1
  194. package/dist/esm/logicTemplates/index.js +0 -19
  195. package/dist/esm/logicTemplates/index.js.map +0 -1
  196. package/dist/esm/logicTemplates/limitorder.js +0 -167
  197. package/dist/esm/logicTemplates/limitorder.js.map +0 -1
  198. package/dist/esm/logicTemplates/periodicpayment.js +0 -163
  199. package/dist/esm/logicTemplates/periodicpayment.js.map +0 -1
  200. package/dist/esm/logicTemplates/split.js +0 -154
  201. package/dist/esm/logicTemplates/split.js.map +0 -1
  202. package/dist/esm/logicTemplates/templates.js +0 -67
  203. package/dist/esm/logicTemplates/templates.js.map +0 -1
  204. package/dist/types/client/algod.d.ts +0 -162
  205. package/dist/types/logic/logic.d.ts +0 -45
  206. package/dist/types/logicTemplates/dynamicfee.d.ts +0 -59
  207. package/dist/types/logicTemplates/htlc.d.ts +0 -51
  208. package/dist/types/logicTemplates/index.d.ts +0 -16
  209. package/dist/types/logicTemplates/limitorder.d.ts +0 -70
  210. package/dist/types/logicTemplates/periodicpayment.d.ts +0 -58
  211. package/dist/types/logicTemplates/split.d.ts +0 -57
  212. package/dist/types/logicTemplates/templates.d.ts +0 -6
  213. package/src/client/algod.js +0 -365
  214. package/src/logic/langspec.json +0 -2014
  215. package/src/logic/logic.ts +0 -316
  216. package/src/logicTemplates/dynamicfee.js +0 -219
  217. package/src/logicTemplates/htlc.js +0 -165
  218. package/src/logicTemplates/index.js +0 -20
  219. package/src/logicTemplates/limitorder.js +0 -227
  220. package/src/logicTemplates/periodicpayment.js +0 -208
  221. package/src/logicTemplates/split.js +0 -208
  222. package/src/logicTemplates/templates.js +0 -78
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<
package/src/multisig.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Buffer } from 'buffer';
1
2
  import * as nacl from './nacl/naclWrappers';
2
3
  import * as address from './encoding/address';
3
4
  import * as encoding from './encoding/encoding';
@@ -1,3 +1,4 @@
1
+ import { Buffer } from 'buffer';
1
2
  import base32 from 'hi-base32';
2
3
  import * as address from './encoding/address';
3
4
  import * as encoding from './encoding/encoding';
@@ -1,3 +1,5 @@
1
+ import { Buffer } from 'buffer';
2
+
1
3
  /**
2
4
  * Interfaces for the encoded transaction object. Every property is labelled with its associated Transaction type property
3
5
  */
@@ -363,23 +365,6 @@ export interface EncodedMultisig {
363
365
  subsig: EncodedSubsig[];
364
366
  }
365
367
 
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
368
  export interface EncodedLogicSig {
384
369
  l: Uint8Array;
385
370
  arg?: Uint8Array[];
@@ -114,8 +114,11 @@ export function removeUndefinedProperties(
114
114
  */
115
115
  export function isNode() {
116
116
  return (
117
+ // @ts-ignore
117
118
  typeof process === 'object' &&
119
+ // @ts-ignore
118
120
  typeof process.versions === 'object' &&
121
+ // @ts-ignore
119
122
  typeof process.versions.node !== 'undefined'
120
123
  );
121
124
  }