@stacks/blockchain-api-client 7.12.0 → 7.13.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/generated/apis/FungibleTokensApi.d.ts +53 -0
- package/lib/generated/apis/FungibleTokensApi.js +51 -0
- package/lib/generated/apis/FungibleTokensApi.js.map +1 -0
- package/lib/generated/apis/index.d.ts +1 -0
- package/lib/generated/apis/index.js +1 -0
- package/lib/generated/apis/index.js.map +1 -1
- package/lib/generated/models/FtHolderEntry.d.ts +33 -0
- package/lib/generated/models/FtHolderEntry.js +44 -0
- package/lib/generated/models/FtHolderEntry.js.map +1 -0
- package/lib/generated/models/FungibleTokenHolderList.d.ts +52 -0
- package/lib/generated/models/FungibleTokenHolderList.js +51 -0
- package/lib/generated/models/FungibleTokenHolderList.js.map +1 -0
- package/lib/generated/models/index.d.ts +2 -0
- package/lib/generated/models/index.js +2 -0
- package/lib/generated/models/index.js.map +1 -1
- package/lib/index.umd.js +147 -0
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/.openapi-generator/FILES +3 -0
- package/src/generated/apis/FungibleTokensApi.ts +89 -0
- package/src/generated/apis/index.ts +1 -0
- package/src/generated/models/FtHolderEntry.ts +64 -0
- package/src/generated/models/FungibleTokenHolderList.ts +95 -0
- package/src/generated/models/index.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacks/blockchain-api-client",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.13.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",
|
|
@@ -4,6 +4,7 @@ apis/BlocksApi.ts
|
|
|
4
4
|
apis/BurnBlocksApi.ts
|
|
5
5
|
apis/FaucetsApi.ts
|
|
6
6
|
apis/FeesApi.ts
|
|
7
|
+
apis/FungibleTokensApi.ts
|
|
7
8
|
apis/InfoApi.ts
|
|
8
9
|
apis/MempoolApi.ts
|
|
9
10
|
apis/MicroblocksApi.ts
|
|
@@ -61,6 +62,8 @@ models/CoreNodeInfoResponse.ts
|
|
|
61
62
|
models/CoreNodePoxResponse.ts
|
|
62
63
|
models/FeeRate.ts
|
|
63
64
|
models/FeeRateRequest.ts
|
|
65
|
+
models/FtHolderEntry.ts
|
|
66
|
+
models/FungibleTokenHolderList.ts
|
|
64
67
|
models/GetRawTransactionResult.ts
|
|
65
68
|
models/GetStxSupplyLegacyFormatResponse.ts
|
|
66
69
|
models/GetStxSupplyResponse.ts
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Stacks Blockchain API
|
|
5
|
+
* Welcome to the API reference overview for the [Stacks Blockchain API](https://docs.hiro.so/stacks-blockchain-api). [Download Postman collection](https://hirosystems.github.io/stacks-blockchain-api/collection.json)
|
|
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
|
+
FungibleTokenHolderList,
|
|
19
|
+
FungibleTokenHolderListFromJSON,
|
|
20
|
+
FungibleTokenHolderListToJSON,
|
|
21
|
+
} from '../models';
|
|
22
|
+
|
|
23
|
+
export interface GetFtHoldersRequest {
|
|
24
|
+
token: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* FungibleTokensApi - interface
|
|
29
|
+
*
|
|
30
|
+
* @export
|
|
31
|
+
* @interface FungibleTokensApiInterface
|
|
32
|
+
*/
|
|
33
|
+
export interface FungibleTokensApiInterface {
|
|
34
|
+
/**
|
|
35
|
+
* Retrieves the list of Fungible Token holders for a given token ID. Specify `stx` for the `token` parameter to get the list of STX holders.
|
|
36
|
+
* @summary Fungible token holders
|
|
37
|
+
* @param {string} token fungible token identifier
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
* @memberof FungibleTokensApiInterface
|
|
41
|
+
*/
|
|
42
|
+
getFtHoldersRaw(requestParameters: GetFtHoldersRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FungibleTokenHolderList>>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Retrieves the list of Fungible Token holders for a given token ID. Specify `stx` for the `token` parameter to get the list of STX holders.
|
|
46
|
+
* Fungible token holders
|
|
47
|
+
*/
|
|
48
|
+
getFtHolders(requestParameters: GetFtHoldersRequest, initOverrides?: RequestInit): Promise<FungibleTokenHolderList>;
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
export class FungibleTokensApi extends runtime.BaseAPI implements FungibleTokensApiInterface {
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Retrieves the list of Fungible Token holders for a given token ID. Specify `stx` for the `token` parameter to get the list of STX holders.
|
|
59
|
+
* Fungible token holders
|
|
60
|
+
*/
|
|
61
|
+
async getFtHoldersRaw(requestParameters: GetFtHoldersRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FungibleTokenHolderList>> {
|
|
62
|
+
if (requestParameters.token === null || requestParameters.token === undefined) {
|
|
63
|
+
throw new runtime.RequiredError('token','Required parameter requestParameters.token was null or undefined when calling getFtHolders.');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const queryParameters: any = {};
|
|
67
|
+
|
|
68
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
69
|
+
|
|
70
|
+
const response = await this.request({
|
|
71
|
+
path: `/extended/v1/tokens/ft/{token}/holders`.replace(`{${"token"}}`, encodeURIComponent(String(requestParameters.token))),
|
|
72
|
+
method: 'GET',
|
|
73
|
+
headers: headerParameters,
|
|
74
|
+
query: queryParameters,
|
|
75
|
+
}, initOverrides);
|
|
76
|
+
|
|
77
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FungibleTokenHolderListFromJSON(jsonValue));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Retrieves the list of Fungible Token holders for a given token ID. Specify `stx` for the `token` parameter to get the list of STX holders.
|
|
82
|
+
* Fungible token holders
|
|
83
|
+
*/
|
|
84
|
+
async getFtHolders(requestParameters: GetFtHoldersRequest, initOverrides?: RequestInit): Promise<FungibleTokenHolderList> {
|
|
85
|
+
const response = await this.getFtHoldersRaw(requestParameters, initOverrides);
|
|
86
|
+
return await response.value();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Stacks Blockchain API
|
|
5
|
+
* Welcome to the API reference overview for the [Stacks Blockchain API](https://docs.hiro.so/stacks-blockchain-api). [Download Postman collection](https://hirosystems.github.io/stacks-blockchain-api/collection.json)
|
|
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 FtHolderEntry
|
|
20
|
+
*/
|
|
21
|
+
export interface FtHolderEntry {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof FtHolderEntry
|
|
26
|
+
*/
|
|
27
|
+
address: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof FtHolderEntry
|
|
32
|
+
*/
|
|
33
|
+
balance: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function FtHolderEntryFromJSON(json: any): FtHolderEntry {
|
|
37
|
+
return FtHolderEntryFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function FtHolderEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): FtHolderEntry {
|
|
41
|
+
if ((json === undefined) || (json === null)) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
|
|
46
|
+
'address': json['address'],
|
|
47
|
+
'balance': json['balance'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function FtHolderEntryToJSON(value?: FtHolderEntry | null): any {
|
|
52
|
+
if (value === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (value === null) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'address': value.address,
|
|
61
|
+
'balance': value.balance,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Stacks Blockchain API
|
|
5
|
+
* Welcome to the API reference overview for the [Stacks Blockchain API](https://docs.hiro.so/stacks-blockchain-api). [Download Postman collection](https://hirosystems.github.io/stacks-blockchain-api/collection.json)
|
|
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
|
+
FtHolderEntry,
|
|
18
|
+
FtHolderEntryFromJSON,
|
|
19
|
+
FtHolderEntryFromJSONTyped,
|
|
20
|
+
FtHolderEntryToJSON,
|
|
21
|
+
} from './';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* List of Fungible Token holders
|
|
25
|
+
* @export
|
|
26
|
+
* @interface FungibleTokenHolderList
|
|
27
|
+
*/
|
|
28
|
+
export interface FungibleTokenHolderList {
|
|
29
|
+
/**
|
|
30
|
+
* The number of holders to return
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof FungibleTokenHolderList
|
|
33
|
+
*/
|
|
34
|
+
limit: number;
|
|
35
|
+
/**
|
|
36
|
+
* The number to holders to skip (starting at `0`)
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof FungibleTokenHolderList
|
|
39
|
+
*/
|
|
40
|
+
offset: number;
|
|
41
|
+
/**
|
|
42
|
+
* The number of holders available
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof FungibleTokenHolderList
|
|
45
|
+
*/
|
|
46
|
+
total: number;
|
|
47
|
+
/**
|
|
48
|
+
* The total supply of the token (the sum of all balances)
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof FungibleTokenHolderList
|
|
51
|
+
*/
|
|
52
|
+
total_supply: string;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {Array<FtHolderEntry>}
|
|
56
|
+
* @memberof FungibleTokenHolderList
|
|
57
|
+
*/
|
|
58
|
+
results: Array<FtHolderEntry>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function FungibleTokenHolderListFromJSON(json: any): FungibleTokenHolderList {
|
|
62
|
+
return FungibleTokenHolderListFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function FungibleTokenHolderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): FungibleTokenHolderList {
|
|
66
|
+
if ((json === undefined) || (json === null)) {
|
|
67
|
+
return json;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'limit': json['limit'],
|
|
72
|
+
'offset': json['offset'],
|
|
73
|
+
'total': json['total'],
|
|
74
|
+
'total_supply': json['total_supply'],
|
|
75
|
+
'results': ((json['results'] as Array<any>).map(FtHolderEntryFromJSON)),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function FungibleTokenHolderListToJSON(value?: FungibleTokenHolderList | null): any {
|
|
80
|
+
if (value === undefined) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
if (value === null) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'limit': value.limit,
|
|
89
|
+
'offset': value.offset,
|
|
90
|
+
'total': value.total,
|
|
91
|
+
'total_supply': value.total_supply,
|
|
92
|
+
'results': ((value.results as Array<any>).map(FtHolderEntryToJSON)),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
@@ -43,6 +43,8 @@ export * from './CoreNodeInfoResponse';
|
|
|
43
43
|
export * from './CoreNodePoxResponse';
|
|
44
44
|
export * from './FeeRate';
|
|
45
45
|
export * from './FeeRateRequest';
|
|
46
|
+
export * from './FtHolderEntry';
|
|
47
|
+
export * from './FungibleTokenHolderList';
|
|
46
48
|
export * from './GetRawTransactionResult';
|
|
47
49
|
export * from './GetStxSupplyLegacyFormatResponse';
|
|
48
50
|
export * from './GetStxSupplyResponse';
|