@stacks/blockchain-api-client 8.6.0 → 8.8.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.
@@ -820,7 +820,10 @@ export interface paths {
820
820
  };
821
821
  /**
822
822
  * Get account STX balance
823
- * @description Retrieves STX token balance for a given Address or Contract Identifier.
823
+ * @deprecated
824
+ * @description **NOTE:** This endpoint is deprecated in favor of [Get address STX balance](/api/get-principal-stx-balance).
825
+ *
826
+ * Retrieves STX token balance for a given Address or Contract Identifier.
824
827
  */
825
828
  get: operations["get_account_stx_balance"];
826
829
  put?: never;
@@ -840,7 +843,10 @@ export interface paths {
840
843
  };
841
844
  /**
842
845
  * Get account balances
843
- * @description Retrieves total account balance information for a given Address or Contract Identifier. This includes the balances of STX Tokens, Fungible Tokens and Non-Fungible Tokens for the account.
846
+ * @deprecated
847
+ * @description **NOTE:** This endpoint is deprecated in favor of [Get address FT balances](/api/get-principal-ft-balances).
848
+ *
849
+ * Retrieves total account balance information for a given Address or Contract Identifier. This includes the balances of STX Tokens, Fungible Tokens and Non-Fungible Tokens for the account.
844
850
  */
845
851
  get: operations["get_account_balance"];
846
852
  put?: never;
@@ -1571,6 +1577,46 @@ export interface paths {
1571
1577
  patch?: never;
1572
1578
  trace?: never;
1573
1579
  };
1580
+ "/extended/v2/addresses/{principal}/balances/stx": {
1581
+ parameters: {
1582
+ query?: never;
1583
+ header?: never;
1584
+ path?: never;
1585
+ cookie?: never;
1586
+ };
1587
+ /**
1588
+ * Get principal STX balance
1589
+ * @description Retrieves STX account balance information for a given Address or Contract Identifier.
1590
+ */
1591
+ get: operations["get_principal_stx_balance"];
1592
+ put?: never;
1593
+ post?: never;
1594
+ delete?: never;
1595
+ options?: never;
1596
+ head?: never;
1597
+ patch?: never;
1598
+ trace?: never;
1599
+ };
1600
+ "/extended/v2/addresses/{principal}/balances/ft": {
1601
+ parameters: {
1602
+ query?: never;
1603
+ header?: never;
1604
+ path?: never;
1605
+ cookie?: never;
1606
+ };
1607
+ /**
1608
+ * Get principal FT balances
1609
+ * @description Retrieves Fungible-token account balance information for a given Address or Contract Identifier.
1610
+ */
1611
+ get: operations["get_principal_ft_balances"];
1612
+ put?: never;
1613
+ post?: never;
1614
+ delete?: never;
1615
+ options?: never;
1616
+ head?: never;
1617
+ patch?: never;
1618
+ trace?: never;
1619
+ };
1574
1620
  "/v1/names/{name}/zonefile/{zoneFileHash}": {
1575
1621
  parameters: {
1576
1622
  query?: never;
@@ -18391,9 +18437,13 @@ export interface operations {
18391
18437
  balance: string;
18392
18438
  /** @description Total STX balance considering pending mempool transactions */
18393
18439
  estimated_balance?: string;
18394
- total_sent: string;
18395
- total_received: string;
18396
- total_fees_sent: string;
18440
+ /** @description Inbound STX balance from pending mempool transactions */
18441
+ pending_balance_inbound?: string;
18442
+ /** @description Outbound STX balance from pending mempool transactions */
18443
+ pending_balance_outbound?: string;
18444
+ total_sent?: string;
18445
+ total_received?: string;
18446
+ total_fees_sent?: string;
18397
18447
  total_miner_rewards_received: string;
18398
18448
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
18399
18449
  lock_tx_id: string;
@@ -18471,9 +18521,13 @@ export interface operations {
18471
18521
  balance: string;
18472
18522
  /** @description Total STX balance considering pending mempool transactions */
18473
18523
  estimated_balance?: string;
18474
- total_sent: string;
18475
- total_received: string;
18476
- total_fees_sent: string;
18524
+ /** @description Inbound STX balance from pending mempool transactions */
18525
+ pending_balance_inbound?: string;
18526
+ /** @description Outbound STX balance from pending mempool transactions */
18527
+ pending_balance_outbound?: string;
18528
+ total_sent?: string;
18529
+ total_received?: string;
18530
+ total_fees_sent?: string;
18477
18531
  total_miner_rewards_received: string;
18478
18532
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
18479
18533
  lock_tx_id: string;
@@ -23613,9 +23667,13 @@ export interface operations {
23613
23667
  balance: string;
23614
23668
  /** @description Total STX balance considering pending mempool transactions */
23615
23669
  estimated_balance?: string;
23616
- total_sent: string;
23617
- total_received: string;
23618
- total_fees_sent: string;
23670
+ /** @description Inbound STX balance from pending mempool transactions */
23671
+ pending_balance_inbound?: string;
23672
+ /** @description Outbound STX balance from pending mempool transactions */
23673
+ pending_balance_outbound?: string;
23674
+ total_sent?: string;
23675
+ total_received?: string;
23676
+ total_fees_sent?: string;
23619
23677
  total_miner_rewards_received: string;
23620
23678
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
23621
23679
  lock_tx_id: string;
@@ -31506,6 +31564,119 @@ export interface operations {
31506
31564
  };
31507
31565
  };
31508
31566
  };
31567
+ get_principal_stx_balance: {
31568
+ parameters: {
31569
+ query?: {
31570
+ /** @description Include pending mempool transactions in the balance calculation */
31571
+ include_mempool?: boolean;
31572
+ };
31573
+ header?: never;
31574
+ path: {
31575
+ principal: string;
31576
+ };
31577
+ cookie?: never;
31578
+ };
31579
+ requestBody?: never;
31580
+ responses: {
31581
+ /** @description Default Response */
31582
+ 200: {
31583
+ headers: {
31584
+ [name: string]: unknown;
31585
+ };
31586
+ content: {
31587
+ "application/json": {
31588
+ balance: string;
31589
+ /** @description Total STX balance considering pending mempool transactions */
31590
+ estimated_balance?: string;
31591
+ /** @description Inbound STX balance from pending mempool transactions */
31592
+ pending_balance_inbound?: string;
31593
+ /** @description Outbound STX balance from pending mempool transactions */
31594
+ pending_balance_outbound?: string;
31595
+ total_sent?: string;
31596
+ total_received?: string;
31597
+ total_fees_sent?: string;
31598
+ total_miner_rewards_received: string;
31599
+ /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
31600
+ lock_tx_id: string;
31601
+ /** @description The amount of locked STX, as string quoted micro-STX. Zero if no tokens are locked. */
31602
+ locked: string;
31603
+ /** @description The STX chain block height of when the lock event occurred. Zero if no tokens are locked. */
31604
+ lock_height: number;
31605
+ /** @description The burnchain block height of when the lock event occurred. Zero if no tokens are locked. */
31606
+ burnchain_lock_height: number;
31607
+ /** @description The burnchain block height of when the tokens unlock. Zero if no tokens are locked. */
31608
+ burnchain_unlock_height: number;
31609
+ };
31610
+ };
31611
+ };
31612
+ /** @description Default Response */
31613
+ "4XX": {
31614
+ headers: {
31615
+ [name: string]: unknown;
31616
+ };
31617
+ content: {
31618
+ "application/json": {
31619
+ error: string;
31620
+ message?: string;
31621
+ } & {
31622
+ [key: string]: unknown;
31623
+ };
31624
+ };
31625
+ };
31626
+ };
31627
+ };
31628
+ get_principal_ft_balances: {
31629
+ parameters: {
31630
+ query?: {
31631
+ /** @description Results per page */
31632
+ limit?: number;
31633
+ /** @description Result offset */
31634
+ offset?: number;
31635
+ };
31636
+ header?: never;
31637
+ path: {
31638
+ principal: string;
31639
+ };
31640
+ cookie?: never;
31641
+ };
31642
+ requestBody?: never;
31643
+ responses: {
31644
+ /** @description Default Response */
31645
+ 200: {
31646
+ headers: {
31647
+ [name: string]: unknown;
31648
+ };
31649
+ content: {
31650
+ "application/json": {
31651
+ /** @example 20 */
31652
+ limit: number;
31653
+ /** @example 0 */
31654
+ offset: number;
31655
+ /** @example 1 */
31656
+ total: number;
31657
+ results: {
31658
+ token: string;
31659
+ balance: string;
31660
+ }[];
31661
+ };
31662
+ };
31663
+ };
31664
+ /** @description Default Response */
31665
+ "4XX": {
31666
+ headers: {
31667
+ [name: string]: unknown;
31668
+ };
31669
+ content: {
31670
+ "application/json": {
31671
+ error: string;
31672
+ message?: string;
31673
+ } & {
31674
+ [key: string]: unknown;
31675
+ };
31676
+ };
31677
+ };
31678
+ };
31679
+ };
31509
31680
  get_historical_zone_file: {
31510
31681
  parameters: {
31511
31682
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacks/blockchain-api-client",
3
- "version": "8.6.0",
3
+ "version": "8.8.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",
@@ -820,7 +820,10 @@ export interface paths {
820
820
  };
821
821
  /**
822
822
  * Get account STX balance
823
- * @description Retrieves STX token balance for a given Address or Contract Identifier.
823
+ * @deprecated
824
+ * @description **NOTE:** This endpoint is deprecated in favor of [Get address STX balance](/api/get-principal-stx-balance).
825
+ *
826
+ * Retrieves STX token balance for a given Address or Contract Identifier.
824
827
  */
825
828
  get: operations["get_account_stx_balance"];
826
829
  put?: never;
@@ -840,7 +843,10 @@ export interface paths {
840
843
  };
841
844
  /**
842
845
  * Get account balances
843
- * @description Retrieves total account balance information for a given Address or Contract Identifier. This includes the balances of STX Tokens, Fungible Tokens and Non-Fungible Tokens for the account.
846
+ * @deprecated
847
+ * @description **NOTE:** This endpoint is deprecated in favor of [Get address FT balances](/api/get-principal-ft-balances).
848
+ *
849
+ * Retrieves total account balance information for a given Address or Contract Identifier. This includes the balances of STX Tokens, Fungible Tokens and Non-Fungible Tokens for the account.
844
850
  */
845
851
  get: operations["get_account_balance"];
846
852
  put?: never;
@@ -1571,6 +1577,46 @@ export interface paths {
1571
1577
  patch?: never;
1572
1578
  trace?: never;
1573
1579
  };
1580
+ "/extended/v2/addresses/{principal}/balances/stx": {
1581
+ parameters: {
1582
+ query?: never;
1583
+ header?: never;
1584
+ path?: never;
1585
+ cookie?: never;
1586
+ };
1587
+ /**
1588
+ * Get principal STX balance
1589
+ * @description Retrieves STX account balance information for a given Address or Contract Identifier.
1590
+ */
1591
+ get: operations["get_principal_stx_balance"];
1592
+ put?: never;
1593
+ post?: never;
1594
+ delete?: never;
1595
+ options?: never;
1596
+ head?: never;
1597
+ patch?: never;
1598
+ trace?: never;
1599
+ };
1600
+ "/extended/v2/addresses/{principal}/balances/ft": {
1601
+ parameters: {
1602
+ query?: never;
1603
+ header?: never;
1604
+ path?: never;
1605
+ cookie?: never;
1606
+ };
1607
+ /**
1608
+ * Get principal FT balances
1609
+ * @description Retrieves Fungible-token account balance information for a given Address or Contract Identifier.
1610
+ */
1611
+ get: operations["get_principal_ft_balances"];
1612
+ put?: never;
1613
+ post?: never;
1614
+ delete?: never;
1615
+ options?: never;
1616
+ head?: never;
1617
+ patch?: never;
1618
+ trace?: never;
1619
+ };
1574
1620
  "/v1/names/{name}/zonefile/{zoneFileHash}": {
1575
1621
  parameters: {
1576
1622
  query?: never;
@@ -18391,9 +18437,13 @@ export interface operations {
18391
18437
  balance: string;
18392
18438
  /** @description Total STX balance considering pending mempool transactions */
18393
18439
  estimated_balance?: string;
18394
- total_sent: string;
18395
- total_received: string;
18396
- total_fees_sent: string;
18440
+ /** @description Inbound STX balance from pending mempool transactions */
18441
+ pending_balance_inbound?: string;
18442
+ /** @description Outbound STX balance from pending mempool transactions */
18443
+ pending_balance_outbound?: string;
18444
+ total_sent?: string;
18445
+ total_received?: string;
18446
+ total_fees_sent?: string;
18397
18447
  total_miner_rewards_received: string;
18398
18448
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
18399
18449
  lock_tx_id: string;
@@ -18471,9 +18521,13 @@ export interface operations {
18471
18521
  balance: string;
18472
18522
  /** @description Total STX balance considering pending mempool transactions */
18473
18523
  estimated_balance?: string;
18474
- total_sent: string;
18475
- total_received: string;
18476
- total_fees_sent: string;
18524
+ /** @description Inbound STX balance from pending mempool transactions */
18525
+ pending_balance_inbound?: string;
18526
+ /** @description Outbound STX balance from pending mempool transactions */
18527
+ pending_balance_outbound?: string;
18528
+ total_sent?: string;
18529
+ total_received?: string;
18530
+ total_fees_sent?: string;
18477
18531
  total_miner_rewards_received: string;
18478
18532
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
18479
18533
  lock_tx_id: string;
@@ -23613,9 +23667,13 @@ export interface operations {
23613
23667
  balance: string;
23614
23668
  /** @description Total STX balance considering pending mempool transactions */
23615
23669
  estimated_balance?: string;
23616
- total_sent: string;
23617
- total_received: string;
23618
- total_fees_sent: string;
23670
+ /** @description Inbound STX balance from pending mempool transactions */
23671
+ pending_balance_inbound?: string;
23672
+ /** @description Outbound STX balance from pending mempool transactions */
23673
+ pending_balance_outbound?: string;
23674
+ total_sent?: string;
23675
+ total_received?: string;
23676
+ total_fees_sent?: string;
23619
23677
  total_miner_rewards_received: string;
23620
23678
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
23621
23679
  lock_tx_id: string;
@@ -31506,6 +31564,119 @@ export interface operations {
31506
31564
  };
31507
31565
  };
31508
31566
  };
31567
+ get_principal_stx_balance: {
31568
+ parameters: {
31569
+ query?: {
31570
+ /** @description Include pending mempool transactions in the balance calculation */
31571
+ include_mempool?: boolean;
31572
+ };
31573
+ header?: never;
31574
+ path: {
31575
+ principal: string;
31576
+ };
31577
+ cookie?: never;
31578
+ };
31579
+ requestBody?: never;
31580
+ responses: {
31581
+ /** @description Default Response */
31582
+ 200: {
31583
+ headers: {
31584
+ [name: string]: unknown;
31585
+ };
31586
+ content: {
31587
+ "application/json": {
31588
+ balance: string;
31589
+ /** @description Total STX balance considering pending mempool transactions */
31590
+ estimated_balance?: string;
31591
+ /** @description Inbound STX balance from pending mempool transactions */
31592
+ pending_balance_inbound?: string;
31593
+ /** @description Outbound STX balance from pending mempool transactions */
31594
+ pending_balance_outbound?: string;
31595
+ total_sent?: string;
31596
+ total_received?: string;
31597
+ total_fees_sent?: string;
31598
+ total_miner_rewards_received: string;
31599
+ /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
31600
+ lock_tx_id: string;
31601
+ /** @description The amount of locked STX, as string quoted micro-STX. Zero if no tokens are locked. */
31602
+ locked: string;
31603
+ /** @description The STX chain block height of when the lock event occurred. Zero if no tokens are locked. */
31604
+ lock_height: number;
31605
+ /** @description The burnchain block height of when the lock event occurred. Zero if no tokens are locked. */
31606
+ burnchain_lock_height: number;
31607
+ /** @description The burnchain block height of when the tokens unlock. Zero if no tokens are locked. */
31608
+ burnchain_unlock_height: number;
31609
+ };
31610
+ };
31611
+ };
31612
+ /** @description Default Response */
31613
+ "4XX": {
31614
+ headers: {
31615
+ [name: string]: unknown;
31616
+ };
31617
+ content: {
31618
+ "application/json": {
31619
+ error: string;
31620
+ message?: string;
31621
+ } & {
31622
+ [key: string]: unknown;
31623
+ };
31624
+ };
31625
+ };
31626
+ };
31627
+ };
31628
+ get_principal_ft_balances: {
31629
+ parameters: {
31630
+ query?: {
31631
+ /** @description Results per page */
31632
+ limit?: number;
31633
+ /** @description Result offset */
31634
+ offset?: number;
31635
+ };
31636
+ header?: never;
31637
+ path: {
31638
+ principal: string;
31639
+ };
31640
+ cookie?: never;
31641
+ };
31642
+ requestBody?: never;
31643
+ responses: {
31644
+ /** @description Default Response */
31645
+ 200: {
31646
+ headers: {
31647
+ [name: string]: unknown;
31648
+ };
31649
+ content: {
31650
+ "application/json": {
31651
+ /** @example 20 */
31652
+ limit: number;
31653
+ /** @example 0 */
31654
+ offset: number;
31655
+ /** @example 1 */
31656
+ total: number;
31657
+ results: {
31658
+ token: string;
31659
+ balance: string;
31660
+ }[];
31661
+ };
31662
+ };
31663
+ };
31664
+ /** @description Default Response */
31665
+ "4XX": {
31666
+ headers: {
31667
+ [name: string]: unknown;
31668
+ };
31669
+ content: {
31670
+ "application/json": {
31671
+ error: string;
31672
+ message?: string;
31673
+ } & {
31674
+ [key: string]: unknown;
31675
+ };
31676
+ };
31677
+ };
31678
+ };
31679
+ };
31509
31680
  get_historical_zone_file: {
31510
31681
  parameters: {
31511
31682
  query?: {