@stacks/blockchain-api-client 7.1.1 → 7.2.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.
Files changed (42) hide show
  1. package/README.md +4 -4
  2. package/lib/generated/apis/FaucetsApi.d.ts +4 -4
  3. package/lib/generated/apis/FaucetsApi.js +2 -2
  4. package/lib/generated/apis/FaucetsApi.js.map +1 -1
  5. package/lib/generated/apis/FungibleTokensApi.d.ts +8 -8
  6. package/lib/generated/apis/FungibleTokensApi.js +4 -4
  7. package/lib/generated/apis/NonFungibleTokensApi.d.ts +8 -8
  8. package/lib/generated/apis/NonFungibleTokensApi.js +4 -4
  9. package/lib/generated/apis/StackingApi.d.ts +61 -0
  10. package/lib/generated/apis/StackingApi.js +63 -0
  11. package/lib/generated/apis/StackingApi.js.map +1 -0
  12. package/lib/generated/apis/index.d.ts +1 -0
  13. package/lib/generated/apis/index.js +1 -0
  14. package/lib/generated/apis/index.js.map +1 -1
  15. package/lib/generated/models/InlineResponse403.d.ts +33 -0
  16. package/lib/generated/models/InlineResponse403.js +45 -0
  17. package/lib/generated/models/InlineResponse403.js.map +1 -0
  18. package/lib/generated/models/PoolDelegation.d.ts +57 -0
  19. package/lib/generated/models/PoolDelegation.js +53 -0
  20. package/lib/generated/models/PoolDelegation.js.map +1 -0
  21. package/lib/generated/models/PoolDelegationsResponse.d.ts +46 -0
  22. package/lib/generated/models/PoolDelegationsResponse.js +49 -0
  23. package/lib/generated/models/PoolDelegationsResponse.js.map +1 -0
  24. package/lib/generated/models/index.d.ts +3 -0
  25. package/lib/generated/models/index.js +3 -0
  26. package/lib/generated/models/index.js.map +1 -1
  27. package/lib/generated/runtime.js +1 -1
  28. package/lib/generated/runtime.js.map +1 -1
  29. package/lib/index.umd.js +1271 -766
  30. package/lib/index.umd.js.map +1 -1
  31. package/package.json +6 -6
  32. package/src/generated/.openapi-generator/FILES +4 -0
  33. package/src/generated/apis/FaucetsApi.ts +7 -4
  34. package/src/generated/apis/FungibleTokensApi.ts +8 -8
  35. package/src/generated/apis/NonFungibleTokensApi.ts +8 -8
  36. package/src/generated/apis/StackingApi.ts +113 -0
  37. package/src/generated/apis/index.ts +1 -0
  38. package/src/generated/models/InlineResponse403.ts +64 -0
  39. package/src/generated/models/PoolDelegation.ts +96 -0
  40. package/src/generated/models/PoolDelegationsResponse.ts +87 -0
  41. package/src/generated/models/index.ts +3 -0
  42. package/src/generated/runtime.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacks/blockchain-api-client",
3
- "version": "7.1.1",
3
+ "version": "7.2.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",
@@ -25,7 +25,7 @@
25
25
  "start": "concurrently npm:build:browser:watch npm:open",
26
26
  "test": "ts-node test/test.ts",
27
27
  "lint": "eslint . --ext .ts -f codeframe",
28
- "lint:prettier": "prettier --check ./src/**/*.{ts}",
28
+ "lint:prettier": "prettier --check ./src/**/*.ts",
29
29
  "open": "http-server -o 9222 -o index.html",
30
30
  "prep-openapi": "rimraf ./.tmp && rimraf ./src/generated && swagger-cli bundle --dereference -o ./.tmp/openapi-temp.json ../docs/openapi.yaml && shx sed -i '^.*\\$schema.*$' '' ./.tmp/openapi-temp.json > ./.tmp/openapi.json",
31
31
  "generate-openapi": "npm run prep-openapi && openapi-generator-cli generate --skip-validate-spec -g typescript-fetch --additional-properties=withInterfaces=true,typescriptThreePlus=true,supportsES6=true,legacyDiscriminatorBehavior=false,enumPropertyNaming=original,modelPropertyNaming=original -i ./.tmp/openapi.json -o ./src/generated > ./.tmp/gen.log",
@@ -43,7 +43,7 @@
43
43
  "cross-fetch": "3.1.5",
44
44
  "eventemitter3": "4.0.7",
45
45
  "jsonrpc-lite": "2.2.0",
46
- "socket.io-client": "4.4.1",
46
+ "socket.io-client": "4.6.1",
47
47
  "ws": "7.5.6"
48
48
  },
49
49
  "devDependencies": {
@@ -53,14 +53,14 @@
53
53
  "@stacks/prettier-config": "0.0.7",
54
54
  "@typescript-eslint/eslint-plugin": "4.33.0",
55
55
  "@typescript-eslint/parser": "4.33.0",
56
- "concurrently": "6.5.1",
56
+ "concurrently": "7.6.0",
57
57
  "eslint": "7.32.0",
58
58
  "eslint-config-prettier": "8.3.0",
59
59
  "eslint-plugin-prettier": "3.4.1",
60
60
  "http-server": "14.0.0",
61
61
  "microbundle": "0.13.3",
62
- "prettier": "2.5.1",
63
- "rimraf": "3.0.2",
62
+ "prettier": "2.8.6",
63
+ "rimraf": "5.0.0",
64
64
  "shx": "0.3.3",
65
65
  "ts-node": "9.1.1",
66
66
  "typedoc": "0.23.10",
@@ -11,6 +11,7 @@ apis/NonFungibleTokensApi.ts
11
11
  apis/RosettaApi.ts
12
12
  apis/SearchApi.ts
13
13
  apis/SmartContractsApi.ts
14
+ apis/StackingApi.ts
14
15
  apis/StackingRewardsApi.ts
15
16
  apis/TransactionsApi.ts
16
17
  apis/index.ts
@@ -60,6 +61,7 @@ models/GetStxSupplyResponse.ts
60
61
  models/InboundStxTransfer.ts
61
62
  models/InlineObject.ts
62
63
  models/InlineObject1.ts
64
+ models/InlineResponse403.ts
63
65
  models/MapEntryResponse.ts
64
66
  models/MempoolTransactionListResponse.ts
65
67
  models/MempoolTransactionStatsResponse.ts
@@ -80,6 +82,8 @@ models/NonFungibleTokenMetadata.ts
80
82
  models/NonFungibleTokenMintList.ts
81
83
  models/NonFungibleTokensMetadataList.ts
82
84
  models/OtherTransactionIdentifier.ts
85
+ models/PoolDelegation.ts
86
+ models/PoolDelegationsResponse.ts
83
87
  models/PostCoreNodeTransactionsError.ts
84
88
  models/ReadOnlyFunctionArgs.ts
85
89
  models/ReadOnlyFunctionSuccessResponse.ts
@@ -21,6 +21,9 @@ import {
21
21
  InlineObject1,
22
22
  InlineObject1FromJSON,
23
23
  InlineObject1ToJSON,
24
+ InlineResponse403,
25
+ InlineResponse403FromJSON,
26
+ InlineResponse403ToJSON,
24
27
  RunFaucetResponse,
25
28
  RunFaucetResponseFromJSON,
26
29
  RunFaucetResponseToJSON,
@@ -62,7 +65,7 @@ export interface FaucetsApiInterface {
62
65
  runFaucetBtc(requestParameters: RunFaucetBtcRequest, initOverrides?: RequestInit): Promise<RunFaucetResponse>;
63
66
 
64
67
  /**
65
- * Add 500 STX tokens to the specified testnet address. Testnet STX addresses begin with `ST`. If the `stacking` parameter is set to `true`, the faucet will add the required number of tokens for individual stacking to the specified testnet address. The endpoint returns the transaction ID, which you can use to view the transaction in the [Stacks Explorer](https://explorer.stacks.co/?chain=testnet). The tokens are delivered once the transaction has been included in an anchor block. A common reason for failed faucet transactions is that the faucet has run out of tokens. If you are experiencing failed faucet transactions to a testnet address, you can get help in [Discord](https://stacks.chat). **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
68
+ * Add 500 STX tokens to the specified testnet address. Testnet STX addresses begin with `ST`. If the `stacking` parameter is set to `true`, the faucet will add the required number of tokens for individual stacking to the specified testnet address. The endpoint returns the transaction ID, which you can use to view the transaction in the [Stacks Explorer](https://explorer.hiro.so/?chain=testnet). The tokens are delivered once the transaction has been included in an anchor block. A common reason for failed faucet transactions is that the faucet has run out of tokens. If you are experiencing failed faucet transactions to a testnet address, you can get help in [Discord](https://stacks.chat). **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
66
69
  * @summary Get STX testnet tokens
67
70
  * @param {string} address A valid testnet STX address
68
71
  * @param {boolean} [stacking] Request the amount of STX tokens needed for individual address stacking
@@ -74,7 +77,7 @@ export interface FaucetsApiInterface {
74
77
  runFaucetStxRaw(requestParameters: RunFaucetStxRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RunFaucetResponse>>;
75
78
 
76
79
  /**
77
- * Add 500 STX tokens to the specified testnet address. Testnet STX addresses begin with `ST`. If the `stacking` parameter is set to `true`, the faucet will add the required number of tokens for individual stacking to the specified testnet address. The endpoint returns the transaction ID, which you can use to view the transaction in the [Stacks Explorer](https://explorer.stacks.co/?chain=testnet). The tokens are delivered once the transaction has been included in an anchor block. A common reason for failed faucet transactions is that the faucet has run out of tokens. If you are experiencing failed faucet transactions to a testnet address, you can get help in [Discord](https://stacks.chat). **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
80
+ * Add 500 STX tokens to the specified testnet address. Testnet STX addresses begin with `ST`. If the `stacking` parameter is set to `true`, the faucet will add the required number of tokens for individual stacking to the specified testnet address. The endpoint returns the transaction ID, which you can use to view the transaction in the [Stacks Explorer](https://explorer.hiro.so/?chain=testnet). The tokens are delivered once the transaction has been included in an anchor block. A common reason for failed faucet transactions is that the faucet has run out of tokens. If you are experiencing failed faucet transactions to a testnet address, you can get help in [Discord](https://stacks.chat). **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
78
81
  * Get STX testnet tokens
79
82
  */
80
83
  runFaucetStx(requestParameters: RunFaucetStxRequest, initOverrides?: RequestInit): Promise<RunFaucetResponse>;
@@ -126,7 +129,7 @@ export class FaucetsApi extends runtime.BaseAPI implements FaucetsApiInterface {
126
129
  }
127
130
 
128
131
  /**
129
- * Add 500 STX tokens to the specified testnet address. Testnet STX addresses begin with `ST`. If the `stacking` parameter is set to `true`, the faucet will add the required number of tokens for individual stacking to the specified testnet address. The endpoint returns the transaction ID, which you can use to view the transaction in the [Stacks Explorer](https://explorer.stacks.co/?chain=testnet). The tokens are delivered once the transaction has been included in an anchor block. A common reason for failed faucet transactions is that the faucet has run out of tokens. If you are experiencing failed faucet transactions to a testnet address, you can get help in [Discord](https://stacks.chat). **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
132
+ * Add 500 STX tokens to the specified testnet address. Testnet STX addresses begin with `ST`. If the `stacking` parameter is set to `true`, the faucet will add the required number of tokens for individual stacking to the specified testnet address. The endpoint returns the transaction ID, which you can use to view the transaction in the [Stacks Explorer](https://explorer.hiro.so/?chain=testnet). The tokens are delivered once the transaction has been included in an anchor block. A common reason for failed faucet transactions is that the faucet has run out of tokens. If you are experiencing failed faucet transactions to a testnet address, you can get help in [Discord](https://stacks.chat). **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
130
133
  * Get STX testnet tokens
131
134
  */
132
135
  async runFaucetStxRaw(requestParameters: RunFaucetStxRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RunFaucetResponse>> {
@@ -160,7 +163,7 @@ export class FaucetsApi extends runtime.BaseAPI implements FaucetsApiInterface {
160
163
  }
161
164
 
162
165
  /**
163
- * Add 500 STX tokens to the specified testnet address. Testnet STX addresses begin with `ST`. If the `stacking` parameter is set to `true`, the faucet will add the required number of tokens for individual stacking to the specified testnet address. The endpoint returns the transaction ID, which you can use to view the transaction in the [Stacks Explorer](https://explorer.stacks.co/?chain=testnet). The tokens are delivered once the transaction has been included in an anchor block. A common reason for failed faucet transactions is that the faucet has run out of tokens. If you are experiencing failed faucet transactions to a testnet address, you can get help in [Discord](https://stacks.chat). **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
166
+ * Add 500 STX tokens to the specified testnet address. Testnet STX addresses begin with `ST`. If the `stacking` parameter is set to `true`, the faucet will add the required number of tokens for individual stacking to the specified testnet address. The endpoint returns the transaction ID, which you can use to view the transaction in the [Stacks Explorer](https://explorer.hiro.so/?chain=testnet). The tokens are delivered once the transaction has been included in an anchor block. A common reason for failed faucet transactions is that the faucet has run out of tokens. If you are experiencing failed faucet transactions to a testnet address, you can get help in [Discord](https://stacks.chat). **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
164
167
  * Get STX testnet tokens
165
168
  */
166
169
  async runFaucetStx(requestParameters: RunFaucetStxRequest, initOverrides?: RequestInit): Promise<RunFaucetResponse> {
@@ -40,7 +40,7 @@ export interface GetFtMetadataListRequest {
40
40
  */
41
41
  export interface FungibleTokensApiInterface {
42
42
  /**
43
- * Retrieves the metadata for fungible tokens for a given contract id
43
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves the metadata for fungible tokens for a given contract id
44
44
  * @summary Fungible tokens metadata for contract id
45
45
  * @param {string} contractId token\&#39;s contract id
46
46
  * @param {*} [options] Override http request option.
@@ -50,13 +50,13 @@ export interface FungibleTokensApiInterface {
50
50
  getContractFtMetadataRaw(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FungibleTokenMetadata>>;
51
51
 
52
52
  /**
53
- * Retrieves the metadata for fungible tokens for a given contract id
53
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves the metadata for fungible tokens for a given contract id
54
54
  * Fungible tokens metadata for contract id
55
55
  */
56
56
  getContractFtMetadata(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise<FungibleTokenMetadata>;
57
57
 
58
58
  /**
59
- * Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
59
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
60
60
  * @summary Fungible tokens metadata list
61
61
  * @param {number} [limit] max number of tokens to fetch.
62
62
  * @param {number} [offset] index of first tokens to fetch
@@ -67,7 +67,7 @@ export interface FungibleTokensApiInterface {
67
67
  getFtMetadataListRaw(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FungibleTokensMetadataList>>;
68
68
 
69
69
  /**
70
- * Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
70
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
71
71
  * Fungible tokens metadata list
72
72
  */
73
73
  getFtMetadataList(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise<FungibleTokensMetadataList>;
@@ -80,7 +80,7 @@ export interface FungibleTokensApiInterface {
80
80
  export class FungibleTokensApi extends runtime.BaseAPI implements FungibleTokensApiInterface {
81
81
 
82
82
  /**
83
- * Retrieves the metadata for fungible tokens for a given contract id
83
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves the metadata for fungible tokens for a given contract id
84
84
  * Fungible tokens metadata for contract id
85
85
  */
86
86
  async getContractFtMetadataRaw(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FungibleTokenMetadata>> {
@@ -103,7 +103,7 @@ export class FungibleTokensApi extends runtime.BaseAPI implements FungibleTokens
103
103
  }
104
104
 
105
105
  /**
106
- * Retrieves the metadata for fungible tokens for a given contract id
106
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves the metadata for fungible tokens for a given contract id
107
107
  * Fungible tokens metadata for contract id
108
108
  */
109
109
  async getContractFtMetadata(requestParameters: GetContractFtMetadataRequest, initOverrides?: RequestInit): Promise<FungibleTokenMetadata> {
@@ -112,7 +112,7 @@ export class FungibleTokensApi extends runtime.BaseAPI implements FungibleTokens
112
112
  }
113
113
 
114
114
  /**
115
- * Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
115
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
116
116
  * Fungible tokens metadata list
117
117
  */
118
118
  async getFtMetadataListRaw(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FungibleTokensMetadataList>> {
@@ -139,7 +139,7 @@ export class FungibleTokensApi extends runtime.BaseAPI implements FungibleTokens
139
139
  }
140
140
 
141
141
  /**
142
- * Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
142
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves list of fungible tokens with their metadata. More information on Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#fungible-tokens).
143
143
  * Fungible tokens metadata list
144
144
  */
145
145
  async getFtMetadataList(requestParameters: GetFtMetadataListRequest, initOverrides?: RequestInit): Promise<FungibleTokensMetadataList> {
@@ -75,7 +75,7 @@ export interface GetNftMintsRequest {
75
75
  */
76
76
  export interface NonFungibleTokensApiInterface {
77
77
  /**
78
- * Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
78
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
79
79
  * @summary Non fungible tokens metadata for contract ID
80
80
  * @param {string} contractId token\&#39;s contract id
81
81
  * @param {*} [options] Override http request option.
@@ -85,7 +85,7 @@ export interface NonFungibleTokensApiInterface {
85
85
  getContractNftMetadataRaw(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokenMetadata>>;
86
86
 
87
87
  /**
88
- * Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
88
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
89
89
  * Non fungible tokens metadata for contract ID
90
90
  */
91
91
  getContractNftMetadata(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenMetadata>;
@@ -133,7 +133,7 @@ export interface NonFungibleTokensApiInterface {
133
133
  getNftHoldings(requestParameters: GetNftHoldingsRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenHoldingsList>;
134
134
 
135
135
  /**
136
- * Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
136
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
137
137
  * @summary Non fungible tokens metadata list
138
138
  * @param {number} [limit] max number of tokens to fetch
139
139
  * @param {number} [offset] index of first tokens to fetch
@@ -144,7 +144,7 @@ export interface NonFungibleTokensApiInterface {
144
144
  getNftMetadataListRaw(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokensMetadataList>>;
145
145
 
146
146
  /**
147
- * Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
147
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
148
148
  * Non fungible tokens metadata list
149
149
  */
150
150
  getNftMetadataList(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise<NonFungibleTokensMetadataList>;
@@ -177,7 +177,7 @@ export interface NonFungibleTokensApiInterface {
177
177
  export class NonFungibleTokensApi extends runtime.BaseAPI implements NonFungibleTokensApiInterface {
178
178
 
179
179
  /**
180
- * Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
180
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
181
181
  * Non fungible tokens metadata for contract ID
182
182
  */
183
183
  async getContractNftMetadataRaw(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokenMetadata>> {
@@ -200,7 +200,7 @@ export class NonFungibleTokensApi extends runtime.BaseAPI implements NonFungible
200
200
  }
201
201
 
202
202
  /**
203
- * Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
203
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
204
204
  * Non fungible tokens metadata for contract ID
205
205
  */
206
206
  async getContractNftMetadata(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenMetadata> {
@@ -325,7 +325,7 @@ export class NonFungibleTokensApi extends runtime.BaseAPI implements NonFungible
325
325
  }
326
326
 
327
327
  /**
328
- * Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
328
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
329
329
  * Non fungible tokens metadata list
330
330
  */
331
331
  async getNftMetadataListRaw(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokensMetadataList>> {
@@ -352,7 +352,7 @@ export class NonFungibleTokensApi extends runtime.BaseAPI implements NonFungible
352
352
  }
353
353
 
354
354
  /**
355
- * Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
355
+ * **NOTE:** This endpoint is deprecated in favor of the [Token Metadata Service](https://github.com/hirosystems/token-metadata-service). Retrieves a list of non fungible tokens with their metadata. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
356
356
  * Non fungible tokens metadata list
357
357
  */
358
358
  async getNftMetadataList(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise<NonFungibleTokensMetadataList> {
@@ -0,0 +1,113 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Stacks Blockchain API
5
+ * Welcome to the API reference overview for the <a href=\"https://docs.hiro.so/get-started/stacks-blockchain-api\">Stacks Blockchain API</a>. <a href=\"https://hirosystems.github.io/stacks-blockchain-api/collection.json\" download=\"stacks-api-collection.json\">Download Postman collection</a>
6
+ *
7
+ * The version of the OpenAPI document: STACKS_API_VERSION
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import {
18
+ PoolDelegationsResponse,
19
+ PoolDelegationsResponseFromJSON,
20
+ PoolDelegationsResponseToJSON,
21
+ } from '../models';
22
+
23
+ export interface GetPoolDelegationsRequest {
24
+ poolPrincipal: string;
25
+ afterBlock?: number;
26
+ unanchored?: boolean;
27
+ limit?: number;
28
+ offset?: number;
29
+ }
30
+
31
+ /**
32
+ * StackingApi - interface
33
+ *
34
+ * @export
35
+ * @interface StackingApiInterface
36
+ */
37
+ export interface StackingApiInterface {
38
+ /**
39
+ * Retrieves the list of stacking pool members for a given delegator principal.
40
+ * @summary Stacking pool members
41
+ * @param {string} poolPrincipal Address principal of the stacking pool delegator
42
+ * @param {number} [afterBlock] If specified, only delegation events after the given block will be included
43
+ * @param {boolean} [unanchored] whether or not to include Stackers from unconfirmed transactions
44
+ * @param {number} [limit] number of items to return
45
+ * @param {number} [offset] number of items to skip
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ * @memberof StackingApiInterface
49
+ */
50
+ getPoolDelegationsRaw(requestParameters: GetPoolDelegationsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<PoolDelegationsResponse>>;
51
+
52
+ /**
53
+ * Retrieves the list of stacking pool members for a given delegator principal.
54
+ * Stacking pool members
55
+ */
56
+ getPoolDelegations(requestParameters: GetPoolDelegationsRequest, initOverrides?: RequestInit): Promise<PoolDelegationsResponse>;
57
+
58
+ }
59
+
60
+ /**
61
+ *
62
+ */
63
+ export class StackingApi extends runtime.BaseAPI implements StackingApiInterface {
64
+
65
+ /**
66
+ * Retrieves the list of stacking pool members for a given delegator principal.
67
+ * Stacking pool members
68
+ */
69
+ async getPoolDelegationsRaw(requestParameters: GetPoolDelegationsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<PoolDelegationsResponse>> {
70
+ if (requestParameters.poolPrincipal === null || requestParameters.poolPrincipal === undefined) {
71
+ throw new runtime.RequiredError('poolPrincipal','Required parameter requestParameters.poolPrincipal was null or undefined when calling getPoolDelegations.');
72
+ }
73
+
74
+ const queryParameters: any = {};
75
+
76
+ if (requestParameters.afterBlock !== undefined) {
77
+ queryParameters['after_block'] = requestParameters.afterBlock;
78
+ }
79
+
80
+ if (requestParameters.unanchored !== undefined) {
81
+ queryParameters['unanchored'] = requestParameters.unanchored;
82
+ }
83
+
84
+ if (requestParameters.limit !== undefined) {
85
+ queryParameters['limit'] = requestParameters.limit;
86
+ }
87
+
88
+ if (requestParameters.offset !== undefined) {
89
+ queryParameters['offset'] = requestParameters.offset;
90
+ }
91
+
92
+ const headerParameters: runtime.HTTPHeaders = {};
93
+
94
+ const response = await this.request({
95
+ path: `/extended/beta/stacking/{pool_principal}/delegations`.replace(`{${"pool_principal"}}`, encodeURIComponent(String(requestParameters.poolPrincipal))),
96
+ method: 'GET',
97
+ headers: headerParameters,
98
+ query: queryParameters,
99
+ }, initOverrides);
100
+
101
+ return new runtime.JSONApiResponse(response, (jsonValue) => PoolDelegationsResponseFromJSON(jsonValue));
102
+ }
103
+
104
+ /**
105
+ * Retrieves the list of stacking pool members for a given delegator principal.
106
+ * Stacking pool members
107
+ */
108
+ async getPoolDelegations(requestParameters: GetPoolDelegationsRequest, initOverrides?: RequestInit): Promise<PoolDelegationsResponse> {
109
+ const response = await this.getPoolDelegationsRaw(requestParameters, initOverrides);
110
+ return await response.value();
111
+ }
112
+
113
+ }
@@ -12,5 +12,6 @@ export * from './NonFungibleTokensApi';
12
12
  export * from './RosettaApi';
13
13
  export * from './SearchApi';
14
14
  export * from './SmartContractsApi';
15
+ export * from './StackingApi';
15
16
  export * from './StackingRewardsApi';
16
17
  export * from './TransactionsApi';
@@ -0,0 +1,64 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Stacks Blockchain API
5
+ * Welcome to the API reference overview for the <a href=\"https://docs.hiro.so/get-started/stacks-blockchain-api\">Stacks Blockchain API</a>. <a href=\"https://hirosystems.github.io/stacks-blockchain-api/collection.json\" download=\"stacks-api-collection.json\">Download Postman collection</a>
6
+ *
7
+ * The version of the OpenAPI document: STACKS_API_VERSION
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface InlineResponse403
20
+ */
21
+ export interface InlineResponse403 {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof InlineResponse403
26
+ */
27
+ error?: string;
28
+ /**
29
+ *
30
+ * @type {boolean}
31
+ * @memberof InlineResponse403
32
+ */
33
+ success?: boolean;
34
+ }
35
+
36
+ export function InlineResponse403FromJSON(json: any): InlineResponse403 {
37
+ return InlineResponse403FromJSONTyped(json, false);
38
+ }
39
+
40
+ export function InlineResponse403FromJSONTyped(json: any, ignoreDiscriminator: boolean): InlineResponse403 {
41
+ if ((json === undefined) || (json === null)) {
42
+ return json;
43
+ }
44
+ return {
45
+
46
+ 'error': !exists(json, 'error') ? undefined : json['error'],
47
+ 'success': !exists(json, 'success') ? undefined : json['success'],
48
+ };
49
+ }
50
+
51
+ export function InlineResponse403ToJSON(value?: InlineResponse403 | null): any {
52
+ if (value === undefined) {
53
+ return undefined;
54
+ }
55
+ if (value === null) {
56
+ return null;
57
+ }
58
+ return {
59
+
60
+ 'error': value.error,
61
+ 'success': value.success,
62
+ };
63
+ }
64
+
@@ -0,0 +1,96 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Stacks Blockchain API
5
+ * Welcome to the API reference overview for the <a href=\"https://docs.hiro.so/get-started/stacks-blockchain-api\">Stacks Blockchain API</a>. <a href=\"https://hirosystems.github.io/stacks-blockchain-api/collection.json\" download=\"stacks-api-collection.json\">Download Postman collection</a>
6
+ *
7
+ * The version of the OpenAPI document: STACKS_API_VERSION
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface PoolDelegation
20
+ */
21
+ export interface PoolDelegation {
22
+ /**
23
+ * The principal of the pool member that issued the delegation
24
+ * @type {string}
25
+ * @memberof PoolDelegation
26
+ */
27
+ stacker: string;
28
+ /**
29
+ * The pox-addr value specified by the stacker in the delegation operation
30
+ * @type {string}
31
+ * @memberof PoolDelegation
32
+ */
33
+ pox_addr?: string;
34
+ /**
35
+ * The amount of uSTX delegated by the stacker
36
+ * @type {string}
37
+ * @memberof PoolDelegation
38
+ */
39
+ amount_ustx: string;
40
+ /**
41
+ * The optional burnchain block unlock height that the stacker may have specified
42
+ * @type {number}
43
+ * @memberof PoolDelegation
44
+ */
45
+ burn_block_unlock_height?: number;
46
+ /**
47
+ * The block height at which the stacker delegation transaction was mined at
48
+ * @type {number}
49
+ * @memberof PoolDelegation
50
+ */
51
+ block_height: number;
52
+ /**
53
+ * The tx_id of the stacker delegation operation
54
+ * @type {string}
55
+ * @memberof PoolDelegation
56
+ */
57
+ tx_id: string;
58
+ }
59
+
60
+ export function PoolDelegationFromJSON(json: any): PoolDelegation {
61
+ return PoolDelegationFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function PoolDelegationFromJSONTyped(json: any, ignoreDiscriminator: boolean): PoolDelegation {
65
+ if ((json === undefined) || (json === null)) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'stacker': json['stacker'],
71
+ 'pox_addr': !exists(json, 'pox_addr') ? undefined : json['pox_addr'],
72
+ 'amount_ustx': json['amount_ustx'],
73
+ 'burn_block_unlock_height': !exists(json, 'burn_block_unlock_height') ? undefined : json['burn_block_unlock_height'],
74
+ 'block_height': json['block_height'],
75
+ 'tx_id': json['tx_id'],
76
+ };
77
+ }
78
+
79
+ export function PoolDelegationToJSON(value?: PoolDelegation | null): any {
80
+ if (value === undefined) {
81
+ return undefined;
82
+ }
83
+ if (value === null) {
84
+ return null;
85
+ }
86
+ return {
87
+
88
+ 'stacker': value.stacker,
89
+ 'pox_addr': value.pox_addr,
90
+ 'amount_ustx': value.amount_ustx,
91
+ 'burn_block_unlock_height': value.burn_block_unlock_height,
92
+ 'block_height': value.block_height,
93
+ 'tx_id': value.tx_id,
94
+ };
95
+ }
96
+
@@ -0,0 +1,87 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Stacks Blockchain API
5
+ * Welcome to the API reference overview for the <a href=\"https://docs.hiro.so/get-started/stacks-blockchain-api\">Stacks Blockchain API</a>. <a href=\"https://hirosystems.github.io/stacks-blockchain-api/collection.json\" download=\"stacks-api-collection.json\">Download Postman collection</a>
6
+ *
7
+ * The version of the OpenAPI document: STACKS_API_VERSION
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import {
17
+ PoolDelegation,
18
+ PoolDelegationFromJSON,
19
+ PoolDelegationFromJSONTyped,
20
+ PoolDelegationToJSON,
21
+ } from './';
22
+
23
+ /**
24
+ * GET request that returns stacking pool member details for a given pool (delegator) principal
25
+ * @export
26
+ * @interface PoolDelegationsResponse
27
+ */
28
+ export interface PoolDelegationsResponse {
29
+ /**
30
+ * The number of Stackers to return
31
+ * @type {number}
32
+ * @memberof PoolDelegationsResponse
33
+ */
34
+ limit: number;
35
+ /**
36
+ * The number to Stackers to skip (starting at `0`)
37
+ * @type {number}
38
+ * @memberof PoolDelegationsResponse
39
+ */
40
+ offset: number;
41
+ /**
42
+ * The total number of Stackers
43
+ * @type {number}
44
+ * @memberof PoolDelegationsResponse
45
+ */
46
+ total: number;
47
+ /**
48
+ *
49
+ * @type {Array<PoolDelegation>}
50
+ * @memberof PoolDelegationsResponse
51
+ */
52
+ results: Array<PoolDelegation>;
53
+ }
54
+
55
+ export function PoolDelegationsResponseFromJSON(json: any): PoolDelegationsResponse {
56
+ return PoolDelegationsResponseFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function PoolDelegationsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PoolDelegationsResponse {
60
+ if ((json === undefined) || (json === null)) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'limit': json['limit'],
66
+ 'offset': json['offset'],
67
+ 'total': json['total'],
68
+ 'results': ((json['results'] as Array<any>).map(PoolDelegationFromJSON)),
69
+ };
70
+ }
71
+
72
+ export function PoolDelegationsResponseToJSON(value?: PoolDelegationsResponse | null): any {
73
+ if (value === undefined) {
74
+ return undefined;
75
+ }
76
+ if (value === null) {
77
+ return null;
78
+ }
79
+ return {
80
+
81
+ 'limit': value.limit,
82
+ 'offset': value.offset,
83
+ 'total': value.total,
84
+ 'results': ((value.results as Array<any>).map(PoolDelegationToJSON)),
85
+ };
86
+ }
87
+
@@ -45,6 +45,7 @@ export * from './GetStxSupplyResponse';
45
45
  export * from './InboundStxTransfer';
46
46
  export * from './InlineObject';
47
47
  export * from './InlineObject1';
48
+ export * from './InlineResponse403';
48
49
  export * from './MapEntryResponse';
49
50
  export * from './MempoolTransactionListResponse';
50
51
  export * from './MempoolTransactionStatsResponse';
@@ -65,6 +66,8 @@ export * from './NonFungibleTokenMetadata';
65
66
  export * from './NonFungibleTokenMintList';
66
67
  export * from './NonFungibleTokensMetadataList';
67
68
  export * from './OtherTransactionIdentifier';
69
+ export * from './PoolDelegation';
70
+ export * from './PoolDelegationsResponse';
68
71
  export * from './PostCoreNodeTransactionsError';
69
72
  export * from './ReadOnlyFunctionArgs';
70
73
  export * from './ReadOnlyFunctionSuccessResponse';