@stacks/blockchain-api-client 7.11.0 → 7.12.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacks/blockchain-api-client",
3
- "version": "7.11.0",
3
+ "version": "7.12.0-beta.1",
4
4
  "access": "public",
5
5
  "description": "Client for the Stacks Blockchain API",
6
6
  "homepage": "https://github.com/hirosystems/stacks-blockchain-api/tree/master/client#readme",
@@ -100,6 +100,8 @@ export interface GetTransactionListRequest {
100
100
  limit?: number;
101
101
  offset?: number;
102
102
  type?: Array<GetTransactionListTypeEnum>;
103
+ sortBy?: GetTransactionListSortByEnum;
104
+ order?: GetTransactionListOrderEnum;
103
105
  unanchored?: boolean;
104
106
  }
105
107
 
@@ -310,6 +312,8 @@ export interface TransactionsApiInterface {
310
312
  * @param {number} [limit] max number of transactions to fetch
311
313
  * @param {number} [offset] index of first transaction to fetch
312
314
  * @param {Array<'coinbase' | 'token_transfer' | 'smart_contract' | 'contract_call' | 'poison_microblock' | 'tenure_change'>} [type] Filter by transaction type
315
+ * @param {'block_height' | 'burn_block_time' | 'fee'} [sortBy] Option to sort results by block height, timestamp, or fee
316
+ * @param {'asc' | 'desc'} [order] Option to sort results in ascending or descending order
313
317
  * @param {boolean} [unanchored] Include transaction data from unanchored (i.e. unconfirmed) microblocks
314
318
  * @param {*} [options] Override http request option.
315
319
  * @throws {RequiredError}
@@ -813,6 +817,14 @@ export class TransactionsApi extends runtime.BaseAPI implements TransactionsApiI
813
817
  queryParameters['type'] = requestParameters.type;
814
818
  }
815
819
 
820
+ if (requestParameters.sortBy !== undefined) {
821
+ queryParameters['sort_by'] = requestParameters.sortBy;
822
+ }
823
+
824
+ if (requestParameters.order !== undefined) {
825
+ queryParameters['order'] = requestParameters.order;
826
+ }
827
+
816
828
  if (requestParameters.unanchored !== undefined) {
817
829
  queryParameters['unanchored'] = requestParameters.unanchored;
818
830
  }
@@ -1075,3 +1087,20 @@ export enum GetTransactionListTypeEnum {
1075
1087
  poison_microblock = 'poison_microblock',
1076
1088
  tenure_change = 'tenure_change'
1077
1089
  }
1090
+ /**
1091
+ * @export
1092
+ * @enum {string}
1093
+ */
1094
+ export enum GetTransactionListSortByEnum {
1095
+ block_height = 'block_height',
1096
+ burn_block_time = 'burn_block_time',
1097
+ fee = 'fee'
1098
+ }
1099
+ /**
1100
+ * @export
1101
+ * @enum {string}
1102
+ */
1103
+ export enum GetTransactionListOrderEnum {
1104
+ asc = 'asc',
1105
+ desc = 'desc'
1106
+ }