@stacks/blockchain-api-client 7.12.0 → 7.13.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.
- package/lib/generated/apis/AccountsApi.d.ts +8 -8
- package/lib/generated/apis/AccountsApi.js +4 -4
- 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 +151 -4
- 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/AccountsApi.ts +8 -8
- 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/lib/index.umd.js
CHANGED
|
@@ -2565,6 +2565,84 @@
|
|
|
2565
2565
|
|
|
2566
2566
|
/* eslint-disable */
|
|
2567
2567
|
|
|
2568
|
+
/**
|
|
2569
|
+
* Stacks Blockchain API
|
|
2570
|
+
* 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)
|
|
2571
|
+
*
|
|
2572
|
+
* The version of the OpenAPI document: STACKS_API_VERSION
|
|
2573
|
+
*
|
|
2574
|
+
*
|
|
2575
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2576
|
+
* https://openapi-generator.tech
|
|
2577
|
+
* Do not edit the class manually.
|
|
2578
|
+
*/
|
|
2579
|
+
function FtHolderEntryFromJSON(json) {
|
|
2580
|
+
return FtHolderEntryFromJSONTyped(json);
|
|
2581
|
+
}
|
|
2582
|
+
function FtHolderEntryFromJSONTyped(json, ignoreDiscriminator) {
|
|
2583
|
+
if (json === undefined || json === null) {
|
|
2584
|
+
return json;
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
return {
|
|
2588
|
+
'address': json['address'],
|
|
2589
|
+
'balance': json['balance']
|
|
2590
|
+
};
|
|
2591
|
+
}
|
|
2592
|
+
function FtHolderEntryToJSON(value) {
|
|
2593
|
+
if (value === undefined) {
|
|
2594
|
+
return undefined;
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
if (value === null) {
|
|
2598
|
+
return null;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
return {
|
|
2602
|
+
'address': value.address,
|
|
2603
|
+
'balance': value.balance
|
|
2604
|
+
};
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
/* tslint:disable */
|
|
2608
|
+
function FungibleTokenHolderListFromJSON(json) {
|
|
2609
|
+
return FungibleTokenHolderListFromJSONTyped(json);
|
|
2610
|
+
}
|
|
2611
|
+
function FungibleTokenHolderListFromJSONTyped(json, ignoreDiscriminator) {
|
|
2612
|
+
if (json === undefined || json === null) {
|
|
2613
|
+
return json;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
return {
|
|
2617
|
+
'limit': json['limit'],
|
|
2618
|
+
'offset': json['offset'],
|
|
2619
|
+
'total': json['total'],
|
|
2620
|
+
'total_supply': json['total_supply'],
|
|
2621
|
+
'results': json['results'].map(FtHolderEntryFromJSON)
|
|
2622
|
+
};
|
|
2623
|
+
}
|
|
2624
|
+
function FungibleTokenHolderListToJSON(value) {
|
|
2625
|
+
if (value === undefined) {
|
|
2626
|
+
return undefined;
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
if (value === null) {
|
|
2630
|
+
return null;
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
return {
|
|
2634
|
+
'limit': value.limit,
|
|
2635
|
+
'offset': value.offset,
|
|
2636
|
+
'total': value.total,
|
|
2637
|
+
'total_supply': value.total_supply,
|
|
2638
|
+
'results': value.results.map(FtHolderEntryToJSON)
|
|
2639
|
+
};
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
/* tslint:disable */
|
|
2643
|
+
|
|
2644
|
+
/* eslint-disable */
|
|
2645
|
+
|
|
2568
2646
|
/**
|
|
2569
2647
|
* Stacks Blockchain API
|
|
2570
2648
|
* 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)
|
|
@@ -7309,7 +7387,7 @@
|
|
|
7309
7387
|
}
|
|
7310
7388
|
}
|
|
7311
7389
|
/**
|
|
7312
|
-
* Retrieves a list of all Transactions for a given Address or Contract Identifier. More information on Transaction types can be found [here](https://docs.stacks.co/understand-stacks/transactions#types). If you need to actively monitor new transactions for an address or contract id, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
7390
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get address transactions](/api/get-address-transactions). Retrieves a list of all Transactions for a given Address or Contract Identifier. More information on Transaction types can be found [here](https://docs.stacks.co/understand-stacks/transactions#types). If you need to actively monitor new transactions for an address or contract id, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
7313
7391
|
* Get account transactions
|
|
7314
7392
|
*/
|
|
7315
7393
|
;
|
|
@@ -7360,7 +7438,7 @@
|
|
|
7360
7438
|
}
|
|
7361
7439
|
}
|
|
7362
7440
|
/**
|
|
7363
|
-
* Retrieves a list of all Transactions for a given Address or Contract Identifier. More information on Transaction types can be found [here](https://docs.stacks.co/understand-stacks/transactions#types). If you need to actively monitor new transactions for an address or contract id, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
7441
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get address transactions](/api/get-address-transactions). Retrieves a list of all Transactions for a given Address or Contract Identifier. More information on Transaction types can be found [here](https://docs.stacks.co/understand-stacks/transactions#types). If you need to actively monitor new transactions for an address or contract id, we highly recommend subscribing to [WebSockets or Socket.io](https://github.com/hirosystems/stacks-blockchain-api/tree/master/client) for real-time updates.
|
|
7364
7442
|
* Get account transactions
|
|
7365
7443
|
*/
|
|
7366
7444
|
;
|
|
@@ -7445,7 +7523,7 @@
|
|
|
7445
7523
|
}
|
|
7446
7524
|
}
|
|
7447
7525
|
/**
|
|
7448
|
-
* Retrieves transaction details for a given Transaction Id `tx_id`, for a given account or contract Identifier.
|
|
7526
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get events for an address transaction](/api/get-address-transaction-events). Retrieves transaction details for a given Transaction Id `tx_id`, for a given account or contract Identifier.
|
|
7449
7527
|
* Get account transaction information for specific transaction
|
|
7450
7528
|
*/
|
|
7451
7529
|
;
|
|
@@ -7479,7 +7557,7 @@
|
|
|
7479
7557
|
}
|
|
7480
7558
|
}
|
|
7481
7559
|
/**
|
|
7482
|
-
* Retrieves transaction details for a given Transaction Id `tx_id`, for a given account or contract Identifier.
|
|
7560
|
+
* **NOTE:** This endpoint is deprecated in favor of [Get events for an address transaction](/api/get-address-transaction-events). Retrieves transaction details for a given Transaction Id `tx_id`, for a given account or contract Identifier.
|
|
7483
7561
|
* Get account transaction information for specific transaction
|
|
7484
7562
|
*/
|
|
7485
7563
|
;
|
|
@@ -8341,6 +8419,68 @@
|
|
|
8341
8419
|
return FeesApi;
|
|
8342
8420
|
}(BaseAPI);
|
|
8343
8421
|
|
|
8422
|
+
/**
|
|
8423
|
+
*
|
|
8424
|
+
*/
|
|
8425
|
+
|
|
8426
|
+
var FungibleTokensApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
8427
|
+
_inheritsLoose(FungibleTokensApi, _runtime$BaseAPI);
|
|
8428
|
+
|
|
8429
|
+
function FungibleTokensApi() {
|
|
8430
|
+
return _runtime$BaseAPI.apply(this, arguments) || this;
|
|
8431
|
+
}
|
|
8432
|
+
|
|
8433
|
+
var _proto = FungibleTokensApi.prototype;
|
|
8434
|
+
|
|
8435
|
+
/**
|
|
8436
|
+
* 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.
|
|
8437
|
+
* Fungible token holders
|
|
8438
|
+
*/
|
|
8439
|
+
_proto.getFtHoldersRaw = function getFtHoldersRaw(requestParameters, initOverrides) {
|
|
8440
|
+
try {
|
|
8441
|
+
var _this2 = this;
|
|
8442
|
+
|
|
8443
|
+
if (requestParameters.token === null || requestParameters.token === undefined) {
|
|
8444
|
+
throw new RequiredError('token', 'Required parameter requestParameters.token was null or undefined when calling getFtHolders.');
|
|
8445
|
+
}
|
|
8446
|
+
|
|
8447
|
+
var queryParameters = {};
|
|
8448
|
+
var headerParameters = {};
|
|
8449
|
+
return Promise.resolve(_this2.request({
|
|
8450
|
+
path: "/extended/v1/tokens/ft/{token}/holders".replace("{" + "token" + "}", encodeURIComponent(String(requestParameters.token))),
|
|
8451
|
+
method: 'GET',
|
|
8452
|
+
headers: headerParameters,
|
|
8453
|
+
query: queryParameters
|
|
8454
|
+
}, initOverrides)).then(function (response) {
|
|
8455
|
+
return new JSONApiResponse(response, function (jsonValue) {
|
|
8456
|
+
return FungibleTokenHolderListFromJSON(jsonValue);
|
|
8457
|
+
});
|
|
8458
|
+
});
|
|
8459
|
+
} catch (e) {
|
|
8460
|
+
return Promise.reject(e);
|
|
8461
|
+
}
|
|
8462
|
+
}
|
|
8463
|
+
/**
|
|
8464
|
+
* 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.
|
|
8465
|
+
* Fungible token holders
|
|
8466
|
+
*/
|
|
8467
|
+
;
|
|
8468
|
+
|
|
8469
|
+
_proto.getFtHolders = function getFtHolders(requestParameters, initOverrides) {
|
|
8470
|
+
try {
|
|
8471
|
+
var _this4 = this;
|
|
8472
|
+
|
|
8473
|
+
return Promise.resolve(_this4.getFtHoldersRaw(requestParameters, initOverrides)).then(function (response) {
|
|
8474
|
+
return Promise.resolve(response.value());
|
|
8475
|
+
});
|
|
8476
|
+
} catch (e) {
|
|
8477
|
+
return Promise.reject(e);
|
|
8478
|
+
}
|
|
8479
|
+
};
|
|
8480
|
+
|
|
8481
|
+
return FungibleTokensApi;
|
|
8482
|
+
}(BaseAPI);
|
|
8483
|
+
|
|
8344
8484
|
/**
|
|
8345
8485
|
*
|
|
8346
8486
|
*/
|
|
@@ -17911,6 +18051,13 @@
|
|
|
17911
18051
|
exports.FeeRateRequestToJSON = FeeRateRequestToJSON;
|
|
17912
18052
|
exports.FeeRateToJSON = FeeRateToJSON;
|
|
17913
18053
|
exports.FeesApi = FeesApi;
|
|
18054
|
+
exports.FtHolderEntryFromJSON = FtHolderEntryFromJSON;
|
|
18055
|
+
exports.FtHolderEntryFromJSONTyped = FtHolderEntryFromJSONTyped;
|
|
18056
|
+
exports.FtHolderEntryToJSON = FtHolderEntryToJSON;
|
|
18057
|
+
exports.FungibleTokenHolderListFromJSON = FungibleTokenHolderListFromJSON;
|
|
18058
|
+
exports.FungibleTokenHolderListFromJSONTyped = FungibleTokenHolderListFromJSONTyped;
|
|
18059
|
+
exports.FungibleTokenHolderListToJSON = FungibleTokenHolderListToJSON;
|
|
18060
|
+
exports.FungibleTokensApi = FungibleTokensApi;
|
|
17914
18061
|
exports.GetRawTransactionResultFromJSON = GetRawTransactionResultFromJSON;
|
|
17915
18062
|
exports.GetRawTransactionResultFromJSONTyped = GetRawTransactionResultFromJSONTyped;
|
|
17916
18063
|
exports.GetRawTransactionResultToJSON = GetRawTransactionResultToJSON;
|