@stacks/blockchain-api-client 1.0.5 → 2.1.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 (42) hide show
  1. package/README.md +4 -1
  2. package/lib/generated/apis/AccountsApi.d.ts +4 -4
  3. package/lib/generated/apis/AccountsApi.js +2 -2
  4. package/lib/generated/apis/FaucetsApi.d.ts +24 -20
  5. package/lib/generated/apis/FaucetsApi.js +12 -8
  6. package/lib/generated/apis/FaucetsApi.js.map +1 -1
  7. package/lib/generated/apis/NonFungibleTokensApi.d.ts +110 -1
  8. package/lib/generated/apis/NonFungibleTokensApi.js +132 -0
  9. package/lib/generated/apis/NonFungibleTokensApi.js.map +1 -1
  10. package/lib/generated/models/InlineObject.d.ts +33 -0
  11. package/lib/generated/models/InlineObject.js +45 -0
  12. package/lib/generated/models/InlineObject.js.map +1 -0
  13. package/lib/generated/models/InlineObject1.d.ts +27 -0
  14. package/lib/generated/models/InlineObject1.js +43 -0
  15. package/lib/generated/models/InlineObject1.js.map +1 -0
  16. package/lib/generated/models/NonFungibleTokenHistoryEventList.d.ts +45 -0
  17. package/lib/generated/models/NonFungibleTokenHistoryEventList.js +48 -0
  18. package/lib/generated/models/NonFungibleTokenHistoryEventList.js.map +1 -0
  19. package/lib/generated/models/NonFungibleTokenHoldingsList.d.ts +45 -0
  20. package/lib/generated/models/NonFungibleTokenHoldingsList.js +48 -0
  21. package/lib/generated/models/NonFungibleTokenHoldingsList.js.map +1 -0
  22. package/lib/generated/models/NonFungibleTokenMintList.d.ts +45 -0
  23. package/lib/generated/models/NonFungibleTokenMintList.js +48 -0
  24. package/lib/generated/models/NonFungibleTokenMintList.js.map +1 -0
  25. package/lib/generated/models/RunFaucetResponse.d.ts +1 -1
  26. package/lib/generated/models/index.d.ts +5 -0
  27. package/lib/generated/models/index.js +5 -0
  28. package/lib/generated/models/index.js.map +1 -1
  29. package/lib/index.umd.js +2204 -3317
  30. package/lib/index.umd.js.map +1 -1
  31. package/package.json +2 -2
  32. package/src/generated/.openapi-generator/FILES +5 -0
  33. package/src/generated/apis/AccountsApi.ts +4 -4
  34. package/src/generated/apis/FaucetsApi.ts +35 -19
  35. package/src/generated/apis/NonFungibleTokensApi.ts +265 -0
  36. package/src/generated/models/InlineObject.ts +64 -0
  37. package/src/generated/models/InlineObject1.ts +56 -0
  38. package/src/generated/models/NonFungibleTokenHistoryEventList.ts +80 -0
  39. package/src/generated/models/NonFungibleTokenHoldingsList.ts +80 -0
  40. package/src/generated/models/NonFungibleTokenMintList.ts +80 -0
  41. package/src/generated/models/RunFaucetResponse.ts +1 -1
  42. package/src/generated/models/index.ts +5 -0
package/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # @stacks/blockchain-api-client
2
2
  [![NPM Package](https://img.shields.io/npm/v/@stacks/blockchain-api-client.svg?style=flat-square)](https://www.npmjs.org/package/@stacks/blockchain-api-client)
3
- [![Build Status](https://github.com/hirosystems/stacks-blockchain-api/workflows/stacks-blockchain-api/badge.svg)](https://github.com/hirosystems/stacks-blockchain-api/actions)
4
3
 
5
4
  A JS Client for the Stacks Blockchain API
6
5
 
@@ -12,6 +11,10 @@ This package provides the ability to:
12
11
  - Subscribe to WebSockets or Socket.io for real-time Stacks updates (see [Available Updates](#Available-Updates))
13
12
  - Full type safety for WebSocket and API requests and responses
14
13
 
14
+ ## Documentation
15
+
16
+ The documentation for the client library is published as [github pages](https://hirosystems.github.io/stacks-blockchain-api/client/).
17
+
15
18
  ## Installation
16
19
 
17
20
  You can install this package using NPM:
@@ -150,7 +150,7 @@ export interface AccountsApiInterface {
150
150
  */
151
151
  getAccountInfo(requestParameters: GetAccountInfoRequest, initOverrides?: RequestInit): Promise<AccountDataResponse>;
152
152
  /**
153
- * Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft
153
+ * **NOTE:** This endpoint is deprecated in favor of [Non-Fungible Token holdings](#operation/get_nft_holdings). Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft.
154
154
  * @summary Get nft events
155
155
  * @param {string} principal Stacks address or a Contract identifier (e.g. &#x60;SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0.get-info&#x60;)
156
156
  * @param {number} [limit] number of items to return
@@ -163,7 +163,7 @@ export interface AccountsApiInterface {
163
163
  */
164
164
  getAccountNftRaw(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<AddressNftListResponse>>;
165
165
  /**
166
- * Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft
166
+ * **NOTE:** This endpoint is deprecated in favor of [Non-Fungible Token holdings](#operation/get_nft_holdings). Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft.
167
167
  * Get nft events
168
168
  */
169
169
  getAccountNft(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise<AddressNftListResponse>;
@@ -298,12 +298,12 @@ export declare class AccountsApi extends runtime.BaseAPI implements AccountsApiI
298
298
  */
299
299
  getAccountInfo(requestParameters: GetAccountInfoRequest, initOverrides?: RequestInit): Promise<AccountDataResponse>;
300
300
  /**
301
- * Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft
301
+ * **NOTE:** This endpoint is deprecated in favor of [Non-Fungible Token holdings](#operation/get_nft_holdings). Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft.
302
302
  * Get nft events
303
303
  */
304
304
  getAccountNftRaw(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<AddressNftListResponse>>;
305
305
  /**
306
- * Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft
306
+ * **NOTE:** This endpoint is deprecated in favor of [Non-Fungible Token holdings](#operation/get_nft_holdings). Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft.
307
307
  * Get nft events
308
308
  */
309
309
  getAccountNft(requestParameters: GetAccountNftRequest, initOverrides?: RequestInit): Promise<AddressNftListResponse>;
@@ -164,7 +164,7 @@ class AccountsApi extends runtime.BaseAPI {
164
164
  return await response.value();
165
165
  }
166
166
  /**
167
- * Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft
167
+ * **NOTE:** This endpoint is deprecated in favor of [Non-Fungible Token holdings](#operation/get_nft_holdings). Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft.
168
168
  * Get nft events
169
169
  */
170
170
  async getAccountNftRaw(requestParameters, initOverrides) {
@@ -194,7 +194,7 @@ class AccountsApi extends runtime.BaseAPI {
194
194
  return new runtime.JSONApiResponse(response, (jsonValue) => models_1.AddressNftListResponseFromJSON(jsonValue));
195
195
  }
196
196
  /**
197
- * Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft
197
+ * **NOTE:** This endpoint is deprecated in favor of [Non-Fungible Token holdings](#operation/get_nft_holdings). Retrieves a list of all nfts owned by an address, contains the clarity value of the identifier of the nft.
198
198
  * Get nft events
199
199
  */
200
200
  async getAccountNft(requestParameters, initOverrides) {
@@ -10,13 +10,15 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { RunFaucetResponse } from '../models';
13
+ import { InlineObject, InlineObject1, RunFaucetResponse } from '../models';
14
14
  export interface RunFaucetBtcRequest {
15
15
  address: string;
16
+ inlineObject1?: InlineObject1;
16
17
  }
17
18
  export interface RunFaucetStxRequest {
18
19
  address: string;
19
20
  stacking?: boolean;
21
+ inlineObject?: InlineObject;
20
22
  }
21
23
  /**
22
24
  * FaucetsApi - interface
@@ -26,32 +28,34 @@ export interface RunFaucetStxRequest {
26
28
  */
27
29
  export interface FaucetsApiInterface {
28
30
  /**
29
- * Retrieves BTC tokens into your TestNet BTC address.
30
- * @summary Get BTC tokens
31
- * @param {string} address BTC address
31
+ * Add 1 BTC token to the specified testnet BTC address. The endpoint returns the transaction ID, which you can use to view the transaction in a testnet Bitcoin block explorer. The tokens are delivered once the transaction has been included in a block. **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
32
+ * @summary Add testnet BTC tokens to address
33
+ * @param {string} address A valid testnet BTC address
34
+ * @param {InlineObject1} [inlineObject1]
32
35
  * @param {*} [options] Override http request option.
33
36
  * @throws {RequiredError}
34
37
  * @memberof FaucetsApiInterface
35
38
  */
36
39
  runFaucetBtcRaw(requestParameters: RunFaucetBtcRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RunFaucetResponse>>;
37
40
  /**
38
- * Retrieves BTC tokens into your TestNet BTC address.
39
- * Get BTC tokens
41
+ * Add 1 BTC token to the specified testnet BTC address. The endpoint returns the transaction ID, which you can use to view the transaction in a testnet Bitcoin block explorer. The tokens are delivered once the transaction has been included in a block. **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
42
+ * Add testnet BTC tokens to address
40
43
  */
41
44
  runFaucetBtc(requestParameters: RunFaucetBtcRequest, initOverrides?: RequestInit): Promise<RunFaucetResponse>;
42
45
  /**
43
- * Retrieves STX tokens into you TestNet STX address.
44
- * @summary Get STX tokens
45
- * @param {string} address STX address
46
- * @param {boolean} [stacking] Request the amount of STX needed for stacking
46
+ * 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.
47
+ * @summary Get STX testnet tokens
48
+ * @param {string} address A valid testnet STX address
49
+ * @param {boolean} [stacking] Request the amount of STX tokens needed for individual address stacking
50
+ * @param {InlineObject} [inlineObject]
47
51
  * @param {*} [options] Override http request option.
48
52
  * @throws {RequiredError}
49
53
  * @memberof FaucetsApiInterface
50
54
  */
51
55
  runFaucetStxRaw(requestParameters: RunFaucetStxRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RunFaucetResponse>>;
52
56
  /**
53
- * Retrieves STX tokens into you TestNet STX address.
54
- * Get STX tokens
57
+ * 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.
58
+ * Get STX testnet tokens
55
59
  */
56
60
  runFaucetStx(requestParameters: RunFaucetStxRequest, initOverrides?: RequestInit): Promise<RunFaucetResponse>;
57
61
  }
@@ -60,23 +64,23 @@ export interface FaucetsApiInterface {
60
64
  */
61
65
  export declare class FaucetsApi extends runtime.BaseAPI implements FaucetsApiInterface {
62
66
  /**
63
- * Retrieves BTC tokens into your TestNet BTC address.
64
- * Get BTC tokens
67
+ * Add 1 BTC token to the specified testnet BTC address. The endpoint returns the transaction ID, which you can use to view the transaction in a testnet Bitcoin block explorer. The tokens are delivered once the transaction has been included in a block. **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
68
+ * Add testnet BTC tokens to address
65
69
  */
66
70
  runFaucetBtcRaw(requestParameters: RunFaucetBtcRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RunFaucetResponse>>;
67
71
  /**
68
- * Retrieves BTC tokens into your TestNet BTC address.
69
- * Get BTC tokens
72
+ * Add 1 BTC token to the specified testnet BTC address. The endpoint returns the transaction ID, which you can use to view the transaction in a testnet Bitcoin block explorer. The tokens are delivered once the transaction has been included in a block. **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
73
+ * Add testnet BTC tokens to address
70
74
  */
71
75
  runFaucetBtc(requestParameters: RunFaucetBtcRequest, initOverrides?: RequestInit): Promise<RunFaucetResponse>;
72
76
  /**
73
- * Retrieves STX tokens into you TestNet STX address.
74
- * Get STX tokens
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.
78
+ * Get STX testnet tokens
75
79
  */
76
80
  runFaucetStxRaw(requestParameters: RunFaucetStxRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RunFaucetResponse>>;
77
81
  /**
78
- * Retrieves STX tokens into you TestNet STX address.
79
- * Get STX tokens
82
+ * 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.
83
+ * Get STX testnet tokens
80
84
  */
81
85
  runFaucetStx(requestParameters: RunFaucetStxRequest, initOverrides?: RequestInit): Promise<RunFaucetResponse>;
82
86
  }
@@ -21,8 +21,8 @@ const models_1 = require("../models");
21
21
  */
22
22
  class FaucetsApi extends runtime.BaseAPI {
23
23
  /**
24
- * Retrieves BTC tokens into your TestNet BTC address.
25
- * Get BTC tokens
24
+ * Add 1 BTC token to the specified testnet BTC address. The endpoint returns the transaction ID, which you can use to view the transaction in a testnet Bitcoin block explorer. The tokens are delivered once the transaction has been included in a block. **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
25
+ * Add testnet BTC tokens to address
26
26
  */
27
27
  async runFaucetBtcRaw(requestParameters, initOverrides) {
28
28
  if (requestParameters.address === null || requestParameters.address === undefined) {
@@ -33,25 +33,27 @@ class FaucetsApi extends runtime.BaseAPI {
33
33
  queryParameters['address'] = requestParameters.address;
34
34
  }
35
35
  const headerParameters = {};
36
+ headerParameters['Content-Type'] = 'application/json';
36
37
  const response = await this.request({
37
38
  path: `/extended/v1/faucets/btc`,
38
39
  method: 'POST',
39
40
  headers: headerParameters,
40
41
  query: queryParameters,
42
+ body: models_1.InlineObject1ToJSON(requestParameters.inlineObject1),
41
43
  }, initOverrides);
42
44
  return new runtime.JSONApiResponse(response, (jsonValue) => models_1.RunFaucetResponseFromJSON(jsonValue));
43
45
  }
44
46
  /**
45
- * Retrieves BTC tokens into your TestNet BTC address.
46
- * Get BTC tokens
47
+ * Add 1 BTC token to the specified testnet BTC address. The endpoint returns the transaction ID, which you can use to view the transaction in a testnet Bitcoin block explorer. The tokens are delivered once the transaction has been included in a block. **Note:** This is a testnet only endpoint. This endpoint will not work on the mainnet.
48
+ * Add testnet BTC tokens to address
47
49
  */
48
50
  async runFaucetBtc(requestParameters, initOverrides) {
49
51
  const response = await this.runFaucetBtcRaw(requestParameters, initOverrides);
50
52
  return await response.value();
51
53
  }
52
54
  /**
53
- * Retrieves STX tokens into you TestNet STX address.
54
- * Get STX tokens
55
+ * 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.
56
+ * Get STX testnet tokens
55
57
  */
56
58
  async runFaucetStxRaw(requestParameters, initOverrides) {
57
59
  if (requestParameters.address === null || requestParameters.address === undefined) {
@@ -65,17 +67,19 @@ class FaucetsApi extends runtime.BaseAPI {
65
67
  queryParameters['stacking'] = requestParameters.stacking;
66
68
  }
67
69
  const headerParameters = {};
70
+ headerParameters['Content-Type'] = 'application/json';
68
71
  const response = await this.request({
69
72
  path: `/extended/v1/faucets/stx`,
70
73
  method: 'POST',
71
74
  headers: headerParameters,
72
75
  query: queryParameters,
76
+ body: models_1.InlineObjectToJSON(requestParameters.inlineObject),
73
77
  }, initOverrides);
74
78
  return new runtime.JSONApiResponse(response, (jsonValue) => models_1.RunFaucetResponseFromJSON(jsonValue));
75
79
  }
76
80
  /**
77
- * Retrieves STX tokens into you TestNet STX address.
78
- * Get STX tokens
81
+ * 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.
82
+ * Get STX testnet tokens
79
83
  */
80
84
  async runFaucetStx(requestParameters, initOverrides) {
81
85
  const response = await this.runFaucetStxRaw(requestParameters, initOverrides);
@@ -1 +1 @@
1
- {"version":3,"file":"FaucetsApi.js","sourceRoot":"","sources":["../../../src/generated/apis/FaucetsApi.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AAGH,sCAAsC;AACtC,sCAImB;AAqDnB;;GAEG;AACH,MAAa,UAAW,SAAQ,OAAO,CAAC,OAAO;IAE3C;;;OAGG;IACH,KAAK,CAAC,eAAe,CAAC,iBAAsC,EAAE,aAA2B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AAiB,CAAC,OAAO,CAAC;SAC1D;QAED,IAAI,iBAAiB,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC1C,eAAe,CAAC,UAAU,CAAC,GAAG,iBAAiB,CAAC,QAAQ,CAAC;SAC5D;QAED,MAAM,gBAAgB,GAAwB,EAAE,CAAC;QAEjD,gBAAgB,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;QAEtD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,EAAE,0BAA0B;YAChC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,gBAAgB;YACzB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,2BAAkB,CAAC,iBAAiB,CAAC,YAAY,CAAC;SAC3D,EAAE,aAAa,CAAC,CAAC;QAElB,OAAO,IAAI,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,kCAAyB,CAAC,SAAS,CAAC,CAAC,CAAC;IACtG,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,YAAY,CAAC,iBAAsC,EAAE,aAA2B;QAClF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QAC9E,OAAO,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC;CAEJ;AApFD,gCAoFC"}
@@ -10,14 +10,37 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { NonFungibleTokenMetadata, NonFungibleTokensMetadataList } from '../models';
13
+ import { NonFungibleTokenHistoryEventList, NonFungibleTokenHoldingsList, NonFungibleTokenMetadata, NonFungibleTokenMintList, NonFungibleTokensMetadataList } from '../models';
14
14
  export interface GetContractNftMetadataRequest {
15
15
  contractId: string;
16
16
  }
17
+ export interface GetNftHistoryRequest {
18
+ assetIdentifier: string;
19
+ value: string;
20
+ limit?: number;
21
+ offset?: number;
22
+ unanchored?: boolean;
23
+ txMetadata?: boolean;
24
+ }
25
+ export interface GetNftHoldingsRequest {
26
+ principal: string;
27
+ assetIdentifiers?: Array<string>;
28
+ limit?: number;
29
+ offset?: number;
30
+ unanchored?: boolean;
31
+ txMetadata?: boolean;
32
+ }
17
33
  export interface GetNftMetadataListRequest {
18
34
  limit?: number;
19
35
  offset?: number;
20
36
  }
37
+ export interface GetNftMintsRequest {
38
+ assetIdentifier: string;
39
+ limit?: number;
40
+ offset?: number;
41
+ unanchored?: boolean;
42
+ txMetadata?: boolean;
43
+ }
21
44
  /**
22
45
  * NonFungibleTokensApi - interface
23
46
  *
@@ -39,6 +62,44 @@ export interface NonFungibleTokensApiInterface {
39
62
  * Non fungible tokens metadata for contract id
40
63
  */
41
64
  getContractNftMetadata(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenMetadata>;
65
+ /**
66
+ * Retrieves all events relevant to a Non-Fungible Token. Useful to determine the ownership history of a particular asset. 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).
67
+ * @summary Non-Fungible Token history
68
+ * @param {string} assetIdentifier token asset class identifier
69
+ * @param {string} value hex representation of the token\&#39;s unique value
70
+ * @param {number} [limit] max number of events to fetch
71
+ * @param {number} [offset] index of first event to fetch
72
+ * @param {boolean} [unanchored] whether or not to include events from unconfirmed transactions
73
+ * @param {boolean} [txMetadata] whether or not to include the complete transaction metadata instead of just &#x60;tx_id&#x60;. Enabling this option can affect performance and response times.
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ * @memberof NonFungibleTokensApiInterface
77
+ */
78
+ getNftHistoryRaw(requestParameters: GetNftHistoryRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokenHistoryEventList>>;
79
+ /**
80
+ * Retrieves all events relevant to a Non-Fungible Token. Useful to determine the ownership history of a particular asset. 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).
81
+ * Non-Fungible Token history
82
+ */
83
+ getNftHistory(requestParameters: GetNftHistoryRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenHistoryEventList>;
84
+ /**
85
+ * Retrieves the list of Non-Fungible Tokens owned by the given principal (STX address or Smart Contract ID). Results can be filtered by one or more asset identifiers and can include metadata about the transaction that made the principal own each token. 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).
86
+ * @summary Non-Fungible Token holdings
87
+ * @param {string} principal token owner\&#39;s STX address or Smart Contract ID
88
+ * @param {Array<string>} [assetIdentifiers] identifiers of the token asset classes to filter for
89
+ * @param {number} [limit] max number of tokens to fetch
90
+ * @param {number} [offset] index of first tokens to fetch
91
+ * @param {boolean} [unanchored] whether or not to include tokens from unconfirmed transactions
92
+ * @param {boolean} [txMetadata] whether or not to include the complete transaction metadata instead of just &#x60;tx_id&#x60;. Enabling this option can affect performance and response times.
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ * @memberof NonFungibleTokensApiInterface
96
+ */
97
+ getNftHoldingsRaw(requestParameters: GetNftHoldingsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokenHoldingsList>>;
98
+ /**
99
+ * Retrieves the list of Non-Fungible Tokens owned by the given principal (STX address or Smart Contract ID). Results can be filtered by one or more asset identifiers and can include metadata about the transaction that made the principal own each token. 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).
100
+ * Non-Fungible Token holdings
101
+ */
102
+ getNftHoldings(requestParameters: GetNftHoldingsRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenHoldingsList>;
42
103
  /**
43
104
  * 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).
44
105
  * @summary Non fungible tokens metadata list
@@ -54,6 +115,24 @@ export interface NonFungibleTokensApiInterface {
54
115
  * Non fungible tokens metadata list
55
116
  */
56
117
  getNftMetadataList(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise<NonFungibleTokensMetadataList>;
118
+ /**
119
+ * Retrieves all mint events for a Non-Fungible Token asset class. Useful to determine which NFTs of a particular collection have been claimed. 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).
120
+ * @summary Non-Fungible Token mints
121
+ * @param {string} assetIdentifier token asset class identifier
122
+ * @param {number} [limit] max number of events to fetch
123
+ * @param {number} [offset] index of first event to fetch
124
+ * @param {boolean} [unanchored] whether or not to include events from unconfirmed transactions
125
+ * @param {boolean} [txMetadata] whether or not to include the complete transaction metadata instead of just &#x60;tx_id&#x60;. Enabling this option can affect performance and response times.
126
+ * @param {*} [options] Override http request option.
127
+ * @throws {RequiredError}
128
+ * @memberof NonFungibleTokensApiInterface
129
+ */
130
+ getNftMintsRaw(requestParameters: GetNftMintsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokenMintList>>;
131
+ /**
132
+ * Retrieves all mint events for a Non-Fungible Token asset class. Useful to determine which NFTs of a particular collection have been claimed. 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).
133
+ * Non-Fungible Token mints
134
+ */
135
+ getNftMints(requestParameters: GetNftMintsRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenMintList>;
57
136
  }
58
137
  /**
59
138
  *
@@ -69,6 +148,26 @@ export declare class NonFungibleTokensApi extends runtime.BaseAPI implements Non
69
148
  * Non fungible tokens metadata for contract id
70
149
  */
71
150
  getContractNftMetadata(requestParameters: GetContractNftMetadataRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenMetadata>;
151
+ /**
152
+ * Retrieves all events relevant to a Non-Fungible Token. Useful to determine the ownership history of a particular asset. 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).
153
+ * Non-Fungible Token history
154
+ */
155
+ getNftHistoryRaw(requestParameters: GetNftHistoryRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokenHistoryEventList>>;
156
+ /**
157
+ * Retrieves all events relevant to a Non-Fungible Token. Useful to determine the ownership history of a particular asset. 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).
158
+ * Non-Fungible Token history
159
+ */
160
+ getNftHistory(requestParameters: GetNftHistoryRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenHistoryEventList>;
161
+ /**
162
+ * Retrieves the list of Non-Fungible Tokens owned by the given principal (STX address or Smart Contract ID). Results can be filtered by one or more asset identifiers and can include metadata about the transaction that made the principal own each token. 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).
163
+ * Non-Fungible Token holdings
164
+ */
165
+ getNftHoldingsRaw(requestParameters: GetNftHoldingsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokenHoldingsList>>;
166
+ /**
167
+ * Retrieves the list of Non-Fungible Tokens owned by the given principal (STX address or Smart Contract ID). Results can be filtered by one or more asset identifiers and can include metadata about the transaction that made the principal own each token. 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).
168
+ * Non-Fungible Token holdings
169
+ */
170
+ getNftHoldings(requestParameters: GetNftHoldingsRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenHoldingsList>;
72
171
  /**
73
172
  * 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).
74
173
  * Non fungible tokens metadata list
@@ -79,4 +178,14 @@ export declare class NonFungibleTokensApi extends runtime.BaseAPI implements Non
79
178
  * Non fungible tokens metadata list
80
179
  */
81
180
  getNftMetadataList(requestParameters: GetNftMetadataListRequest, initOverrides?: RequestInit): Promise<NonFungibleTokensMetadataList>;
181
+ /**
182
+ * Retrieves all mint events for a Non-Fungible Token asset class. Useful to determine which NFTs of a particular collection have been claimed. 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).
183
+ * Non-Fungible Token mints
184
+ */
185
+ getNftMintsRaw(requestParameters: GetNftMintsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<NonFungibleTokenMintList>>;
186
+ /**
187
+ * Retrieves all mint events for a Non-Fungible Token asset class. Useful to determine which NFTs of a particular collection have been claimed. 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).
188
+ * Non-Fungible Token mints
189
+ */
190
+ getNftMints(requestParameters: GetNftMintsRequest, initOverrides?: RequestInit): Promise<NonFungibleTokenMintList>;
82
191
  }
@@ -46,6 +46,97 @@ class NonFungibleTokensApi extends runtime.BaseAPI {
46
46
  const response = await this.getContractNftMetadataRaw(requestParameters, initOverrides);
47
47
  return await response.value();
48
48
  }
49
+ /**
50
+ * Retrieves all events relevant to a Non-Fungible Token. Useful to determine the ownership history of a particular asset. 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).
51
+ * Non-Fungible Token history
52
+ */
53
+ async getNftHistoryRaw(requestParameters, initOverrides) {
54
+ if (requestParameters.assetIdentifier === null || requestParameters.assetIdentifier === undefined) {
55
+ throw new runtime.RequiredError('assetIdentifier', 'Required parameter requestParameters.assetIdentifier was null or undefined when calling getNftHistory.');
56
+ }
57
+ if (requestParameters.value === null || requestParameters.value === undefined) {
58
+ throw new runtime.RequiredError('value', 'Required parameter requestParameters.value was null or undefined when calling getNftHistory.');
59
+ }
60
+ const queryParameters = {};
61
+ if (requestParameters.assetIdentifier !== undefined) {
62
+ queryParameters['asset_identifier'] = requestParameters.assetIdentifier;
63
+ }
64
+ if (requestParameters.value !== undefined) {
65
+ queryParameters['value'] = requestParameters.value;
66
+ }
67
+ if (requestParameters.limit !== undefined) {
68
+ queryParameters['limit'] = requestParameters.limit;
69
+ }
70
+ if (requestParameters.offset !== undefined) {
71
+ queryParameters['offset'] = requestParameters.offset;
72
+ }
73
+ if (requestParameters.unanchored !== undefined) {
74
+ queryParameters['unanchored'] = requestParameters.unanchored;
75
+ }
76
+ if (requestParameters.txMetadata !== undefined) {
77
+ queryParameters['tx_metadata'] = requestParameters.txMetadata;
78
+ }
79
+ const headerParameters = {};
80
+ const response = await this.request({
81
+ path: `/extended/v1/tokens/nft/history`,
82
+ method: 'GET',
83
+ headers: headerParameters,
84
+ query: queryParameters,
85
+ }, initOverrides);
86
+ return new runtime.JSONApiResponse(response, (jsonValue) => models_1.NonFungibleTokenHistoryEventListFromJSON(jsonValue));
87
+ }
88
+ /**
89
+ * Retrieves all events relevant to a Non-Fungible Token. Useful to determine the ownership history of a particular asset. 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).
90
+ * Non-Fungible Token history
91
+ */
92
+ async getNftHistory(requestParameters, initOverrides) {
93
+ const response = await this.getNftHistoryRaw(requestParameters, initOverrides);
94
+ return await response.value();
95
+ }
96
+ /**
97
+ * Retrieves the list of Non-Fungible Tokens owned by the given principal (STX address or Smart Contract ID). Results can be filtered by one or more asset identifiers and can include metadata about the transaction that made the principal own each token. 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).
98
+ * Non-Fungible Token holdings
99
+ */
100
+ async getNftHoldingsRaw(requestParameters, initOverrides) {
101
+ if (requestParameters.principal === null || requestParameters.principal === undefined) {
102
+ throw new runtime.RequiredError('principal', 'Required parameter requestParameters.principal was null or undefined when calling getNftHoldings.');
103
+ }
104
+ const queryParameters = {};
105
+ if (requestParameters.principal !== undefined) {
106
+ queryParameters['principal'] = requestParameters.principal;
107
+ }
108
+ if (requestParameters.assetIdentifiers) {
109
+ queryParameters['asset_identifiers'] = requestParameters.assetIdentifiers;
110
+ }
111
+ if (requestParameters.limit !== undefined) {
112
+ queryParameters['limit'] = requestParameters.limit;
113
+ }
114
+ if (requestParameters.offset !== undefined) {
115
+ queryParameters['offset'] = requestParameters.offset;
116
+ }
117
+ if (requestParameters.unanchored !== undefined) {
118
+ queryParameters['unanchored'] = requestParameters.unanchored;
119
+ }
120
+ if (requestParameters.txMetadata !== undefined) {
121
+ queryParameters['tx_metadata'] = requestParameters.txMetadata;
122
+ }
123
+ const headerParameters = {};
124
+ const response = await this.request({
125
+ path: `/extended/v1/tokens/nft/holdings`,
126
+ method: 'GET',
127
+ headers: headerParameters,
128
+ query: queryParameters,
129
+ }, initOverrides);
130
+ return new runtime.JSONApiResponse(response, (jsonValue) => models_1.NonFungibleTokenHoldingsListFromJSON(jsonValue));
131
+ }
132
+ /**
133
+ * Retrieves the list of Non-Fungible Tokens owned by the given principal (STX address or Smart Contract ID). Results can be filtered by one or more asset identifiers and can include metadata about the transaction that made the principal own each token. 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).
134
+ * Non-Fungible Token holdings
135
+ */
136
+ async getNftHoldings(requestParameters, initOverrides) {
137
+ const response = await this.getNftHoldingsRaw(requestParameters, initOverrides);
138
+ return await response.value();
139
+ }
49
140
  /**
50
141
  * 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).
51
142
  * Non fungible tokens metadata list
@@ -75,6 +166,47 @@ class NonFungibleTokensApi extends runtime.BaseAPI {
75
166
  const response = await this.getNftMetadataListRaw(requestParameters, initOverrides);
76
167
  return await response.value();
77
168
  }
169
+ /**
170
+ * Retrieves all mint events for a Non-Fungible Token asset class. Useful to determine which NFTs of a particular collection have been claimed. 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).
171
+ * Non-Fungible Token mints
172
+ */
173
+ async getNftMintsRaw(requestParameters, initOverrides) {
174
+ if (requestParameters.assetIdentifier === null || requestParameters.assetIdentifier === undefined) {
175
+ throw new runtime.RequiredError('assetIdentifier', 'Required parameter requestParameters.assetIdentifier was null or undefined when calling getNftMints.');
176
+ }
177
+ const queryParameters = {};
178
+ if (requestParameters.assetIdentifier !== undefined) {
179
+ queryParameters['asset_identifier'] = requestParameters.assetIdentifier;
180
+ }
181
+ if (requestParameters.limit !== undefined) {
182
+ queryParameters['limit'] = requestParameters.limit;
183
+ }
184
+ if (requestParameters.offset !== undefined) {
185
+ queryParameters['offset'] = requestParameters.offset;
186
+ }
187
+ if (requestParameters.unanchored !== undefined) {
188
+ queryParameters['unanchored'] = requestParameters.unanchored;
189
+ }
190
+ if (requestParameters.txMetadata !== undefined) {
191
+ queryParameters['tx_metadata'] = requestParameters.txMetadata;
192
+ }
193
+ const headerParameters = {};
194
+ const response = await this.request({
195
+ path: `/extended/v1/tokens/nft/mints`,
196
+ method: 'GET',
197
+ headers: headerParameters,
198
+ query: queryParameters,
199
+ }, initOverrides);
200
+ return new runtime.JSONApiResponse(response, (jsonValue) => models_1.NonFungibleTokenMintListFromJSON(jsonValue));
201
+ }
202
+ /**
203
+ * Retrieves all mint events for a Non-Fungible Token asset class. Useful to determine which NFTs of a particular collection have been claimed. 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
+ * Non-Fungible Token mints
205
+ */
206
+ async getNftMints(requestParameters, initOverrides) {
207
+ const response = await this.getNftMintsRaw(requestParameters, initOverrides);
208
+ return await response.value();
209
+ }
78
210
  }
79
211
  exports.NonFungibleTokensApi = NonFungibleTokensApi;
80
212
  //# sourceMappingURL=NonFungibleTokensApi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NonFungibleTokensApi.js","sourceRoot":"","sources":["../../../src/generated/apis/NonFungibleTokensApi.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AAGH,sCAAsC;AACtC,sCAOmB;AAqDnB;;GAEG;AACH,MAAa,oBAAqB,SAAQ,OAAO,CAAC,OAAO;IAErD;;;OAGG;IACH,KAAK,CAAC,yBAAyB,CAAC,iBAAgD,EAAE,aAA2B;QACzG,IAAI,iBAAiB,CAAC,UAAU,KAAK,IAAI,IAAI,iBAAiB,CAAC,UAAU,KAAK,SAAS,EAAE;YACrF,MAAM,IAAI,OAAO,CAAC,aAAa,CAAC,YAAY,EAAC,4GAA4G,CAAC,CAAC;SAC9J;QAED,MAAM,eAAe,GAAQ,EAAE,CAAC;QAEhC,MAAM,gBAAgB,GAAwB,EAAE,CAAC;QAEjD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,EAAE,+CAA+C,CAAC,OAAO,CAAC,IAAI,YAAY,GAAG,EAAE,kBAAkB,CAAC,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;YAC5I,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,gBAAgB;YACzB,KAAK,EAAE,eAAe;SACzB,EAAE,aAAa,CAAC,CAAC;QAElB,OAAO,IAAI,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,yCAAgC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7G,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,sBAAsB,CAAC,iBAAgD,EAAE,aAA2B;QACtG,MAAM,QAAQ,GAAG,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gB,GAAwB,EAAE,CAAC;QAEjD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;YAChC,IAAI,EAAE,+BAA+B;YACrC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,gBAAgB;YACzB,KAAK,EAAE,eAAe;SACzB,EAAE,aAAa,CAAC,CAAC;QAElB,OAAO,IAAI,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,yCAAgC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7G,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,WAAW,CAAC,iBAAqC,EAAE,aAA2B;QAChF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QAC7E,OAAO,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC;CAEJ;AA9OD,oDA8OC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Stacks Blockchain API
3
+ * 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=\"/collection.json\" download=\"stacks-api-collection.json\">Download Postman collection</a>
4
+ *
5
+ * The version of the OpenAPI document: STACKS_API_VERSION
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface InlineObject
16
+ */
17
+ export interface InlineObject {
18
+ /**
19
+ * STX testnet address
20
+ * @type {string}
21
+ * @memberof InlineObject
22
+ */
23
+ address?: string;
24
+ /**
25
+ * Use required number of tokens for stacking
26
+ * @type {boolean}
27
+ * @memberof InlineObject
28
+ */
29
+ stacking?: boolean;
30
+ }
31
+ export declare function InlineObjectFromJSON(json: any): InlineObject;
32
+ export declare function InlineObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): InlineObject;
33
+ export declare function InlineObjectToJSON(value?: InlineObject | null): any;