algosdk 1.12.0 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +4 -4
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.map +1 -1
  4. package/dist/cjs/src/abi/abi_type.js +693 -0
  5. package/dist/cjs/src/abi/abi_type.js.map +1 -0
  6. package/dist/cjs/src/abi/contract.js +27 -0
  7. package/dist/cjs/src/abi/contract.js.map +1 -0
  8. package/dist/cjs/src/abi/index.js +19 -0
  9. package/dist/cjs/src/abi/index.js.map +1 -0
  10. package/dist/cjs/src/abi/interface.js +23 -0
  11. package/dist/cjs/src/abi/interface.js.map +1 -0
  12. package/dist/cjs/src/abi/method.js +114 -0
  13. package/dist/cjs/src/abi/method.js.map +1 -0
  14. package/dist/cjs/src/abi/reference.js +25 -0
  15. package/dist/cjs/src/abi/reference.js.map +1 -0
  16. package/dist/cjs/src/abi/transaction.js +52 -0
  17. package/dist/cjs/src/abi/transaction.js.map +1 -0
  18. package/dist/cjs/src/client/baseHTTPClient.js +3 -0
  19. package/dist/cjs/src/client/baseHTTPClient.js.map +1 -0
  20. package/dist/cjs/src/client/client.js +164 -104
  21. package/dist/cjs/src/client/client.js.map +1 -1
  22. package/dist/cjs/src/client/urlTokenBaseHTTPClient.js +138 -0
  23. package/dist/cjs/src/client/urlTokenBaseHTTPClient.js.map +1 -0
  24. package/dist/cjs/src/client/v2/algod/algod.js +262 -9
  25. package/dist/cjs/src/client/v2/algod/algod.js.map +1 -1
  26. package/dist/cjs/src/client/v2/algod/models/types.js +2 -2
  27. package/dist/cjs/src/client/v2/indexer/indexer.js +160 -3
  28. package/dist/cjs/src/client/v2/indexer/indexer.js.map +1 -1
  29. package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js +98 -6
  30. package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
  31. package/dist/cjs/src/client/v2/serviceClient.js +17 -8
  32. package/dist/cjs/src/client/v2/serviceClient.js.map +1 -1
  33. package/dist/cjs/src/composer.js +439 -0
  34. package/dist/cjs/src/composer.js.map +1 -0
  35. package/dist/cjs/src/dryrun.js +105 -0
  36. package/dist/cjs/src/dryrun.js.map +1 -0
  37. package/dist/cjs/src/encoding/bigint.js +38 -0
  38. package/dist/cjs/src/encoding/bigint.js.map +1 -0
  39. package/dist/cjs/src/logicsig.js +2 -2
  40. package/dist/cjs/src/logicsig.js.map +1 -1
  41. package/dist/cjs/src/main.js +12 -87
  42. package/dist/cjs/src/main.js.map +1 -1
  43. package/dist/cjs/src/makeTxn.js +29 -1
  44. package/dist/cjs/src/makeTxn.js.map +1 -1
  45. package/dist/cjs/src/multisig.js +77 -2
  46. package/dist/cjs/src/multisig.js.map +1 -1
  47. package/dist/cjs/src/signer.js +66 -0
  48. package/dist/cjs/src/signer.js.map +1 -0
  49. package/dist/cjs/src/transaction.js +8 -4
  50. package/dist/cjs/src/transaction.js.map +1 -1
  51. package/dist/cjs/src/types/intDecoding.js +0 -2
  52. package/dist/cjs/src/types/intDecoding.js.map +1 -1
  53. package/dist/cjs/src/types/transactions/base.js +0 -1
  54. package/dist/cjs/src/types/transactions/base.js.map +1 -1
  55. package/dist/cjs/src/wait.js +53 -0
  56. package/dist/cjs/src/wait.js.map +1 -0
  57. package/dist/esm/src/abi/abi_type.js +680 -0
  58. package/dist/esm/src/abi/abi_type.js.map +1 -0
  59. package/dist/esm/src/abi/contract.js +23 -0
  60. package/dist/esm/src/abi/contract.js.map +1 -0
  61. package/dist/esm/src/abi/index.js +7 -0
  62. package/dist/esm/src/abi/index.js.map +1 -0
  63. package/dist/esm/src/abi/interface.js +19 -0
  64. package/dist/esm/src/abi/interface.js.map +1 -0
  65. package/dist/esm/src/abi/method.js +110 -0
  66. package/dist/esm/src/abi/method.js.map +1 -0
  67. package/dist/esm/src/abi/reference.js +21 -0
  68. package/dist/esm/src/abi/reference.js.map +1 -0
  69. package/dist/esm/src/abi/transaction.js +47 -0
  70. package/dist/esm/src/abi/transaction.js.map +1 -0
  71. package/dist/esm/src/client/baseHTTPClient.js +2 -0
  72. package/dist/esm/src/client/baseHTTPClient.js.map +1 -0
  73. package/dist/esm/src/client/client.js +164 -101
  74. package/dist/esm/src/client/client.js.map +1 -1
  75. package/dist/esm/src/client/urlTokenBaseHTTPClient.js +112 -0
  76. package/dist/esm/src/client/urlTokenBaseHTTPClient.js.map +1 -0
  77. package/dist/esm/src/client/v2/algod/algod.js +262 -9
  78. package/dist/esm/src/client/v2/algod/algod.js.map +1 -1
  79. package/dist/esm/src/client/v2/algod/models/types.js +2 -2
  80. package/dist/esm/src/client/v2/indexer/indexer.js +160 -3
  81. package/dist/esm/src/client/v2/indexer/indexer.js.map +1 -1
  82. package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js +98 -6
  83. package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
  84. package/dist/esm/src/client/v2/serviceClient.js +17 -8
  85. package/dist/esm/src/client/v2/serviceClient.js.map +1 -1
  86. package/dist/esm/src/composer.js +435 -0
  87. package/dist/esm/src/composer.js.map +1 -0
  88. package/dist/esm/src/dryrun.js +101 -0
  89. package/dist/esm/src/dryrun.js.map +1 -0
  90. package/dist/esm/src/encoding/bigint.js +33 -0
  91. package/dist/esm/src/encoding/bigint.js.map +1 -0
  92. package/dist/esm/src/logicsig.js +2 -2
  93. package/dist/esm/src/logicsig.js.map +1 -1
  94. package/dist/esm/src/main.js +6 -82
  95. package/dist/esm/src/main.js.map +1 -1
  96. package/dist/esm/src/makeTxn.js +27 -0
  97. package/dist/esm/src/makeTxn.js.map +1 -1
  98. package/dist/esm/src/multisig.js +73 -1
  99. package/dist/esm/src/multisig.js.map +1 -1
  100. package/dist/esm/src/signer.js +59 -0
  101. package/dist/esm/src/signer.js.map +1 -0
  102. package/dist/esm/src/transaction.js +8 -4
  103. package/dist/esm/src/transaction.js.map +1 -1
  104. package/dist/esm/src/types/intDecoding.js +0 -2
  105. package/dist/esm/src/types/intDecoding.js.map +1 -1
  106. package/dist/esm/src/types/transactions/base.js +0 -1
  107. package/dist/esm/src/types/transactions/base.js.map +1 -1
  108. package/dist/esm/src/wait.js +49 -0
  109. package/dist/esm/src/wait.js.map +1 -0
  110. package/dist/types/src/abi/abi_type.d.ts +102 -0
  111. package/dist/types/src/abi/contract.d.ts +21 -0
  112. package/dist/types/src/abi/index.d.ts +6 -0
  113. package/dist/types/src/abi/interface.d.ts +13 -0
  114. package/dist/types/src/abi/method.d.ts +39 -0
  115. package/dist/types/src/abi/reference.d.ts +15 -0
  116. package/dist/types/src/abi/transaction.d.ts +33 -0
  117. package/dist/types/src/client/baseHTTPClient.d.ts +41 -0
  118. package/dist/types/src/client/client.d.ts +66 -31
  119. package/dist/types/src/client/kmd.d.ts +1 -1
  120. package/dist/types/src/client/urlTokenBaseHTTPClient.d.ts +44 -0
  121. package/dist/types/src/client/v2/algod/algod.d.ts +263 -9
  122. package/dist/types/src/client/v2/algod/models/types.d.ts +4 -4
  123. package/dist/types/src/client/v2/indexer/indexer.d.ts +161 -3
  124. package/dist/types/src/client/v2/indexer/lookupAssetBalances.d.ts +98 -0
  125. package/dist/types/src/client/v2/serviceClient.d.ts +6 -2
  126. package/dist/types/src/composer.d.ts +160 -0
  127. package/dist/types/src/dryrun.d.ts +20 -0
  128. package/dist/types/src/encoding/bigint.d.ts +14 -0
  129. package/dist/types/src/main.d.ts +7 -45
  130. package/dist/types/src/makeTxn.d.ts +18 -1
  131. package/dist/types/src/multisig.d.ts +39 -1
  132. package/dist/types/src/signer.d.ts +40 -0
  133. package/dist/types/src/wait.d.ts +11 -0
  134. package/package.json +6 -4
@@ -22,110 +22,363 @@ const supply_1 = __importDefault(require("./supply"));
22
22
  const versions_1 = __importDefault(require("./versions"));
23
23
  const genesis_1 = __importDefault(require("./genesis"));
24
24
  const proof_1 = __importDefault(require("./proof"));
25
+ /**
26
+ * Algod client connects an application to the Algorand blockchain. The algod client requires a valid algod REST endpoint IP address and algod token from an Algorand node that is connected to the network you plan to interact with.
27
+ *
28
+ * Algod is the main Algorand process for handling the blockchain. Messages between nodes are processed, the protocol steps are executed, and the blocks are written to disk. The algod process also exposes a REST API server that developers can use to communicate with the node and the network. Algod uses the data directory for storage and configuration information.
29
+ *
30
+ * #### Relevant Information
31
+ * [How do I obtain an algod address and token?](https://developer.algorand.org/docs/archive/build-apps/setup/?from_query=algod#how-do-i-obtain-an-algod-address-and-token)
32
+ *
33
+ * [Run Algod in Postman OAS3](https://developer.algorand.org/docs/rest-apis/restendpoints/?from_query=algod#algod-indexer-and-kmd-rest-endpoints)
34
+ */
25
35
  class AlgodClient extends serviceClient_1.default {
26
- constructor(token, baseServer = 'http://r2.algorand.network', port = 4180, headers = {}) {
27
- super('X-Algo-API-Token', token, baseServer, port, headers);
36
+ /**
37
+ * Create an AlgodClient from
38
+ * * either a token, baseServer, port, and optional headers
39
+ * * or a base client server for interoperability with external dApp wallets
40
+ *
41
+ * #### Example
42
+ * ```typescript
43
+ * const token = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
44
+ * const server = "http://localhost";
45
+ * const port = 4001;
46
+ * const algodClient = new algosdk.Algodv2(token, server, port);
47
+ * ```
48
+ * @remarks
49
+ * The above configuration is for a sandbox private network.
50
+ * For applications on production, you are encouraged to run your own node, or use an Algorand REST API provider with a dedicated API key.
51
+ *
52
+ * @param tokenOrBaseClient - The algod token from the Algorand node you are interacting with
53
+ * @param baseServer - REST endpoint
54
+ * @param port - Port number if specifically configured by the server
55
+ * @param headers - Optional headers
56
+ */
57
+ constructor(tokenOrBaseClient, baseServer = 'http://r2.algorand.network', port = 4180, headers = {}) {
58
+ super('X-Algo-API-Token', tokenOrBaseClient, baseServer, port, headers);
28
59
  }
60
+ /**
61
+ * Returns OK if healthy.
62
+ *
63
+ * #### Example
64
+ * ```typescript
65
+ * const health = await algodClient.healthCheck().do();
66
+ * ```
67
+ *
68
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-health)
69
+ * @category GET
70
+ */
29
71
  healthCheck() {
30
72
  return new healthCheck_1.default(this.c);
31
73
  }
74
+ /**
75
+ * Retrieves the supported API versions, binary build versions, and genesis information.
76
+ *
77
+ * #### Example
78
+ * ```typescript
79
+ * const versionsDetails = await algodClient.versionsCheck().do();
80
+ * ```
81
+ *
82
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-versions)
83
+ * @category GET
84
+ */
32
85
  versionsCheck() {
33
86
  return new versions_1.default(this.c);
34
87
  }
88
+ /**
89
+ * Broadcasts a raw transaction to the network.
90
+ *
91
+ * #### Example
92
+ * ```typescript
93
+ * const { txId } = await algodClient.sendRawTransaction(signedTxns).do();
94
+ * const result = await waitForConfirmation(algodClient, txid, 3);
95
+ * ```
96
+ *
97
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#post-v2transactions)
98
+ *
99
+ * @remarks
100
+ * Often used with {@linkcode waitForConfirmation}
101
+ * @param stxOrStxs - Signed transactions
102
+ * @category POST
103
+ */
35
104
  sendRawTransaction(stxOrStxs) {
36
105
  return new sendRawTransaction_1.default(this.c, stxOrStxs);
37
106
  }
38
107
  /**
39
- * Returns the given account's information.
108
+ * Returns the given account's status, balance and spendable amounts.
109
+ *
110
+ * #### Example
111
+ * ```typescript
112
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
113
+ * const accountInfo = await algodClient.accountInformation(address).do();
114
+ * ```
115
+ *
116
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2accountsaddress)
40
117
  * @param account - The address of the account to look up.
118
+ * @category GET
41
119
  */
42
120
  accountInformation(account) {
43
121
  return new accountInformation_1.default(this.c, this.intDecoding, account);
44
122
  }
45
123
  /**
46
124
  * Gets the block info for the given round.
125
+ *
126
+ * #### Example
127
+ * ```typescript
128
+ * const roundNumber = 18038133;
129
+ * const block = await algodClient.block(roundNumber).do();
130
+ * ```
131
+ *
132
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2blocksround)
47
133
  * @param roundNumber - The round number of the block to get.
134
+ * @category GET
48
135
  */
49
136
  block(roundNumber) {
50
137
  return new block_1.default(this.c, roundNumber);
51
138
  }
52
139
  /**
53
140
  * Returns the transaction information for a specific pending transaction.
141
+ *
142
+ * #### Example
143
+ * ```typescript
144
+ * const txId = "DRJS6R745A7GFVMXEXWP4TGVDGKW7VILFTA7HC2BR2GRLHNY5CTA";
145
+ * const pending = await algodClient.pendingTransactionInformation(txId).do();
146
+ * ```
147
+ *
148
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2transactionspendingtxid)
149
+ *
150
+ * @remarks
151
+ * <br><br>
152
+ * There are several cases when this might succeed:
153
+ * - transaction committed (committed round > 0)
154
+ * - transaction still in the pool (committed round = 0, pool error = "")
155
+ * - transaction removed from pool due to error (committed round = 0, pool error != "")
156
+ *
157
+ * Or the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.
158
+ *
54
159
  * @param txid - The TxID string of the pending transaction to look up.
160
+ * @category GET
55
161
  */
56
162
  pendingTransactionInformation(txid) {
57
163
  return new pendingTransactionInformation_1.default(this.c, txid);
58
164
  }
59
165
  /**
60
- * Returns transactions that are pending in the pool.
166
+ * Returns the list of pending transactions in the pool, sorted by priority, in decreasing order, truncated at the end at MAX.
167
+ * If MAX = 0, returns all pending transactions.
168
+ *
169
+ * #### Example 1
170
+ * ```typescript
171
+ * const pendingTxns = await algodClient.pendingTransactionsInformation().do();
172
+ * ```
173
+ *
174
+ * #### Example 2
175
+ * ```typescript
176
+ * const maxTxns = 5;
177
+ * const pendingTxns = await algodClient
178
+ * .pendingTransactionsInformation()
179
+ * .max(maxTxns)
180
+ * .do();
181
+ * ```
182
+ *
183
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2transactionspending)
184
+ * @category GET
61
185
  */
62
186
  pendingTransactionsInformation() {
63
187
  return new pendingTransactions_1.default(this.c);
64
188
  }
65
189
  /**
66
- * Returns transactions that are pending in the pool sent by a specific sender.
190
+ * Returns the list of pending transactions sent by the address, sorted by priority, in decreasing order, truncated at the end at MAX.
191
+ * If MAX = 0, returns all pending transactions.
192
+ *
193
+ * #### Example 1
194
+ * ```typescript
195
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
196
+ * const pendingTxnsByAddr = await algodClient.pendingTransactionByAddress(address).do();
197
+ * ```
198
+ *
199
+ * #### Example 2
200
+ * ```typescript
201
+ * const maxTxns = 5;
202
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
203
+ * const pendingTxns = await algodClient
204
+ * .pendingTransactionByAddress(address)
205
+ * .max(maxTxns)
206
+ * .do();
207
+ * ```
208
+ *
209
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2accountsaddresstransactionspending)
67
210
  * @param address - The address of the sender.
211
+ * @category GET
68
212
  */
69
213
  pendingTransactionByAddress(address) {
70
214
  return new pendingTransactionsByAddress_1.default(this.c, address);
71
215
  }
72
216
  /**
73
217
  * Retrieves the StatusResponse from the running node.
218
+ *
219
+ * #### Example
220
+ * ```typescript
221
+ * const status = await algodClient.status().do();
222
+ * ```
223
+ *
224
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2status)
225
+ * @category GET
74
226
  */
75
227
  status() {
76
228
  return new status_1.default(this.c, this.intDecoding);
77
229
  }
78
230
  /**
79
- * Waits for a specific round to occur then returns the StatusResponse for that round.
231
+ * Waits for a specific round to occur then returns the `StatusResponse` for that round.
232
+ *
233
+ * #### Example
234
+ * ```typescript
235
+ * const round = 18038133;
236
+ * const statusAfterBlock = await algodClient.statusAfterBlock(round).do();
237
+ * ```
238
+ *
239
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2statuswait-for-block-afterround)
80
240
  * @param round - The number of the round to wait for.
241
+ * @category GET
81
242
  */
82
243
  statusAfterBlock(round) {
83
244
  return new statusAfterBlock_1.default(this.c, this.intDecoding, round);
84
245
  }
85
246
  /**
86
247
  * Returns the common needed parameters for a new transaction.
248
+ *
249
+ * #### Example
250
+ * ```typescript
251
+ * const suggestedParams = await algodClient.getTransactionParams().do();
252
+ * const amountInMicroAlgos = algosdk.algosToMicroalgos(2); // 2 Algos
253
+ * const unsignedTxn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
254
+ * from: senderAddress,
255
+ * to: receiverAddress,
256
+ * amount: amountInMicroAlgos,
257
+ * suggestedParams: suggestedParams,
258
+ * });
259
+ * ```
260
+ *
261
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2transactionsparams)
262
+ *
263
+ * @remarks
264
+ * Often used with
265
+ * {@linkcode makePaymentTxnWithSuggestedParamsFromObject}, {@linkcode algosToMicroalgos}
266
+ * @category GET
87
267
  */
88
268
  getTransactionParams() {
89
269
  return new suggestedParams_1.default(this.c);
90
270
  }
91
271
  /**
92
- * Gets the supply details for the specified node's ledger.
272
+ * Returns the supply details for the specified node's ledger.
273
+ *
274
+ * #### Example
275
+ * ```typescript
276
+ * const supplyDetails = await algodClient.supply().do();
277
+ * ```
278
+ *
279
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2ledgersupply)
280
+ * @category GET
93
281
  */
94
282
  supply() {
95
283
  return new supply_1.default(this.c, this.intDecoding);
96
284
  }
285
+ /**
286
+ * Compiles TEAL source code to binary, returns base64 encoded program bytes and base32 SHA512_256 hash of program bytes (Address style).
287
+ *
288
+ * #### Example
289
+ * ```typescript
290
+ * const source = "TEAL SOURCE CODE";
291
+ * const compiledSmartContract = await algodClient.compile(source).do();
292
+ * ```
293
+ *
294
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#post-v2tealcompile)
295
+ * @remarks
296
+ * This endpoint is only enabled when a node's configuration file sets `EnableDeveloperAPI` to true.
297
+ * @param source
298
+ * @category POST
299
+ */
97
300
  compile(source) {
98
301
  return new compile_1.default(this.c, source);
99
302
  }
303
+ /**
304
+ * Provides debugging information for a transaction (or group).
305
+ *
306
+ * Executes TEAL program(s) in context and returns debugging information about the execution. This endpoint is only enabled when a node's configureation file sets `EnableDeveloperAPI` to true.
307
+ *
308
+ * #### Example
309
+ * ```typescript
310
+ * const dryRunResult = await algodClient.dryrun(dr).do();
311
+ * ```
312
+ *
313
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#post-v2tealdryrun)
314
+ * @param dr
315
+ * @category POST
316
+ */
100
317
  dryrun(dr) {
101
318
  return new dryrun_1.default(this.c, dr);
102
319
  }
103
320
  /**
104
321
  * Given an asset ID, return asset information including creator, name, total supply and
105
322
  * special addresses.
323
+ *
324
+ * #### Example
325
+ * ```typescript
326
+ * const asset_id = 163650;
327
+ * const asset = await algodClient.getAssetByID(asset_id).do();
328
+ * ```
329
+ *
330
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2assetsasset-id)
106
331
  * @param index - The asset ID to look up.
332
+ * @category GET
107
333
  */
108
334
  getAssetByID(index) {
109
335
  return new getAssetByID_1.default(this.c, this.intDecoding, index);
110
336
  }
111
337
  /**
112
- * Given an application ID, it returns application information including creator, approval
338
+ * Given an application ID, return the application information including creator, approval
113
339
  * and clear programs, global and local schemas, and global state.
340
+ *
341
+ * #### Example
342
+ * ```typescript
343
+ * const index = 60553466;
344
+ * const app = await algodClient.getApplicationByID(index).do();
345
+ * ```
346
+ *
347
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2applicationsapplication-id)
114
348
  * @param index - The application ID to look up.
349
+ * @category GET
115
350
  */
116
351
  getApplicationByID(index) {
117
352
  return new getApplicationByID_1.default(this.c, this.intDecoding, index);
118
353
  }
119
354
  /**
120
355
  * Returns the entire genesis file.
356
+ *
357
+ * #### Example
358
+ * ```typescript
359
+ * const genesis = await algodClient.genesis().do();
360
+ * ```
361
+ *
362
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-genesis)
363
+ * @category GET
121
364
  */
122
365
  genesis() {
123
366
  return new genesis_1.default(this.c, this.intDecoding);
124
367
  }
125
368
  /**
126
- * Get the proof for a given transaction in a round.
369
+ * Returns a Merkle proof for a given transaction in a block.
370
+ *
371
+ * #### Example
372
+ * ```typescript
373
+ * const round = 18038133;
374
+ * const txId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
375
+ * const proof = await algodClient.getProof(round, txId).do();
376
+ * ```
377
+ *
378
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2blocksroundtransactionstxidproof)
127
379
  * @param round - The round in which the transaction appears.
128
380
  * @param txID - The transaction ID for which to generate a proof.
381
+ * @category GET
129
382
  */
130
383
  getProof(round, txID) {
131
384
  return new proof_1.default(this.c, this.intDecoding, round, txID);
@@ -1 +1 @@
1
- {"version":3,"file":"algod.js","sourceRoot":"","sources":["../../../../../../src/client/v2/algod/algod.ts"],"names":[],"mappings":";;;;;AAAA,qEAA6C;AAG7C,8EAAsD;AACtD,oDAA4B;AAC5B,wDAAgC;AAChC,sDAA8B;AAC9B,kEAA0C;AAC1C,8EAAsD;AACtD,gEAAwC;AACxC,oGAA4E;AAC5E,gFAAwD;AACxD,kGAA0E;AAC1E,8EAAsD;AACtD,sDAA8B;AAC9B,0EAAkD;AAClD,wEAAgD;AAChD,sDAA8B;AAC9B,0DAAkC;AAClC,wDAAgC;AAChC,oDAA4B;AAE5B,MAAqB,WAAY,SAAQ,uBAAa;IACpD,YACE,KAAoD,EACpD,UAAU,GAAG,4BAA4B,EACzC,OAAwB,IAAI,EAC5B,OAAO,GAAG,EAAE;QAE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I,sBAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,KAAa;QAC9B,OAAO,IAAI,4BAAkB,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;OAUG;IACH,OAAO;QACL,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,KAAa,EAAE,IAAY;QAClC,OAAO,IAAI,eAAK,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;CACF;AA1XD,8BA0XC"}
@@ -208,7 +208,7 @@ class ApplicationParams extends base_1.default {
208
208
  * parameters and global state for this application can be found.
209
209
  * @param extraProgramPages - (epp) the amount of extra program pages available to this app.
210
210
  * @param globalState - [\gs) global schema
211
- * @param globalStateSchema - [\lsch) global schema
211
+ * @param globalStateSchema - [\gsch) global schema
212
212
  * @param localStateSchema - [\lsch) local schema
213
213
  */
214
214
  constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }) {
@@ -969,7 +969,7 @@ exports.TealKeyValue = TealKeyValue;
969
969
  class TealValue extends base_1.default {
970
970
  /**
971
971
  * Creates a new `TealValue` object.
972
- * @param type - (tt) value type.
972
+ * @param type - (tt) value type. Value `1` refers to **bytes**, value `2` refers to **uint**
973
973
  * @param bytes - (tb) bytes value.
974
974
  * @param uint - (ui) uint value.
975
975
  */
@@ -18,99 +18,256 @@ const searchAccounts_1 = __importDefault(require("./searchAccounts"));
18
18
  const searchForTransactions_1 = __importDefault(require("./searchForTransactions"));
19
19
  const searchForAssets_1 = __importDefault(require("./searchForAssets"));
20
20
  const searchForApplications_1 = __importDefault(require("./searchForApplications"));
21
+ /**
22
+ * The Indexer provides a REST API interface of API calls to support searching the Algorand Blockchain.
23
+ *
24
+ * The Indexer REST APIs retrieve the blockchain data from a PostgreSQL compatible database that must be populated.
25
+ *
26
+ * This database is populated using the same indexer instance or a separate instance of the indexer which must connect to the algod process of a running Algorand node to read block data.
27
+ *
28
+ * This node must also be an Archival node to make searching the entire blockchain possible.
29
+ *
30
+ * #### Relevant Information
31
+ * [Learn more about Indexer](https://developer.algorand.org/docs/get-details/indexer/)
32
+ *
33
+ * [Run Indexer in Postman OAS3](https://developer.algorand.org/docs/rest-apis/restendpoints/#algod-indexer-and-kmd-rest-endpoints)
34
+ */
21
35
  class IndexerClient extends serviceClient_1.default {
22
- constructor(token, baseServer = 'http://127.0.0.1', port = 8080, headers = {}) {
23
- super('X-Indexer-API-Token', token, baseServer, port, headers);
36
+ /**
37
+ * Create an IndexerClient from
38
+ * * either a token, baseServer, port, and optional headers
39
+ * * or a base client server for interoperability with external dApp wallets
40
+ *
41
+ * #### Example
42
+ * ```typescript
43
+ * const token = "";
44
+ * const server = "http://localhost";
45
+ * const port = 8980;
46
+ * const indexerClient = new algosdk.Indexer(token, server, port);
47
+ * ```
48
+ * @remarks
49
+ * The above configuration is for a sandbox private network.
50
+ * For applications on production, you are encouraged to run your own node with indexer, or use an Algorand REST API provider with a dedicated API key.
51
+ *
52
+ * @param tokenOrBaseClient - The API token for the Indexer API
53
+ * @param baseServer - REST endpoint
54
+ * @param port - Port number if specifically configured by the server
55
+ * @param headers - Optional headers
56
+ */
57
+ constructor(tokenOrBaseClient, baseServer = 'http://127.0.0.1', port = 8080, headers = {}) {
58
+ super('X-Indexer-API-Token', tokenOrBaseClient, baseServer, port, headers);
24
59
  }
25
60
  /**
26
61
  * Returns the health object for the service.
62
+ * Returns 200 if healthy.
63
+ *
64
+ * #### Example
65
+ * ```typescript
66
+ * const health = await indexerClient.makeHealthCheck().do();
67
+ * ```
68
+ *
69
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-health)
70
+ * @category GET
27
71
  */
28
72
  makeHealthCheck() {
29
73
  return new makeHealthCheck_1.default(this.c, this.intDecoding);
30
74
  }
31
75
  /**
32
- * Returns holder balances for the given asset.
76
+ * Returns the list of accounts who hold the given asset and their balance.
77
+ *
78
+ * #### Example
79
+ * ```typescript
80
+ * const assetId = 163650;
81
+ * const assetBalances = await indexerClient.lookupAssetBalances(assetId).do();
82
+ * ```
83
+ *
84
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-idbalances)
33
85
  * @param index - The asset ID to look up.
86
+ * @category GET
34
87
  */
35
88
  lookupAssetBalances(index) {
36
89
  return new lookupAssetBalances_1.default(this.c, this.intDecoding, index);
37
90
  }
38
91
  /**
39
92
  * Returns transactions relating to the given asset.
93
+ *
94
+ * #### Example
95
+ * ```typescript
96
+ * const assetId = 163650;
97
+ * const assetTxns = await indexerClient.lookupAssetTransactions(assetId).do();
98
+ * ```
99
+ *
100
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-idtransactions)
40
101
  * @param index - The asset ID to look up.
102
+ * @category GET
41
103
  */
42
104
  lookupAssetTransactions(index) {
43
105
  return new lookupAssetTransactions_1.default(this.c, this.intDecoding, index);
44
106
  }
45
107
  /**
46
108
  * Returns transactions relating to the given account.
109
+ *
110
+ * #### Example
111
+ * ```typescript
112
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
113
+ * const accountTxns = await indexerClient.lookupAccountTransactions(address).do();
114
+ * ```
115
+ *
116
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idtransactions)
47
117
  * @param account - The address of the account.
118
+ * @category GET
48
119
  */
49
120
  lookupAccountTransactions(account) {
50
121
  return new lookupAccountTransactions_1.default(this.c, this.intDecoding, account);
51
122
  }
52
123
  /**
53
124
  * Returns the block for the passed round.
125
+ *
126
+ * #### Example
127
+ * ```typescript
128
+ * const targetBlock = 18309917;
129
+ * const blockInfo = await indexerClient.lookupBlock(targetBlock).do();
130
+ * ```
131
+ *
132
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2blocksround-number)
54
133
  * @param round - The number of the round to look up.
134
+ * @category GET
55
135
  */
56
136
  lookupBlock(round) {
57
137
  return new lookupBlock_1.default(this.c, this.intDecoding, round);
58
138
  }
59
139
  /**
60
140
  * Returns information about the given transaction.
141
+ *
142
+ * #### Example
143
+ * ```typescript
144
+ * const txnId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
145
+ * const txnInfo = await indexerClient.lookupTransactionByID(txnId).do();
146
+ * ```
147
+ *
148
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2transactionstxid)
61
149
  * @param txID - The ID of the transaction to look up.
150
+ * @category GET
62
151
  */
63
152
  lookupTransactionByID(txID) {
64
153
  return new lookupTransactionByID_1.default(this.c, this.intDecoding, txID);
65
154
  }
66
155
  /**
67
156
  * Returns information about the given account.
157
+ *
158
+ * #### Example
159
+ * ```typescript
160
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
161
+ * const accountInfo = await indexerClient.lookupAccountByID(address).do();
162
+ * ```
163
+ *
164
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
68
165
  * @param account - The address of the account to look up.
166
+ * @category GET
69
167
  */
70
168
  lookupAccountByID(account) {
71
169
  return new lookupAccountByID_1.default(this.c, this.intDecoding, account);
72
170
  }
73
171
  /**
74
172
  * Returns information about the passed asset.
173
+ *
174
+ * #### Example
175
+ * ```typescript
176
+ * const assetId = 163650;
177
+ * const assetInfo = await indexerClient.lookupAssetByID(assetId).do();
178
+ * ```
179
+ *
180
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-id)
75
181
  * @param index - The ID of the asset ot look up.
182
+ * @category GET
76
183
  */
77
184
  lookupAssetByID(index) {
78
185
  return new lookupAssetByID_1.default(this.c, this.intDecoding, index);
79
186
  }
80
187
  /**
81
188
  * Returns information about the passed application.
189
+ *
190
+ * #### Example
191
+ * ```typescript
192
+ * const appId = 60553466;
193
+ * const appInfo = await indexerClient.lookupApplications(appId).do();
194
+ * ```
195
+ *
196
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-id)
82
197
  * @param index - The ID of the application to look up.
198
+ * @category GET
83
199
  */
84
200
  lookupApplications(index) {
85
201
  return new lookupApplications_1.default(this.c, this.intDecoding, index);
86
202
  }
87
203
  /**
88
204
  * Returns log messages generated by the passed in application.
205
+ *
206
+ * #### Example
207
+ * ```typescript
208
+ * const appId = 60553466;
209
+ * const appLogs = await indexerClient.lookupApplicationLogs(appId).do();
210
+ * ```
211
+ *
212
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idlogs)
89
213
  * @param appID - The ID of the application which generated the logs.
214
+ * @category GET
90
215
  */
91
216
  lookupApplicationLogs(appID) {
92
217
  return new lookupApplicationLogs_1.default(this.c, this.intDecoding, appID);
93
218
  }
94
219
  /**
95
220
  * Returns information about indexed accounts.
221
+ *
222
+ * #### Example
223
+ * ```typescript
224
+ * const accounts = await indexerClient.searchAccounts().do();
225
+ * ```
226
+ *
227
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accounts)
228
+ * @category GET
96
229
  */
97
230
  searchAccounts() {
98
231
  return new searchAccounts_1.default(this.c, this.intDecoding);
99
232
  }
100
233
  /**
101
234
  * Returns information about indexed transactions.
235
+ *
236
+ * #### Example
237
+ * ```typescript
238
+ * const txns = await indexerClient.searchForTransactions().do();
239
+ * ```
240
+ *
241
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2transactions)
242
+ * @category GET
102
243
  */
103
244
  searchForTransactions() {
104
245
  return new searchForTransactions_1.default(this.c, this.intDecoding);
105
246
  }
106
247
  /**
107
248
  * Returns information about indexed assets.
249
+ *
250
+ * #### Example
251
+ * ```typescript
252
+ * const assets = await indexerClient.searchForAssets().do();
253
+ * ```
254
+ *
255
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assets)
256
+ * @category GET
108
257
  */
109
258
  searchForAssets() {
110
259
  return new searchForAssets_1.default(this.c, this.intDecoding);
111
260
  }
112
261
  /**
113
262
  * Returns information about indexed applications.
263
+ *
264
+ * #### Example
265
+ * ```typescript
266
+ * const apps = await indexerClient.searchForApplications().do();
267
+ * ```
268
+ *
269
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applications)
270
+ * @category GET
114
271
  */
115
272
  searchForApplications() {
116
273
  return new searchForApplications_1.default(this.c, this.intDecoding);
@@ -1 +1 @@
1
- {"version":3,"file":"indexer.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/indexer.ts"],"names":[],"mappings":";;;;;AAAA,qEAA6C;AAE7C,wEAAgD;AAChD,gFAAwD;AACxD,wFAAgE;AAChE,4FAAoE;AACpE,gEAAwC;AACxC,oFAA4D;AAC5D,4EAAoD;AACpD,wEAAgD;AAChD,8EAAsD;AACtD,oFAA4D;AAC5D,sEAA8C;AAC9C,oFAA4D;AAC5D,wEAAgD;AAChD,oFAA4D;AAE5D,MAAqB,aAAc,SAAQ,uBAAa;IACtD,YACE,KAAsD,EACtD,UAAU,GAAG,kBAAkB,EAC/B,OAAwB,IAAI,EAC5B,OAAO,GAAG,EAAE;QAEZ,KAAK,CAAC,qBAAqB,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,yBAAe,CAAC,IAAI,CAAC,C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AC;IACjE,CAAC;IAED;;;OAGG;IACH,qBAAqB,CAAC,KAAa;QACjC,OAAO,IAAI,+BAAqB,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACpE,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,OAAO,IAAI,wBAAc,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,qBAAqB;QACnB,OAAO,IAAI,+BAAqB,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,yBAAe,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,qBAAqB;QACnB,OAAO,IAAI,+BAAqB,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7D,CAAC;CACF;AApHD,gCAoHC"}
1
+ {"version":3,"file":"indexer.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/indexer.ts"],"names":[],"mappings":";;;;;AAAA,qEAA6C;AAC7C,wEAAgD;AAChD,gFAAwD;AACxD,wFAAgE;AAChE,4FAAoE;AACpE,gEAAwC;AACxC,oFAA4D;AAC5D,4EAAoD;AACpD,wEAAgD;AAChD,8EAAsD;AACtD,oFAA4D;AAC5D,sEAA8C;AAC9C,oFAA4D;AAC5D,wEAAgD;AAChD,oFAA4D;AAO5D;;;;;;;;;;;;;GAaG;AACH,MAAqB,aAAc,SAAQ,uBAAa;IACtD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,YACE,iBAIkB,EAClB,UAAU,GAAG,kBAAkB,EAC/B,OAAwB,IAAI,EAC5B,UAAkC,EAAE;QAEpC,KAAK,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAA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