algosdk 1.15.0 → 1.18.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 (132) 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/contract.js +3 -0
  5. package/dist/cjs/src/abi/contract.js.map +1 -1
  6. package/dist/cjs/src/abi/interface.js +3 -0
  7. package/dist/cjs/src/abi/interface.js.map +1 -1
  8. package/dist/cjs/src/abi/method.js +16 -1
  9. package/dist/cjs/src/abi/method.js.map +1 -1
  10. package/dist/cjs/src/client/kmd.js +1 -1
  11. package/dist/cjs/src/client/kmd.js.map +1 -1
  12. package/dist/cjs/src/client/v2/algod/models/types.js +32 -5
  13. package/dist/cjs/src/client/v2/algod/models/types.js.map +1 -1
  14. package/dist/cjs/src/client/v2/indexer/indexer.js +8 -8
  15. package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js +29 -4
  16. package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -1
  17. package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js +29 -3
  18. package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js.map +1 -1
  19. package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js +76 -3
  20. package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
  21. package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js +30 -4
  22. package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -1
  23. package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js +30 -3
  24. package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -1
  25. package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js +30 -25
  26. package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
  27. package/dist/cjs/src/client/v2/indexer/lookupApplicationLogs.js +112 -6
  28. package/dist/cjs/src/client/v2/indexer/lookupApplicationLogs.js.map +1 -1
  29. package/dist/cjs/src/client/v2/indexer/lookupApplications.js +40 -1
  30. package/dist/cjs/src/client/v2/indexer/lookupApplications.js.map +1 -1
  31. package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js +29 -6
  32. package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
  33. package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js +2 -0
  34. package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
  35. package/dist/cjs/src/client/v2/indexer/lookupAssetTransactions.js +298 -18
  36. package/dist/cjs/src/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  37. package/dist/cjs/src/client/v2/indexer/lookupBlock.js +16 -0
  38. package/dist/cjs/src/client/v2/indexer/lookupBlock.js.map +1 -1
  39. package/dist/cjs/src/client/v2/indexer/lookupTransactionByID.js +16 -0
  40. package/dist/cjs/src/client/v2/indexer/lookupTransactionByID.js.map +1 -1
  41. package/dist/cjs/src/client/v2/indexer/makeHealthCheck.js +15 -0
  42. package/dist/cjs/src/client/v2/indexer/makeHealthCheck.js.map +1 -1
  43. package/dist/cjs/src/client/v2/indexer/searchAccounts.js +210 -10
  44. package/dist/cjs/src/client/v2/indexer/searchAccounts.js.map +1 -1
  45. package/dist/cjs/src/client/v2/indexer/searchForApplications.js +101 -5
  46. package/dist/cjs/src/client/v2/indexer/searchForApplications.js.map +1 -1
  47. package/dist/cjs/src/client/v2/indexer/searchForAssets.js +132 -7
  48. package/dist/cjs/src/client/v2/indexer/searchForAssets.js.map +1 -1
  49. package/dist/cjs/src/client/v2/indexer/searchForTransactions.js +328 -19
  50. package/dist/cjs/src/client/v2/indexer/searchForTransactions.js.map +1 -1
  51. package/dist/cjs/src/composer.js +1 -0
  52. package/dist/cjs/src/composer.js.map +1 -1
  53. package/dist/cjs/src/dryrun.js +199 -2
  54. package/dist/cjs/src/dryrun.js.map +1 -1
  55. package/dist/esm/src/abi/contract.js +4 -1
  56. package/dist/esm/src/abi/contract.js.map +1 -1
  57. package/dist/esm/src/abi/interface.js +4 -1
  58. package/dist/esm/src/abi/interface.js.map +1 -1
  59. package/dist/esm/src/abi/method.js +14 -0
  60. package/dist/esm/src/abi/method.js.map +1 -1
  61. package/dist/esm/src/client/kmd.js +1 -1
  62. package/dist/esm/src/client/kmd.js.map +1 -1
  63. package/dist/esm/src/client/v2/algod/models/types.js +30 -4
  64. package/dist/esm/src/client/v2/algod/models/types.js.map +1 -1
  65. package/dist/esm/src/client/v2/indexer/indexer.js +8 -8
  66. package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js +29 -4
  67. package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -1
  68. package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js +29 -3
  69. package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js.map +1 -1
  70. package/dist/esm/src/client/v2/indexer/lookupAccountByID.js +76 -3
  71. package/dist/esm/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
  72. package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js +30 -4
  73. package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -1
  74. package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js +30 -3
  75. package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -1
  76. package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js +30 -25
  77. package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
  78. package/dist/esm/src/client/v2/indexer/lookupApplicationLogs.js +112 -6
  79. package/dist/esm/src/client/v2/indexer/lookupApplicationLogs.js.map +1 -1
  80. package/dist/esm/src/client/v2/indexer/lookupApplications.js +40 -1
  81. package/dist/esm/src/client/v2/indexer/lookupApplications.js.map +1 -1
  82. package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js +29 -6
  83. package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
  84. package/dist/esm/src/client/v2/indexer/lookupAssetByID.js +2 -0
  85. package/dist/esm/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
  86. package/dist/esm/src/client/v2/indexer/lookupAssetTransactions.js +298 -18
  87. package/dist/esm/src/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  88. package/dist/esm/src/client/v2/indexer/lookupBlock.js +16 -0
  89. package/dist/esm/src/client/v2/indexer/lookupBlock.js.map +1 -1
  90. package/dist/esm/src/client/v2/indexer/lookupTransactionByID.js +16 -0
  91. package/dist/esm/src/client/v2/indexer/lookupTransactionByID.js.map +1 -1
  92. package/dist/esm/src/client/v2/indexer/makeHealthCheck.js +15 -0
  93. package/dist/esm/src/client/v2/indexer/makeHealthCheck.js.map +1 -1
  94. package/dist/esm/src/client/v2/indexer/searchAccounts.js +210 -10
  95. package/dist/esm/src/client/v2/indexer/searchAccounts.js.map +1 -1
  96. package/dist/esm/src/client/v2/indexer/searchForApplications.js +101 -5
  97. package/dist/esm/src/client/v2/indexer/searchForApplications.js.map +1 -1
  98. package/dist/esm/src/client/v2/indexer/searchForAssets.js +132 -7
  99. package/dist/esm/src/client/v2/indexer/searchForAssets.js.map +1 -1
  100. package/dist/esm/src/client/v2/indexer/searchForTransactions.js +328 -19
  101. package/dist/esm/src/client/v2/indexer/searchForTransactions.js.map +1 -1
  102. package/dist/esm/src/composer.js +1 -0
  103. package/dist/esm/src/composer.js.map +1 -1
  104. package/dist/esm/src/dryrun.js +197 -1
  105. package/dist/esm/src/dryrun.js.map +1 -1
  106. package/dist/types/src/abi/contract.d.ts +1 -0
  107. package/dist/types/src/abi/interface.d.ts +1 -0
  108. package/dist/types/src/abi/method.d.ts +1 -0
  109. package/dist/types/src/client/kmd.d.ts +4 -4
  110. package/dist/types/src/client/v2/algod/models/types.d.ts +39 -6
  111. package/dist/types/src/client/v2/indexer/indexer.d.ts +8 -8
  112. package/dist/types/src/client/v2/indexer/lookupAccountAppLocalStates.d.ts +29 -4
  113. package/dist/types/src/client/v2/indexer/lookupAccountAssets.d.ts +29 -3
  114. package/dist/types/src/client/v2/indexer/lookupAccountByID.d.ts +76 -0
  115. package/dist/types/src/client/v2/indexer/lookupAccountCreatedApplications.d.ts +30 -4
  116. package/dist/types/src/client/v2/indexer/lookupAccountCreatedAssets.d.ts +30 -3
  117. package/dist/types/src/client/v2/indexer/lookupAccountTransactions.d.ts +30 -25
  118. package/dist/types/src/client/v2/indexer/lookupApplicationLogs.d.ts +112 -6
  119. package/dist/types/src/client/v2/indexer/lookupApplications.d.ts +40 -0
  120. package/dist/types/src/client/v2/indexer/lookupAssetBalances.d.ts +29 -6
  121. package/dist/types/src/client/v2/indexer/lookupAssetByID.d.ts +2 -0
  122. package/dist/types/src/client/v2/indexer/lookupAssetTransactions.d.ts +298 -1
  123. package/dist/types/src/client/v2/indexer/lookupBlock.d.ts +16 -0
  124. package/dist/types/src/client/v2/indexer/lookupTransactionByID.d.ts +16 -0
  125. package/dist/types/src/client/v2/indexer/makeHealthCheck.d.ts +15 -0
  126. package/dist/types/src/client/v2/indexer/searchAccounts.d.ts +210 -0
  127. package/dist/types/src/client/v2/indexer/searchForApplications.d.ts +101 -0
  128. package/dist/types/src/client/v2/indexer/searchForAssets.d.ts +132 -0
  129. package/dist/types/src/client/v2/indexer/searchForTransactions.d.ts +328 -1
  130. package/dist/types/src/composer.d.ts +4 -0
  131. package/dist/types/src/dryrun.d.ts +81 -1
  132. package/package.json +6 -5
@@ -1,9 +1,110 @@
1
1
  import JSONRequest from '../jsonrequest';
2
+ /**
3
+ * Returns information about indexed applications.
4
+ *
5
+ * #### Example
6
+ * ```typescript
7
+ * const apps = await indexerClient.searchForApplications().do();
8
+ * ```
9
+ *
10
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applications)
11
+ * @category GET
12
+ */
2
13
  export default class SearchForApplications extends JSONRequest {
14
+ /**
15
+ * @returns `/v2/applications`
16
+ */
3
17
  path(): string;
18
+ /**
19
+ * Application ID for filter, as int
20
+ *
21
+ * #### Example
22
+ * ```typescript
23
+ * const appId = 60553466;
24
+ * const apps = await indexerClient
25
+ * .searchForApplications()
26
+ * .index(appId)
27
+ * .do();
28
+ * ```
29
+ * @remarks Alternatively, use `indexerClient.lookupApplications(appId).do()`
30
+ * @param index
31
+ * @category query
32
+ */
4
33
  index(index: number): this;
34
+ /**
35
+ * Creator for filter, as string
36
+ *
37
+ * #### Example
38
+ * ```typescript
39
+ * const creator = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
40
+ * const apps = await indexerClient
41
+ * .searchForApplications()
42
+ * .creator(creator)
43
+ * .do();
44
+ * ```
45
+ * @param creator
46
+ * @category query
47
+ */
5
48
  creator(creator: string): this;
49
+ /**
50
+ * Specify the next page of results.
51
+ *
52
+ * #### Example
53
+ * ```typescript
54
+ * const maxResults = 20;
55
+ *
56
+ * const appsPage1 = await indexerClient
57
+ * .searchForApplications()
58
+ * .limit(maxResults)
59
+ * .do();
60
+ *
61
+ * const appsPage2 = await indexerClient
62
+ * .searchForApplications()
63
+ * .limit(maxResults)
64
+ * .nextToken(appsPage1["next-token"])
65
+ * .do();
66
+ * ```
67
+ * @param nextToken - provided by the previous results.
68
+ * @category query
69
+ */
6
70
  nextToken(next: string): this;
71
+ /**
72
+ * Limit results for pagination.
73
+ *
74
+ * #### Example
75
+ * ```typescript
76
+ * const maxResults = 20;
77
+ * const apps = await indexerClient
78
+ * .searchForApplications()
79
+ * .limit(maxResults)
80
+ * .do();
81
+ * ```
82
+ *
83
+ * @param limit - maximum number of results to return.
84
+ * @category query
85
+ */
7
86
  limit(limit: number): this;
87
+ /**
88
+ * Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
89
+ *
90
+ * #### Example 1
91
+ * ```typescript
92
+ * const apps = await indexerClient
93
+ * .searchForApplications()
94
+ * .includeAll(false)
95
+ * .do();
96
+ * ```
97
+ *
98
+ * #### Example 2
99
+ * ```typescript
100
+ * const apps = await indexerClient
101
+ * .searchForApplications()
102
+ * .includeAll()
103
+ * .do();
104
+ * ```
105
+ *
106
+ * @param value - default true when called without passing a value
107
+ * @category query
108
+ */
8
109
  includeAll(value?: boolean): this;
9
110
  }
@@ -1,11 +1,143 @@
1
1
  import JSONRequest from '../jsonrequest';
2
+ /**
3
+ * Returns information about indexed assets.
4
+ *
5
+ * #### Example
6
+ * ```typescript
7
+ * const assets = await indexerClient.searchForAssets().do();
8
+ * ```
9
+ *
10
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assets)
11
+ * @category GET
12
+ */
2
13
  export default class SearchForAssets extends JSONRequest {
14
+ /**
15
+ * @returns `/v2/assets`
16
+ */
3
17
  path(): string;
18
+ /**
19
+ * Limit results for pagination.
20
+ *
21
+ * #### Example
22
+ * ```typescript
23
+ * const maxResults = 20;
24
+ * const assets = await indexerClient
25
+ * .searchForAssets()
26
+ * .limit(maxResults)
27
+ * .do();
28
+ * ```
29
+ *
30
+ * @param limit - maximum number of results to return.
31
+ * @category query
32
+ */
4
33
  limit(limit: number): this;
34
+ /**
35
+ * Filter just assets with the given creator address.
36
+ *
37
+ * #### Example
38
+ * ```typescript
39
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
40
+ * const assets = await indexerClient
41
+ * .searchForAssets()
42
+ * .creator(address)
43
+ * .do();
44
+ * ```
45
+ *
46
+ * @param creator
47
+ * @category query
48
+ */
5
49
  creator(creator: string): this;
50
+ /**
51
+ * Filter just assets with the given name.
52
+ *
53
+ * #### Example
54
+ * ```typescript
55
+ * const name = "Test Token";
56
+ * const assets = await indexerClient
57
+ * .searchForAssets()
58
+ * .name(name)
59
+ * .do();
60
+ * ```
61
+ *
62
+ * @param name
63
+ * @category query
64
+ */
6
65
  name(name: string): this;
66
+ /**
67
+ * Filter just assets with the given unit.
68
+ *
69
+ * #### Example
70
+ * ```typescript
71
+ * const unit = "test";
72
+ * const assets = await indexerClient
73
+ * .searchForAssets()
74
+ * .unit(unit)
75
+ * .do();
76
+ * ```
77
+ *
78
+ * @param unit
79
+ * @category query
80
+ */
7
81
  unit(unit: string): this;
82
+ /**
83
+ * Asset ID for filter, as int.
84
+ *
85
+ * #### Example
86
+ * ```typescript
87
+ * const assetId = 163650;
88
+ * const assets = await indexerClient
89
+ * .searchForAssets()
90
+ * .index(assetId)
91
+ * .do();
92
+ * ```
93
+ * @remarks Alternatively, use `indexerClient.lookupAssetByID(assetId).do();`
94
+ * @param index
95
+ * @category query
96
+ */
8
97
  index(index: number): this;
98
+ /**
99
+ * Specify the next page of results.
100
+ *
101
+ * #### Example
102
+ * ```typescript
103
+ * const maxResults = 20;
104
+ *
105
+ * const assetsPage1 = await indexerClient
106
+ * .searchForAssets()
107
+ * .limit(maxResults)
108
+ * .do();
109
+ *
110
+ * const assetsPage2 = await indexerClient
111
+ * .searchForAssets()
112
+ * .limit(maxResults)
113
+ * .nextToken(assetsPage1["next-token"])
114
+ * .do();
115
+ * ```
116
+ * @param nextToken - provided by the previous results.
117
+ * @category query
118
+ */
9
119
  nextToken(nextToken: string): this;
120
+ /**
121
+ * Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
122
+ *
123
+ * #### Example 1
124
+ * ```typescript
125
+ * const assets = await indexerClient
126
+ * .searchForAssets()
127
+ * .includeAll(false)
128
+ * .do();
129
+ * ```
130
+ *
131
+ * #### Example 2
132
+ * ```typescript
133
+ * const assets = await indexerClient
134
+ * .searchForAssets()
135
+ * .includeAll()
136
+ * .do();
137
+ * ```
138
+ *
139
+ * @param value - default true when called without passing a value
140
+ * @category query
141
+ */
10
142
  includeAll(value?: boolean): this;
11
143
  }
@@ -1,27 +1,354 @@
1
1
  import JSONRequest from '../jsonrequest';
2
+ /**
3
+ * Returns information about indexed transactions.
4
+ *
5
+ * #### Example
6
+ * ```typescript
7
+ * const txns = await indexerClient.searchForTransactions().do();
8
+ * ```
9
+ *
10
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2transactions)
11
+ * @category GET
12
+ */
2
13
  export default class SearchForTransactions extends JSONRequest {
14
+ /**
15
+ * @returns `/v2/transactions`
16
+ */
3
17
  path(): string;
4
18
  /**
5
- * notePrefix to filter with
19
+ * Specifies a prefix which must be contained in the note field.
20
+ *
21
+ * #### Example
22
+ * ```typescript
23
+ * const notePrefixBase64Encoded = "Y3JlYXRl";
24
+ * const txns = await indexerClient
25
+ * .searchForTransactions()
26
+ * .notePrefix(notePrefixBase64Encoded)
27
+ * .do();
28
+ * ```
29
+ *
6
30
  * @param prefix - base64 string or uint8array
31
+ * @category query
7
32
  */
8
33
  notePrefix(prefix: Uint8Array | string): this;
34
+ /**
35
+ * Type of transaction to filter with.
36
+ *
37
+ * #### Example
38
+ * ```typescript
39
+ * const txns = await indexerClient
40
+ * .searchForTransactions()
41
+ * .txType("keyreg")
42
+ * .do();
43
+ * ```
44
+ *
45
+ * @param type - one of `pay`, `keyreg`, `acfg`, `axfer`, `afrz`, `appl`
46
+ * @category query
47
+ */
9
48
  txType(type: string): this;
49
+ /**
50
+ * Type of signature to filter with.
51
+ * - sig: Standard
52
+ * - msig: MultiSig
53
+ * - lsig: LogicSig
54
+ *
55
+ * #### Example
56
+ * ```typescript
57
+ * const txns = await indexerClient
58
+ * .searchForTransactions()
59
+ * .sigType("sig")
60
+ * .do();
61
+ * ```
62
+ *
63
+ * @param type - one of `sig`, `msig`, `lsig`
64
+ * @category query
65
+ */
10
66
  sigType(type: string): this;
67
+ /**
68
+ * Lookup the specific transaction by ID.
69
+ *
70
+ * #### Example
71
+ * ```typescript
72
+ * const txId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
73
+ * const txns = await indexerClient
74
+ * .searchForTransactions()
75
+ * .txid(txId)
76
+ * .do();
77
+ * ```
78
+ * @remarks Alternatively, use `indexerClient.lookupTransactionByID(txnId).do()`
79
+ * @param txid
80
+ * @category query
81
+ */
11
82
  txid(txid: string): this;
83
+ /**
84
+ * Include results for the specified round.
85
+ *
86
+ * #### Example
87
+ * ```typescript
88
+ * const targetBlock = 18309917;
89
+ * const txns = await indexerClient
90
+ * .searchForTransactions()
91
+ * .round(targetBlock)
92
+ * .do();
93
+ * ```
94
+ * @remarks Alternatively, use `indexerClient.lookupBlock(targetBlock).do()`
95
+ * @param round
96
+ * @category query
97
+ */
12
98
  round(round: number): this;
99
+ /**
100
+ * Include results at or after the specified min-round.
101
+ *
102
+ * #### Example
103
+ * ```typescript
104
+ * const minRound = 18309917;
105
+ * const txns = await indexerClient
106
+ * .searchForTransactions()
107
+ * .minRound(minRound)
108
+ * .do();
109
+ * ```
110
+ *
111
+ * @param round
112
+ * @category query
113
+ */
13
114
  minRound(round: number): this;
115
+ /**
116
+ * Include results at or before the specified max-round.
117
+ *
118
+ * #### Example
119
+ * ```typescript
120
+ * const maxRound = 18309917;
121
+ * const txns = await indexerClient
122
+ * .searchForTransactions()
123
+ * .maxRound(maxRound)
124
+ * .do();
125
+ * ```
126
+ *
127
+ * @param round
128
+ * @category query
129
+ */
14
130
  maxRound(round: number): this;
131
+ /**
132
+ * Asset ID to filter with.
133
+ *
134
+ * #### Example
135
+ * ```typescript
136
+ * const assetID = 163650;
137
+ * const txns = await indexerClient
138
+ * .searchForTransactions()
139
+ * .assetID(assetID)
140
+ * .do();
141
+ * ```
142
+ * @remarks Alternatively, use `indexerClient.lookupAssetTransactions(assetId).do()`
143
+ * @param id
144
+ * @category query
145
+ */
15
146
  assetID(id: number): this;
147
+ /**
148
+ * Maximum number of results to return.
149
+ *
150
+ * #### Example
151
+ * ```typescript
152
+ * const maxResults = 25;
153
+ * const txns = await indexerClient
154
+ * .searchForTransactions()
155
+ * .limit(maxResults)
156
+ * .do();
157
+ * ```
158
+ *
159
+ * @param limit
160
+ * @category query
161
+ */
16
162
  limit(limit: number): this;
163
+ /**
164
+ * Include results before the given time.
165
+ *
166
+ * #### Example
167
+ * ```typescript
168
+ * const beforeTime = "2022-02-02T20:20:22.02Z";
169
+ * const txns = await indexerClient
170
+ * .searchForTransactions()
171
+ * .beforeTime(beforeTime)
172
+ * .do();
173
+ * ```
174
+ *
175
+ * @param before - rfc3339 string
176
+ * @category query
177
+ */
17
178
  beforeTime(before: string): this;
179
+ /**
180
+ * Include results after the given time.
181
+ *
182
+ * #### Example
183
+ * ```typescript
184
+ * const afterTime = "2022-10-21T00:00:11.55Z";
185
+ * const txns = await indexerClient
186
+ * .searchForTransactions()
187
+ * .afterTime(afterTime)
188
+ * .do();
189
+ * ```
190
+ *
191
+ * @param after - rfc3339 string
192
+ * @category query
193
+ */
18
194
  afterTime(after: string): this;
195
+ /**
196
+ * Filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
197
+ *
198
+ * #### Example 1
199
+ * ```typescript
200
+ * const minBalance = 300000;
201
+ * const txns = await indexerClient
202
+ * .searchForTransactions()
203
+ * .currencyGreaterThan(minBalance - 1)
204
+ * .do();
205
+ * ```
206
+ *
207
+ * #### Example 2
208
+ * ```typescript
209
+ * const assetID = 163650;
210
+ * const minBalance = 300000;
211
+ * const txns = await indexerClient
212
+ * .searchForTransactions()
213
+ * .assetID(assetID)
214
+ * .currencyGreaterThan(minBalance - 1)
215
+ * .do();
216
+ * ```
217
+ * @remarks
218
+ * If you are looking for transactions with the currency amount greater than 0, simply construct the query without `currencyGreaterThan` because it doesn't accept `-1`, and passing the `0` `currency-greater-than` value would exclude transactions with a 0 amount.
219
+ *
220
+ * @param greater
221
+ * @category query
222
+ */
19
223
  currencyGreaterThan(greater: number): this;
224
+ /**
225
+ * Filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
226
+ *
227
+ * #### Example 1
228
+ * ```typescript
229
+ * const maxBalance = 500000;
230
+ * const txns = await indexerClient
231
+ * .searchForTransactions()
232
+ * .currencyLessThan(maxBalance + 1)
233
+ * .do();
234
+ * ```
235
+ *
236
+ * #### Example 2
237
+ * ```typescript
238
+ * const assetID = 163650;
239
+ * const maxBalance = 500000;
240
+ * const txns = await indexerClient
241
+ * .searchForTransactions()
242
+ * .assetID(assetID)
243
+ * .currencyLessThan(maxBalance + 1)
244
+ * .do();
245
+ * ```
246
+ *
247
+ * @param lesser
248
+ * @category query
249
+ */
20
250
  currencyLessThan(lesser: number): this;
251
+ /**
252
+ * Combined with address, defines what address to filter on, as string.
253
+ *
254
+ * #### Example
255
+ * ```typescript
256
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
257
+ * const role = "freeze-target";
258
+ * const txns = await indexerClient
259
+ * .searchForTransactions()
260
+ * .address(address)
261
+ * .addressRole(role)
262
+ * .do();
263
+ * ```
264
+ *
265
+ * @param role - one of `sender`, `receiver`, `freeze-target`
266
+ * @category query
267
+ */
21
268
  addressRole(role: string): this;
269
+ /**
270
+ * Only include transactions with this address in one of the transaction fields.
271
+ *
272
+ * #### Example
273
+ * ```typescript
274
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
275
+ * const txns = await indexerClient
276
+ * .searchForTransactions()
277
+ * .address(address)
278
+ * .do();
279
+ * ```
280
+ * @remarks Alternatively, use `indexerClient.lookupAccountTransactions(address).do()`
281
+ * @param address
282
+ * @category query
283
+ */
22
284
  address(address: string): this;
285
+ /**
286
+ * Whether or not to consider the `close-to` field as a receiver when filtering transactions, as bool. Set to `true` to ignore `close-to`.
287
+ *
288
+ * #### Example
289
+ * ```typescript
290
+ * const txns = await indexerClient
291
+ * .searchForTransactions()
292
+ * .excludeCloseTo(true)
293
+ * .do();
294
+ * ```
295
+ *
296
+ * @param exclude
297
+ * @category query
298
+ */
23
299
  excludeCloseTo(exclude: boolean): this;
300
+ /**
301
+ * The next page of results.
302
+ *
303
+ * #### Example
304
+ * ```typescript
305
+ * const maxResults = 25;
306
+ *
307
+ * const txnsPage1 = await indexerClient
308
+ * .searchForTransactions()
309
+ * .limit(maxResults)
310
+ * .do();
311
+ *
312
+ * const txnsPage2 = await indexerClient
313
+ * .searchForTransactions()
314
+ * .limit(maxResults)
315
+ * .nextToken(txnsPage1["next-token"])
316
+ * .do();
317
+ * ```
318
+ *
319
+ * @param nextToken - provided by the previous results
320
+ * @category query
321
+ */
24
322
  nextToken(nextToken: string): this;
323
+ /**
324
+ * Whether or not to include rekeying transactions.
325
+ *
326
+ * #### Example
327
+ * ```typescript
328
+ * const txns = await indexerClient
329
+ * .searchForTransactions()
330
+ * .rekeyTo(false)
331
+ * .do();
332
+ * ```
333
+ *
334
+ * @param rekeyTo
335
+ * @category query
336
+ */
25
337
  rekeyTo(rekeyTo: boolean): this;
338
+ /**
339
+ * Filter for this application.
340
+ *
341
+ * #### Example
342
+ * ```typescript
343
+ * const appId = 60553466;
344
+ * const txns = await indexerClient
345
+ * .searchForTransactions()
346
+ * .applicationID(appId)
347
+ * .do();
348
+ * ```
349
+ *
350
+ * @param applicationID
351
+ * @category query
352
+ */
26
353
  applicationID(applicationID: number): this;
27
354
  }
@@ -12,6 +12,10 @@ export interface ABIResult {
12
12
  * does not return a value (return type "void").
13
13
  */
14
14
  rawReturnValue: Uint8Array;
15
+ /**
16
+ * The method that was called for this result
17
+ */
18
+ method: ABIMethod;
15
19
  /**
16
20
  * The return value from the ABI method call. This will be undefined if the method does not return
17
21
  * a value (return type "void"), or if the SDK was unable to decode the returned value.
@@ -1,5 +1,5 @@
1
1
  import AlgodClient from './client/v2/algod/algod';
2
- import { DryrunRequest, DryrunSource } from './client/v2/algod/models/types';
2
+ import { AccountStateDelta, DryrunRequest, DryrunSource, EvalDeltaKeyValue, TealValue } from './client/v2/algod/models/types';
3
3
  import { SignedTransaction } from './transaction';
4
4
  /**
5
5
  * createDryrun takes an Algod Client (from algod.AlgodV2Client) and an array of Signed Transactions
@@ -18,3 +18,83 @@ export declare function createDryrun({ client, txns, protocolVersion, latestTime
18
18
  round?: number | bigint;
19
19
  sources?: DryrunSource[];
20
20
  }): Promise<DryrunRequest>;
21
+ interface StackValueResponse {
22
+ type: number;
23
+ bytes: string;
24
+ uint: number;
25
+ }
26
+ declare class DryrunStackValue {
27
+ type: number;
28
+ bytes: string;
29
+ uint: number;
30
+ constructor(sv: StackValueResponse);
31
+ toString(): string;
32
+ }
33
+ interface DryrunTraceLineResponse {
34
+ error: string;
35
+ line: number;
36
+ pc: number;
37
+ scratch: TealValue[];
38
+ stack: StackValueResponse[];
39
+ }
40
+ declare class DryrunTraceLine {
41
+ error: string;
42
+ line: number;
43
+ pc: number;
44
+ scratch: TealValue[];
45
+ stack: DryrunStackValue[];
46
+ constructor(line: DryrunTraceLineResponse);
47
+ }
48
+ declare class DryrunTrace {
49
+ trace: DryrunTraceLine[];
50
+ constructor(t: DryrunTraceLineResponse[]);
51
+ }
52
+ interface DryrunTransactionResultResponse {
53
+ disassembly: string[];
54
+ appCallMessages: string[] | undefined;
55
+ localDeltas: AccountStateDelta[] | undefined;
56
+ globalDelta: EvalDeltaKeyValue[] | undefined;
57
+ cost: number | undefined;
58
+ logicSigMessages: string[] | undefined;
59
+ logicSigDisassembly: string[] | undefined;
60
+ logs: string[] | undefined;
61
+ appCallTrace: DryrunTrace | undefined;
62
+ logicSigTrace: DryrunTrace | undefined;
63
+ }
64
+ interface StackPrinterConfig {
65
+ maxValueWidth: number | undefined;
66
+ topOfStackFirst: boolean | undefined;
67
+ }
68
+ declare class DryrunTransactionResult {
69
+ disassembly: string[];
70
+ appCallMessages: string[] | undefined;
71
+ localDeltas: AccountStateDelta[] | undefined;
72
+ globalDelta: EvalDeltaKeyValue[] | undefined;
73
+ cost: number | undefined;
74
+ logicSigMessages: string[] | undefined;
75
+ logicSigDisassembly: string[] | undefined;
76
+ logs: string[] | undefined;
77
+ appCallTrace: DryrunTrace | undefined;
78
+ logicSigTrace: DryrunTrace | undefined;
79
+ required: string[];
80
+ optionals: string[];
81
+ traces: string[];
82
+ constructor(dtr: DryrunTransactionResultResponse);
83
+ appCallRejected(): boolean;
84
+ logicSigRejected(): boolean;
85
+ static trace(drt: DryrunTrace, disassembly: string[], spc: StackPrinterConfig): string;
86
+ appTrace(spc?: StackPrinterConfig): string;
87
+ lsigTrace(spc?: StackPrinterConfig): string;
88
+ }
89
+ interface DryrunResultResponse {
90
+ ['error']: string;
91
+ ['protocol-version']: string;
92
+ ['txns']: DryrunTransactionResultResponse[];
93
+ }
94
+ export declare class DryrunResult {
95
+ error: string;
96
+ protocolVersion: string;
97
+ txns: DryrunTransactionResult[];
98
+ constructor(drrResp: DryrunResultResponse);
99
+ }
100
+ export {};