@stacks/blockchain-api-client 8.7.0 → 8.8.0-beta.2

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,66 @@ 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
+ };
1620
+ "/extended/v2/addresses/{principal}/balances/ft/{token}": {
1621
+ parameters: {
1622
+ query?: never;
1623
+ header?: never;
1624
+ path?: never;
1625
+ cookie?: never;
1626
+ };
1627
+ /**
1628
+ * Get principal FT balance
1629
+ * @description Retrieves a specific fungible-token balance for a given principal.
1630
+ */
1631
+ get: operations["get_principal_ft_balance"];
1632
+ put?: never;
1633
+ post?: never;
1634
+ delete?: never;
1635
+ options?: never;
1636
+ head?: never;
1637
+ patch?: never;
1638
+ trace?: never;
1639
+ };
1574
1640
  "/v1/names/{name}/zonefile/{zoneFileHash}": {
1575
1641
  parameters: {
1576
1642
  query?: never;
@@ -18395,9 +18461,9 @@ export interface operations {
18395
18461
  pending_balance_inbound?: string;
18396
18462
  /** @description Outbound STX balance from pending mempool transactions */
18397
18463
  pending_balance_outbound?: string;
18398
- total_sent: string;
18399
- total_received: string;
18400
- total_fees_sent: string;
18464
+ total_sent?: string;
18465
+ total_received?: string;
18466
+ total_fees_sent?: string;
18401
18467
  total_miner_rewards_received: string;
18402
18468
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
18403
18469
  lock_tx_id: string;
@@ -18479,9 +18545,9 @@ export interface operations {
18479
18545
  pending_balance_inbound?: string;
18480
18546
  /** @description Outbound STX balance from pending mempool transactions */
18481
18547
  pending_balance_outbound?: string;
18482
- total_sent: string;
18483
- total_received: string;
18484
- total_fees_sent: string;
18548
+ total_sent?: string;
18549
+ total_received?: string;
18550
+ total_fees_sent?: string;
18485
18551
  total_miner_rewards_received: string;
18486
18552
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
18487
18553
  lock_tx_id: string;
@@ -23625,9 +23691,9 @@ export interface operations {
23625
23691
  pending_balance_inbound?: string;
23626
23692
  /** @description Outbound STX balance from pending mempool transactions */
23627
23693
  pending_balance_outbound?: string;
23628
- total_sent: string;
23629
- total_received: string;
23630
- total_fees_sent: string;
23694
+ total_sent?: string;
23695
+ total_received?: string;
23696
+ total_fees_sent?: string;
23631
23697
  total_miner_rewards_received: string;
23632
23698
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
23633
23699
  lock_tx_id: string;
@@ -31518,6 +31584,159 @@ export interface operations {
31518
31584
  };
31519
31585
  };
31520
31586
  };
31587
+ get_principal_stx_balance: {
31588
+ parameters: {
31589
+ query?: {
31590
+ /** @description Include pending mempool transactions in the balance calculation */
31591
+ include_mempool?: boolean;
31592
+ };
31593
+ header?: never;
31594
+ path: {
31595
+ principal: string;
31596
+ };
31597
+ cookie?: never;
31598
+ };
31599
+ requestBody?: never;
31600
+ responses: {
31601
+ /** @description Default Response */
31602
+ 200: {
31603
+ headers: {
31604
+ [name: string]: unknown;
31605
+ };
31606
+ content: {
31607
+ "application/json": {
31608
+ balance: string;
31609
+ /** @description Total STX balance considering pending mempool transactions */
31610
+ estimated_balance?: string;
31611
+ /** @description Inbound STX balance from pending mempool transactions */
31612
+ pending_balance_inbound?: string;
31613
+ /** @description Outbound STX balance from pending mempool transactions */
31614
+ pending_balance_outbound?: string;
31615
+ total_sent?: string;
31616
+ total_received?: string;
31617
+ total_fees_sent?: string;
31618
+ total_miner_rewards_received: string;
31619
+ /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
31620
+ lock_tx_id: string;
31621
+ /** @description The amount of locked STX, as string quoted micro-STX. Zero if no tokens are locked. */
31622
+ locked: string;
31623
+ /** @description The STX chain block height of when the lock event occurred. Zero if no tokens are locked. */
31624
+ lock_height: number;
31625
+ /** @description The burnchain block height of when the lock event occurred. Zero if no tokens are locked. */
31626
+ burnchain_lock_height: number;
31627
+ /** @description The burnchain block height of when the tokens unlock. Zero if no tokens are locked. */
31628
+ burnchain_unlock_height: number;
31629
+ };
31630
+ };
31631
+ };
31632
+ /** @description Default Response */
31633
+ "4XX": {
31634
+ headers: {
31635
+ [name: string]: unknown;
31636
+ };
31637
+ content: {
31638
+ "application/json": {
31639
+ error: string;
31640
+ message?: string;
31641
+ } & {
31642
+ [key: string]: unknown;
31643
+ };
31644
+ };
31645
+ };
31646
+ };
31647
+ };
31648
+ get_principal_ft_balances: {
31649
+ parameters: {
31650
+ query?: {
31651
+ /** @description Results per page */
31652
+ limit?: number;
31653
+ /** @description Result offset */
31654
+ offset?: number;
31655
+ };
31656
+ header?: never;
31657
+ path: {
31658
+ principal: string;
31659
+ };
31660
+ cookie?: never;
31661
+ };
31662
+ requestBody?: never;
31663
+ responses: {
31664
+ /** @description Default Response */
31665
+ 200: {
31666
+ headers: {
31667
+ [name: string]: unknown;
31668
+ };
31669
+ content: {
31670
+ "application/json": {
31671
+ /** @example 20 */
31672
+ limit: number;
31673
+ /** @example 0 */
31674
+ offset: number;
31675
+ /** @example 1 */
31676
+ total: number;
31677
+ results: {
31678
+ token: string;
31679
+ balance: string;
31680
+ }[];
31681
+ };
31682
+ };
31683
+ };
31684
+ /** @description Default Response */
31685
+ "4XX": {
31686
+ headers: {
31687
+ [name: string]: unknown;
31688
+ };
31689
+ content: {
31690
+ "application/json": {
31691
+ error: string;
31692
+ message?: string;
31693
+ } & {
31694
+ [key: string]: unknown;
31695
+ };
31696
+ };
31697
+ };
31698
+ };
31699
+ };
31700
+ get_principal_ft_balance: {
31701
+ parameters: {
31702
+ query?: never;
31703
+ header?: never;
31704
+ path: {
31705
+ principal: string;
31706
+ /** @description fungible token identifier */
31707
+ token: string;
31708
+ };
31709
+ cookie?: never;
31710
+ };
31711
+ requestBody?: never;
31712
+ responses: {
31713
+ /** @description Default Response */
31714
+ 200: {
31715
+ headers: {
31716
+ [name: string]: unknown;
31717
+ };
31718
+ content: {
31719
+ "application/json": {
31720
+ balance: string;
31721
+ };
31722
+ };
31723
+ };
31724
+ /** @description Default Response */
31725
+ "4XX": {
31726
+ headers: {
31727
+ [name: string]: unknown;
31728
+ };
31729
+ content: {
31730
+ "application/json": {
31731
+ error: string;
31732
+ message?: string;
31733
+ } & {
31734
+ [key: string]: unknown;
31735
+ };
31736
+ };
31737
+ };
31738
+ };
31739
+ };
31521
31740
  get_historical_zone_file: {
31522
31741
  parameters: {
31523
31742
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacks/blockchain-api-client",
3
- "version": "8.7.0",
3
+ "version": "8.8.0-beta.2",
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,66 @@ 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
+ };
1620
+ "/extended/v2/addresses/{principal}/balances/ft/{token}": {
1621
+ parameters: {
1622
+ query?: never;
1623
+ header?: never;
1624
+ path?: never;
1625
+ cookie?: never;
1626
+ };
1627
+ /**
1628
+ * Get principal FT balance
1629
+ * @description Retrieves a specific fungible-token balance for a given principal.
1630
+ */
1631
+ get: operations["get_principal_ft_balance"];
1632
+ put?: never;
1633
+ post?: never;
1634
+ delete?: never;
1635
+ options?: never;
1636
+ head?: never;
1637
+ patch?: never;
1638
+ trace?: never;
1639
+ };
1574
1640
  "/v1/names/{name}/zonefile/{zoneFileHash}": {
1575
1641
  parameters: {
1576
1642
  query?: never;
@@ -18395,9 +18461,9 @@ export interface operations {
18395
18461
  pending_balance_inbound?: string;
18396
18462
  /** @description Outbound STX balance from pending mempool transactions */
18397
18463
  pending_balance_outbound?: string;
18398
- total_sent: string;
18399
- total_received: string;
18400
- total_fees_sent: string;
18464
+ total_sent?: string;
18465
+ total_received?: string;
18466
+ total_fees_sent?: string;
18401
18467
  total_miner_rewards_received: string;
18402
18468
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
18403
18469
  lock_tx_id: string;
@@ -18479,9 +18545,9 @@ export interface operations {
18479
18545
  pending_balance_inbound?: string;
18480
18546
  /** @description Outbound STX balance from pending mempool transactions */
18481
18547
  pending_balance_outbound?: string;
18482
- total_sent: string;
18483
- total_received: string;
18484
- total_fees_sent: string;
18548
+ total_sent?: string;
18549
+ total_received?: string;
18550
+ total_fees_sent?: string;
18485
18551
  total_miner_rewards_received: string;
18486
18552
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
18487
18553
  lock_tx_id: string;
@@ -23625,9 +23691,9 @@ export interface operations {
23625
23691
  pending_balance_inbound?: string;
23626
23692
  /** @description Outbound STX balance from pending mempool transactions */
23627
23693
  pending_balance_outbound?: string;
23628
- total_sent: string;
23629
- total_received: string;
23630
- total_fees_sent: string;
23694
+ total_sent?: string;
23695
+ total_received?: string;
23696
+ total_fees_sent?: string;
23631
23697
  total_miner_rewards_received: string;
23632
23698
  /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
23633
23699
  lock_tx_id: string;
@@ -31518,6 +31584,159 @@ export interface operations {
31518
31584
  };
31519
31585
  };
31520
31586
  };
31587
+ get_principal_stx_balance: {
31588
+ parameters: {
31589
+ query?: {
31590
+ /** @description Include pending mempool transactions in the balance calculation */
31591
+ include_mempool?: boolean;
31592
+ };
31593
+ header?: never;
31594
+ path: {
31595
+ principal: string;
31596
+ };
31597
+ cookie?: never;
31598
+ };
31599
+ requestBody?: never;
31600
+ responses: {
31601
+ /** @description Default Response */
31602
+ 200: {
31603
+ headers: {
31604
+ [name: string]: unknown;
31605
+ };
31606
+ content: {
31607
+ "application/json": {
31608
+ balance: string;
31609
+ /** @description Total STX balance considering pending mempool transactions */
31610
+ estimated_balance?: string;
31611
+ /** @description Inbound STX balance from pending mempool transactions */
31612
+ pending_balance_inbound?: string;
31613
+ /** @description Outbound STX balance from pending mempool transactions */
31614
+ pending_balance_outbound?: string;
31615
+ total_sent?: string;
31616
+ total_received?: string;
31617
+ total_fees_sent?: string;
31618
+ total_miner_rewards_received: string;
31619
+ /** @description The transaction where the lock event occurred. Empty if no tokens are locked. */
31620
+ lock_tx_id: string;
31621
+ /** @description The amount of locked STX, as string quoted micro-STX. Zero if no tokens are locked. */
31622
+ locked: string;
31623
+ /** @description The STX chain block height of when the lock event occurred. Zero if no tokens are locked. */
31624
+ lock_height: number;
31625
+ /** @description The burnchain block height of when the lock event occurred. Zero if no tokens are locked. */
31626
+ burnchain_lock_height: number;
31627
+ /** @description The burnchain block height of when the tokens unlock. Zero if no tokens are locked. */
31628
+ burnchain_unlock_height: number;
31629
+ };
31630
+ };
31631
+ };
31632
+ /** @description Default Response */
31633
+ "4XX": {
31634
+ headers: {
31635
+ [name: string]: unknown;
31636
+ };
31637
+ content: {
31638
+ "application/json": {
31639
+ error: string;
31640
+ message?: string;
31641
+ } & {
31642
+ [key: string]: unknown;
31643
+ };
31644
+ };
31645
+ };
31646
+ };
31647
+ };
31648
+ get_principal_ft_balances: {
31649
+ parameters: {
31650
+ query?: {
31651
+ /** @description Results per page */
31652
+ limit?: number;
31653
+ /** @description Result offset */
31654
+ offset?: number;
31655
+ };
31656
+ header?: never;
31657
+ path: {
31658
+ principal: string;
31659
+ };
31660
+ cookie?: never;
31661
+ };
31662
+ requestBody?: never;
31663
+ responses: {
31664
+ /** @description Default Response */
31665
+ 200: {
31666
+ headers: {
31667
+ [name: string]: unknown;
31668
+ };
31669
+ content: {
31670
+ "application/json": {
31671
+ /** @example 20 */
31672
+ limit: number;
31673
+ /** @example 0 */
31674
+ offset: number;
31675
+ /** @example 1 */
31676
+ total: number;
31677
+ results: {
31678
+ token: string;
31679
+ balance: string;
31680
+ }[];
31681
+ };
31682
+ };
31683
+ };
31684
+ /** @description Default Response */
31685
+ "4XX": {
31686
+ headers: {
31687
+ [name: string]: unknown;
31688
+ };
31689
+ content: {
31690
+ "application/json": {
31691
+ error: string;
31692
+ message?: string;
31693
+ } & {
31694
+ [key: string]: unknown;
31695
+ };
31696
+ };
31697
+ };
31698
+ };
31699
+ };
31700
+ get_principal_ft_balance: {
31701
+ parameters: {
31702
+ query?: never;
31703
+ header?: never;
31704
+ path: {
31705
+ principal: string;
31706
+ /** @description fungible token identifier */
31707
+ token: string;
31708
+ };
31709
+ cookie?: never;
31710
+ };
31711
+ requestBody?: never;
31712
+ responses: {
31713
+ /** @description Default Response */
31714
+ 200: {
31715
+ headers: {
31716
+ [name: string]: unknown;
31717
+ };
31718
+ content: {
31719
+ "application/json": {
31720
+ balance: string;
31721
+ };
31722
+ };
31723
+ };
31724
+ /** @description Default Response */
31725
+ "4XX": {
31726
+ headers: {
31727
+ [name: string]: unknown;
31728
+ };
31729
+ content: {
31730
+ "application/json": {
31731
+ error: string;
31732
+ message?: string;
31733
+ } & {
31734
+ [key: string]: unknown;
31735
+ };
31736
+ };
31737
+ };
31738
+ };
31739
+ };
31521
31740
  get_historical_zone_file: {
31522
31741
  parameters: {
31523
31742
  query?: {