@stacks/blockchain-api-client 4.0.0-beta.3 → 4.0.0-beta.6
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/NamesApi.d.ts +0 -29
- package/lib/generated/apis/NamesApi.js +0 -32
- package/lib/generated/apis/NamesApi.js.map +1 -1
- package/lib/generated/apis/RosettaApi.d.ts +5 -13
- package/lib/generated/apis/RosettaApi.js +1 -1
- package/lib/generated/apis/RosettaApi.js.map +1 -1
- package/lib/generated/models/AddressBalanceResponse.d.ts +11 -7
- package/lib/generated/models/AddressBalanceResponse.js +2 -2
- package/lib/generated/models/AddressBalanceResponse.js.map +1 -1
- package/lib/generated/models/BnsNamesOwnByAddressResponse.d.ts +1 -1
- package/lib/generated/models/BnsNamesOwnByAddressResponse.js +1 -2
- package/lib/generated/models/BnsNamesOwnByAddressResponse.js.map +1 -1
- package/lib/generated/models/NetworkBlockTimesResponse.d.ts +5 -5
- package/lib/generated/models/NetworkBlockTimesResponse.js +4 -4
- package/lib/generated/models/NetworkBlockTimesResponse.js.map +1 -1
- package/lib/generated/models/RosettaGenesisBlockIdentifier.d.ts +33 -0
- package/lib/generated/models/RosettaGenesisBlockIdentifier.js +44 -0
- package/lib/generated/models/RosettaGenesisBlockIdentifier.js.map +1 -0
- package/lib/generated/models/RosettaNetworkStatusResponse.d.ts +58 -0
- package/lib/generated/models/RosettaNetworkStatusResponse.js +54 -0
- package/lib/generated/models/RosettaNetworkStatusResponse.js.map +1 -0
- package/lib/generated/models/RosettaOldestBlockIdentifier.d.ts +33 -0
- package/lib/generated/models/RosettaOldestBlockIdentifier.js +44 -0
- package/lib/generated/models/RosettaOldestBlockIdentifier.js.map +1 -0
- package/lib/generated/models/RosettaOptions.d.ts +2 -2
- package/lib/generated/models/RosettaPeers.d.ts +33 -0
- package/lib/generated/models/RosettaPeers.js +45 -0
- package/lib/generated/models/RosettaPeers.js.map +1 -0
- package/lib/generated/models/RosettaSyncStatus.d.ts +45 -0
- package/lib/generated/models/RosettaSyncStatus.js +49 -0
- package/lib/generated/models/RosettaSyncStatus.js.map +1 -0
- package/lib/generated/models/{AddressBalanceResponseStx.d.ts → StxBalance.d.ts} +16 -16
- package/lib/generated/models/{AddressBalanceResponseStx.js → StxBalance.js} +9 -9
- package/lib/generated/models/StxBalance.js.map +1 -0
- package/lib/generated/models/{NetworkBlockTimesResponseMainnet.d.ts → TargetBlockTime.d.ts} +7 -7
- package/lib/generated/models/{NetworkBlockTimesResponseMainnet.js → TargetBlockTime.js} +9 -9
- package/lib/generated/models/TargetBlockTime.js.map +1 -0
- package/lib/generated/models/index.d.ts +7 -2
- package/lib/generated/models/index.js +7 -2
- package/lib/generated/models/index.js.map +1 -1
- package/lib/index.umd.js +350 -188
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/.openapi-generator/FILES +7 -2
- package/src/generated/apis/NamesApi.ts +0 -62
- package/src/generated/apis/RosettaApi.ts +8 -5
- package/src/generated/models/AddressBalanceResponse.ts +12 -12
- package/src/generated/models/BnsNamesOwnByAddressResponse.ts +2 -2
- package/src/generated/models/NetworkBlockTimesResponse.ts +12 -12
- package/src/generated/models/RosettaGenesisBlockIdentifier.ts +64 -0
- package/src/generated/models/RosettaNetworkStatusResponse.ts +115 -0
- package/src/generated/models/RosettaOldestBlockIdentifier.ts +64 -0
- package/src/generated/models/RosettaOptions.ts +2 -2
- package/src/generated/models/RosettaPeers.ts +64 -0
- package/src/generated/models/RosettaSyncStatus.ts +80 -0
- package/src/generated/models/{AddressBalanceResponseStx.ts → StxBalance.ts} +17 -17
- package/src/generated/models/{NetworkBlockTimesResponseMainnet.ts → TargetBlockTime.ts} +8 -8
- package/src/generated/models/index.ts +7 -2
- package/lib/generated/models/AddressBalanceResponseStx.js.map +0 -1
- package/lib/generated/models/NetworkBlockTimesResponseMainnet.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacks/blockchain-api-client",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.6",
|
|
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",
|
|
@@ -18,7 +18,6 @@ index.ts
|
|
|
18
18
|
models/AccountDataResponse.ts
|
|
19
19
|
models/AddressAssetsListResponse.ts
|
|
20
20
|
models/AddressBalanceResponse.ts
|
|
21
|
-
models/AddressBalanceResponseStx.ts
|
|
22
21
|
models/AddressNftListResponse.ts
|
|
23
22
|
models/AddressNftListResponseValue.ts
|
|
24
23
|
models/AddressNonces.ts
|
|
@@ -67,7 +66,6 @@ models/Microblock.ts
|
|
|
67
66
|
models/MicroblockListResponse.ts
|
|
68
67
|
models/NetworkBlockTimeResponse.ts
|
|
69
68
|
models/NetworkBlockTimesResponse.ts
|
|
70
|
-
models/NetworkBlockTimesResponseMainnet.ts
|
|
71
69
|
models/NetworkIdentifier.ts
|
|
72
70
|
models/NftEvent.ts
|
|
73
71
|
models/NonFungibleTokenHistoryEventList.ts
|
|
@@ -116,6 +114,7 @@ models/RosettaCurrency.ts
|
|
|
116
114
|
models/RosettaError.ts
|
|
117
115
|
models/RosettaErrorDetails.ts
|
|
118
116
|
models/RosettaErrorNoDetails.ts
|
|
117
|
+
models/RosettaGenesisBlockIdentifier.ts
|
|
119
118
|
models/RosettaMaxFeeAmount.ts
|
|
120
119
|
models/RosettaMempoolRequest.ts
|
|
121
120
|
models/RosettaMempoolResponse.ts
|
|
@@ -127,22 +126,28 @@ models/RosettaNetworkListResponseSubNetworkIdentifierMetadata.ts
|
|
|
127
126
|
models/RosettaNetworkOptionsResponse.ts
|
|
128
127
|
models/RosettaNetworkOptionsResponseAllow.ts
|
|
129
128
|
models/RosettaNetworkOptionsResponseVersion.ts
|
|
129
|
+
models/RosettaNetworkStatusResponse.ts
|
|
130
|
+
models/RosettaOldestBlockIdentifier.ts
|
|
130
131
|
models/RosettaOperation.ts
|
|
131
132
|
models/RosettaOperationIdentifier.ts
|
|
132
133
|
models/RosettaOperationStatus.ts
|
|
133
134
|
models/RosettaOptions.ts
|
|
134
135
|
models/RosettaOptionsRequest.ts
|
|
135
136
|
models/RosettaParentBlockIdentifier.ts
|
|
137
|
+
models/RosettaPeers.ts
|
|
136
138
|
models/RosettaPublicKey.ts
|
|
137
139
|
models/RosettaRelatedOperation.ts
|
|
138
140
|
models/RosettaSignature.ts
|
|
139
141
|
models/RosettaStatusRequest.ts
|
|
140
142
|
models/RosettaSubAccount.ts
|
|
143
|
+
models/RosettaSyncStatus.ts
|
|
141
144
|
models/RosettaTransaction.ts
|
|
142
145
|
models/RunFaucetResponse.ts
|
|
143
146
|
models/ServerStatusResponse.ts
|
|
144
147
|
models/SigningPayload.ts
|
|
145
148
|
models/SmartContract.ts
|
|
149
|
+
models/StxBalance.ts
|
|
150
|
+
models/TargetBlockTime.ts
|
|
146
151
|
models/TransactionEventsResponse.ts
|
|
147
152
|
models/TransactionFeeEstimateRequest.ts
|
|
148
153
|
models/TransactionFeeEstimateResponse.ts
|
|
@@ -52,11 +52,6 @@ export interface GetHistoricalZoneFileRequest {
|
|
|
52
52
|
zoneFileHash: string;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export interface GetNameHistoryRequest {
|
|
56
|
-
name: string;
|
|
57
|
-
page: number;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
55
|
export interface GetNameInfoRequest {
|
|
61
56
|
name: string;
|
|
62
57
|
}
|
|
@@ -166,23 +161,6 @@ export interface NamesApiInterface {
|
|
|
166
161
|
*/
|
|
167
162
|
getHistoricalZoneFile(requestParameters: GetHistoricalZoneFileRequest, initOverrides?: RequestInit): Promise<object>;
|
|
168
163
|
|
|
169
|
-
/**
|
|
170
|
-
* Retrieves a history of all blockchain records of a registered name.
|
|
171
|
-
* @summary Get Name History
|
|
172
|
-
* @param {string} name name to query
|
|
173
|
-
* @param {number} page the page (in 20-entry pages) of the history to fetch
|
|
174
|
-
* @param {*} [options] Override http request option.
|
|
175
|
-
* @throws {RequiredError}
|
|
176
|
-
* @memberof NamesApiInterface
|
|
177
|
-
*/
|
|
178
|
-
getNameHistoryRaw(requestParameters: GetNameHistoryRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<object>>;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Retrieves a history of all blockchain records of a registered name.
|
|
182
|
-
* Get Name History
|
|
183
|
-
*/
|
|
184
|
-
getNameHistory(requestParameters: GetNameHistoryRequest, initOverrides?: RequestInit): Promise<object>;
|
|
185
|
-
|
|
186
164
|
/**
|
|
187
165
|
* Retrieves details of a given name including the `address`, `status` and last transaction id - `last_txid`.
|
|
188
166
|
* @summary Get Name Details
|
|
@@ -436,46 +414,6 @@ export class NamesApi extends runtime.BaseAPI implements NamesApiInterface {
|
|
|
436
414
|
return await response.value();
|
|
437
415
|
}
|
|
438
416
|
|
|
439
|
-
/**
|
|
440
|
-
* Retrieves a history of all blockchain records of a registered name.
|
|
441
|
-
* Get Name History
|
|
442
|
-
*/
|
|
443
|
-
async getNameHistoryRaw(requestParameters: GetNameHistoryRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<object>> {
|
|
444
|
-
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
445
|
-
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling getNameHistory.');
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
if (requestParameters.page === null || requestParameters.page === undefined) {
|
|
449
|
-
throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getNameHistory.');
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
const queryParameters: any = {};
|
|
453
|
-
|
|
454
|
-
if (requestParameters.page !== undefined) {
|
|
455
|
-
queryParameters['page'] = requestParameters.page;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
459
|
-
|
|
460
|
-
const response = await this.request({
|
|
461
|
-
path: `/v1/names/{name}/history`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
462
|
-
method: 'GET',
|
|
463
|
-
headers: headerParameters,
|
|
464
|
-
query: queryParameters,
|
|
465
|
-
}, initOverrides);
|
|
466
|
-
|
|
467
|
-
return new runtime.JSONApiResponse<any>(response);
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Retrieves a history of all blockchain records of a registered name.
|
|
472
|
-
* Get Name History
|
|
473
|
-
*/
|
|
474
|
-
async getNameHistory(requestParameters: GetNameHistoryRequest, initOverrides?: RequestInit): Promise<object> {
|
|
475
|
-
const response = await this.getNameHistoryRaw(requestParameters, initOverrides);
|
|
476
|
-
return await response.value();
|
|
477
|
-
}
|
|
478
|
-
|
|
479
417
|
/**
|
|
480
418
|
* Retrieves details of a given name including the `address`, `status` and last transaction id - `last_txid`.
|
|
481
419
|
* Get Name Details
|
|
@@ -102,6 +102,9 @@ import {
|
|
|
102
102
|
RosettaNetworkOptionsResponse,
|
|
103
103
|
RosettaNetworkOptionsResponseFromJSON,
|
|
104
104
|
RosettaNetworkOptionsResponseToJSON,
|
|
105
|
+
RosettaNetworkStatusResponse,
|
|
106
|
+
RosettaNetworkStatusResponseFromJSON,
|
|
107
|
+
RosettaNetworkStatusResponseToJSON,
|
|
105
108
|
RosettaOptionsRequest,
|
|
106
109
|
RosettaOptionsRequestFromJSON,
|
|
107
110
|
RosettaOptionsRequestToJSON,
|
|
@@ -424,13 +427,13 @@ export interface RosettaApiInterface {
|
|
|
424
427
|
* @throws {RequiredError}
|
|
425
428
|
* @memberof RosettaApiInterface
|
|
426
429
|
*/
|
|
427
|
-
rosettaNetworkStatusRaw(requestParameters: RosettaNetworkStatusRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<
|
|
430
|
+
rosettaNetworkStatusRaw(requestParameters: RosettaNetworkStatusRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RosettaNetworkStatusResponse>>;
|
|
428
431
|
|
|
429
432
|
/**
|
|
430
433
|
* Retrieves the current status of the network requested. Any NetworkIdentifier returned by /network/list should be accessible here.
|
|
431
434
|
* Get Network Status
|
|
432
435
|
*/
|
|
433
|
-
rosettaNetworkStatus(requestParameters: RosettaNetworkStatusRequest, initOverrides?: RequestInit): Promise<
|
|
436
|
+
rosettaNetworkStatus(requestParameters: RosettaNetworkStatusRequest, initOverrides?: RequestInit): Promise<RosettaNetworkStatusResponse>;
|
|
434
437
|
|
|
435
438
|
}
|
|
436
439
|
|
|
@@ -961,7 +964,7 @@ export class RosettaApi extends runtime.BaseAPI implements RosettaApiInterface {
|
|
|
961
964
|
* Retrieves the current status of the network requested. Any NetworkIdentifier returned by /network/list should be accessible here.
|
|
962
965
|
* Get Network Status
|
|
963
966
|
*/
|
|
964
|
-
async rosettaNetworkStatusRaw(requestParameters: RosettaNetworkStatusRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<
|
|
967
|
+
async rosettaNetworkStatusRaw(requestParameters: RosettaNetworkStatusRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RosettaNetworkStatusResponse>> {
|
|
965
968
|
if (requestParameters.rosettaStatusRequest === null || requestParameters.rosettaStatusRequest === undefined) {
|
|
966
969
|
throw new runtime.RequiredError('rosettaStatusRequest','Required parameter requestParameters.rosettaStatusRequest was null or undefined when calling rosettaNetworkStatus.');
|
|
967
970
|
}
|
|
@@ -980,14 +983,14 @@ export class RosettaApi extends runtime.BaseAPI implements RosettaApiInterface {
|
|
|
980
983
|
body: RosettaStatusRequestToJSON(requestParameters.rosettaStatusRequest),
|
|
981
984
|
}, initOverrides);
|
|
982
985
|
|
|
983
|
-
return new runtime.JSONApiResponse
|
|
986
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RosettaNetworkStatusResponseFromJSON(jsonValue));
|
|
984
987
|
}
|
|
985
988
|
|
|
986
989
|
/**
|
|
987
990
|
* Retrieves the current status of the network requested. Any NetworkIdentifier returned by /network/list should be accessible here.
|
|
988
991
|
* Get Network Status
|
|
989
992
|
*/
|
|
990
|
-
async rosettaNetworkStatus(requestParameters: RosettaNetworkStatusRequest, initOverrides?: RequestInit): Promise<
|
|
993
|
+
async rosettaNetworkStatus(requestParameters: RosettaNetworkStatusRequest, initOverrides?: RequestInit): Promise<RosettaNetworkStatusResponse> {
|
|
991
994
|
const response = await this.rosettaNetworkStatusRaw(requestParameters, initOverrides);
|
|
992
995
|
return await response.value();
|
|
993
996
|
}
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
-
AddressBalanceResponseStx,
|
|
18
|
-
AddressBalanceResponseStxFromJSON,
|
|
19
|
-
AddressBalanceResponseStxFromJSONTyped,
|
|
20
|
-
AddressBalanceResponseStxToJSON,
|
|
21
17
|
AddressTokenOfferingLocked,
|
|
22
18
|
AddressTokenOfferingLockedFromJSON,
|
|
23
19
|
AddressTokenOfferingLockedFromJSONTyped,
|
|
24
20
|
AddressTokenOfferingLockedToJSON,
|
|
21
|
+
StxBalance,
|
|
22
|
+
StxBalanceFromJSON,
|
|
23
|
+
StxBalanceFromJSONTyped,
|
|
24
|
+
StxBalanceToJSON,
|
|
25
25
|
} from './';
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -32,22 +32,22 @@ import {
|
|
|
32
32
|
export interface AddressBalanceResponse {
|
|
33
33
|
/**
|
|
34
34
|
*
|
|
35
|
-
* @type {
|
|
35
|
+
* @type {StxBalance}
|
|
36
36
|
* @memberof AddressBalanceResponse
|
|
37
37
|
*/
|
|
38
|
-
stx:
|
|
38
|
+
stx: StxBalance;
|
|
39
39
|
/**
|
|
40
40
|
*
|
|
41
|
-
* @type {object}
|
|
41
|
+
* @type {{ [key: string]: object; }}
|
|
42
42
|
* @memberof AddressBalanceResponse
|
|
43
43
|
*/
|
|
44
|
-
fungible_tokens: object;
|
|
44
|
+
fungible_tokens: { [key: string]: object; };
|
|
45
45
|
/**
|
|
46
46
|
*
|
|
47
|
-
* @type {object}
|
|
47
|
+
* @type {{ [key: string]: object; }}
|
|
48
48
|
* @memberof AddressBalanceResponse
|
|
49
49
|
*/
|
|
50
|
-
non_fungible_tokens: object;
|
|
50
|
+
non_fungible_tokens: { [key: string]: object; };
|
|
51
51
|
/**
|
|
52
52
|
*
|
|
53
53
|
* @type {AddressTokenOfferingLocked}
|
|
@@ -66,7 +66,7 @@ export function AddressBalanceResponseFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
66
66
|
}
|
|
67
67
|
return {
|
|
68
68
|
|
|
69
|
-
'stx':
|
|
69
|
+
'stx': StxBalanceFromJSON(json['stx']),
|
|
70
70
|
'fungible_tokens': json['fungible_tokens'],
|
|
71
71
|
'non_fungible_tokens': json['non_fungible_tokens'],
|
|
72
72
|
'token_offering_locked': !exists(json, 'token_offering_locked') ? undefined : AddressTokenOfferingLockedFromJSON(json['token_offering_locked']),
|
|
@@ -82,7 +82,7 @@ export function AddressBalanceResponseToJSON(value?: AddressBalanceResponse | nu
|
|
|
82
82
|
}
|
|
83
83
|
return {
|
|
84
84
|
|
|
85
|
-
'stx':
|
|
85
|
+
'stx': StxBalanceToJSON(value.stx),
|
|
86
86
|
'fungible_tokens': value.fungible_tokens,
|
|
87
87
|
'non_fungible_tokens': value.non_fungible_tokens,
|
|
88
88
|
'token_offering_locked': AddressTokenOfferingLockedToJSON(value.token_offering_locked),
|
|
@@ -24,7 +24,7 @@ export interface BnsNamesOwnByAddressResponse {
|
|
|
24
24
|
* @type {Array<string>}
|
|
25
25
|
* @memberof BnsNamesOwnByAddressResponse
|
|
26
26
|
*/
|
|
27
|
-
names
|
|
27
|
+
names: Array<string>;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export function BnsNamesOwnByAddressResponseFromJSON(json: any): BnsNamesOwnByAddressResponse {
|
|
@@ -37,7 +37,7 @@ export function BnsNamesOwnByAddressResponseFromJSONTyped(json: any, ignoreDiscr
|
|
|
37
37
|
}
|
|
38
38
|
return {
|
|
39
39
|
|
|
40
|
-
'names':
|
|
40
|
+
'names': json['names'],
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
TargetBlockTime,
|
|
18
|
+
TargetBlockTimeFromJSON,
|
|
19
|
+
TargetBlockTimeFromJSONTyped,
|
|
20
|
+
TargetBlockTimeToJSON,
|
|
21
21
|
} from './';
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -28,16 +28,16 @@ import {
|
|
|
28
28
|
export interface NetworkBlockTimesResponse {
|
|
29
29
|
/**
|
|
30
30
|
*
|
|
31
|
-
* @type {
|
|
31
|
+
* @type {TargetBlockTime}
|
|
32
32
|
* @memberof NetworkBlockTimesResponse
|
|
33
33
|
*/
|
|
34
|
-
mainnet:
|
|
34
|
+
mainnet: TargetBlockTime;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
|
-
* @type {
|
|
37
|
+
* @type {TargetBlockTime}
|
|
38
38
|
* @memberof NetworkBlockTimesResponse
|
|
39
39
|
*/
|
|
40
|
-
testnet:
|
|
40
|
+
testnet: TargetBlockTime;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export function NetworkBlockTimesResponseFromJSON(json: any): NetworkBlockTimesResponse {
|
|
@@ -50,8 +50,8 @@ export function NetworkBlockTimesResponseFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
50
50
|
}
|
|
51
51
|
return {
|
|
52
52
|
|
|
53
|
-
'mainnet':
|
|
54
|
-
'testnet':
|
|
53
|
+
'mainnet': TargetBlockTimeFromJSON(json['mainnet']),
|
|
54
|
+
'testnet': TargetBlockTimeFromJSON(json['testnet']),
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -64,8 +64,8 @@ export function NetworkBlockTimesResponseToJSON(value?: NetworkBlockTimesRespons
|
|
|
64
64
|
}
|
|
65
65
|
return {
|
|
66
66
|
|
|
67
|
-
'mainnet':
|
|
68
|
-
'testnet':
|
|
67
|
+
'mainnet': TargetBlockTimeToJSON(value.mainnet),
|
|
68
|
+
'testnet': TargetBlockTimeToJSON(value.testnet),
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -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
|
+
* The block_identifier uniquely identifies a block in a particular network.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface RosettaGenesisBlockIdentifier
|
|
20
|
+
*/
|
|
21
|
+
export interface RosettaGenesisBlockIdentifier {
|
|
22
|
+
/**
|
|
23
|
+
* This is also known as the block height.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof RosettaGenesisBlockIdentifier
|
|
26
|
+
*/
|
|
27
|
+
index: number;
|
|
28
|
+
/**
|
|
29
|
+
* Block hash
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RosettaGenesisBlockIdentifier
|
|
32
|
+
*/
|
|
33
|
+
hash: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function RosettaGenesisBlockIdentifierFromJSON(json: any): RosettaGenesisBlockIdentifier {
|
|
37
|
+
return RosettaGenesisBlockIdentifierFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function RosettaGenesisBlockIdentifierFromJSONTyped(json: any, ignoreDiscriminator: boolean): RosettaGenesisBlockIdentifier {
|
|
41
|
+
if ((json === undefined) || (json === null)) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
|
|
46
|
+
'index': json['index'],
|
|
47
|
+
'hash': json['hash'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function RosettaGenesisBlockIdentifierToJSON(value?: RosettaGenesisBlockIdentifier | null): any {
|
|
52
|
+
if (value === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (value === null) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'index': value.index,
|
|
61
|
+
'hash': value.hash,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
RosettaGenesisBlockIdentifier,
|
|
18
|
+
RosettaGenesisBlockIdentifierFromJSON,
|
|
19
|
+
RosettaGenesisBlockIdentifierFromJSONTyped,
|
|
20
|
+
RosettaGenesisBlockIdentifierToJSON,
|
|
21
|
+
RosettaOldestBlockIdentifier,
|
|
22
|
+
RosettaOldestBlockIdentifierFromJSON,
|
|
23
|
+
RosettaOldestBlockIdentifierFromJSONTyped,
|
|
24
|
+
RosettaOldestBlockIdentifierToJSON,
|
|
25
|
+
RosettaPeers,
|
|
26
|
+
RosettaPeersFromJSON,
|
|
27
|
+
RosettaPeersFromJSONTyped,
|
|
28
|
+
RosettaPeersToJSON,
|
|
29
|
+
RosettaSyncStatus,
|
|
30
|
+
RosettaSyncStatusFromJSON,
|
|
31
|
+
RosettaSyncStatusFromJSONTyped,
|
|
32
|
+
RosettaSyncStatusToJSON,
|
|
33
|
+
} from './';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* NetworkStatusResponse contains basic information about the node's view of a blockchain network. It is assumed that any BlockIdentifier.Index less than or equal to CurrentBlockIdentifier.Index can be queried. If a Rosetta implementation prunes historical state, it should populate the optional oldest_block_identifier field with the oldest block available to query. If this is not populated, it is assumed that the genesis_block_identifier is the oldest queryable block. If a Rosetta implementation performs some pre-sync before it is possible to query blocks, sync_status should be populated so that clients can still monitor healthiness. Without this field, it may appear that the implementation is stuck syncing and needs to be terminated.
|
|
37
|
+
* @export
|
|
38
|
+
* @interface RosettaNetworkStatusResponse
|
|
39
|
+
*/
|
|
40
|
+
export interface RosettaNetworkStatusResponse {
|
|
41
|
+
/**
|
|
42
|
+
* The block_identifier uniquely identifies a block in a particular network.
|
|
43
|
+
* @type {object}
|
|
44
|
+
* @memberof RosettaNetworkStatusResponse
|
|
45
|
+
*/
|
|
46
|
+
current_block_identifier: object | null;
|
|
47
|
+
/**
|
|
48
|
+
* The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in milliseconds because some blockchains produce blocks more often than once a second.
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof RosettaNetworkStatusResponse
|
|
51
|
+
*/
|
|
52
|
+
current_block_timestamp: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {RosettaGenesisBlockIdentifier}
|
|
56
|
+
* @memberof RosettaNetworkStatusResponse
|
|
57
|
+
*/
|
|
58
|
+
genesis_block_identifier: RosettaGenesisBlockIdentifier;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {RosettaOldestBlockIdentifier}
|
|
62
|
+
* @memberof RosettaNetworkStatusResponse
|
|
63
|
+
*/
|
|
64
|
+
oldest_block_identifier?: RosettaOldestBlockIdentifier;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {RosettaSyncStatus}
|
|
68
|
+
* @memberof RosettaNetworkStatusResponse
|
|
69
|
+
*/
|
|
70
|
+
sync_status?: RosettaSyncStatus;
|
|
71
|
+
/**
|
|
72
|
+
* Peers information
|
|
73
|
+
* @type {Array<RosettaPeers>}
|
|
74
|
+
* @memberof RosettaNetworkStatusResponse
|
|
75
|
+
*/
|
|
76
|
+
peers: Array<RosettaPeers>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function RosettaNetworkStatusResponseFromJSON(json: any): RosettaNetworkStatusResponse {
|
|
80
|
+
return RosettaNetworkStatusResponseFromJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function RosettaNetworkStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RosettaNetworkStatusResponse {
|
|
84
|
+
if ((json === undefined) || (json === null)) {
|
|
85
|
+
return json;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'current_block_identifier': json['current_block_identifier'],
|
|
90
|
+
'current_block_timestamp': json['current_block_timestamp'],
|
|
91
|
+
'genesis_block_identifier': RosettaGenesisBlockIdentifierFromJSON(json['genesis_block_identifier']),
|
|
92
|
+
'oldest_block_identifier': !exists(json, 'oldest_block_identifier') ? undefined : RosettaOldestBlockIdentifierFromJSON(json['oldest_block_identifier']),
|
|
93
|
+
'sync_status': !exists(json, 'sync_status') ? undefined : RosettaSyncStatusFromJSON(json['sync_status']),
|
|
94
|
+
'peers': ((json['peers'] as Array<any>).map(RosettaPeersFromJSON)),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function RosettaNetworkStatusResponseToJSON(value?: RosettaNetworkStatusResponse | null): any {
|
|
99
|
+
if (value === undefined) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
if (value === null) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
|
|
107
|
+
'current_block_identifier': value.current_block_identifier,
|
|
108
|
+
'current_block_timestamp': value.current_block_timestamp,
|
|
109
|
+
'genesis_block_identifier': RosettaGenesisBlockIdentifierToJSON(value.genesis_block_identifier),
|
|
110
|
+
'oldest_block_identifier': RosettaOldestBlockIdentifierToJSON(value.oldest_block_identifier),
|
|
111
|
+
'sync_status': RosettaSyncStatusToJSON(value.sync_status),
|
|
112
|
+
'peers': ((value.peers as Array<any>).map(RosettaPeersToJSON)),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
@@ -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
|
+
* The block_identifier uniquely identifies a block in a particular network.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface RosettaOldestBlockIdentifier
|
|
20
|
+
*/
|
|
21
|
+
export interface RosettaOldestBlockIdentifier {
|
|
22
|
+
/**
|
|
23
|
+
* This is also known as the block height.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof RosettaOldestBlockIdentifier
|
|
26
|
+
*/
|
|
27
|
+
index: number;
|
|
28
|
+
/**
|
|
29
|
+
* Block hash
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RosettaOldestBlockIdentifier
|
|
32
|
+
*/
|
|
33
|
+
hash: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function RosettaOldestBlockIdentifierFromJSON(json: any): RosettaOldestBlockIdentifier {
|
|
37
|
+
return RosettaOldestBlockIdentifierFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function RosettaOldestBlockIdentifierFromJSONTyped(json: any, ignoreDiscriminator: boolean): RosettaOldestBlockIdentifier {
|
|
41
|
+
if ((json === undefined) || (json === null)) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
|
|
46
|
+
'index': json['index'],
|
|
47
|
+
'hash': json['hash'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function RosettaOldestBlockIdentifierToJSON(value?: RosettaOldestBlockIdentifier | null): any {
|
|
52
|
+
if (value === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (value === null) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'index': value.index,
|
|
61
|
+
'hash': value.hash,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -33,10 +33,10 @@ export interface RosettaOptions {
|
|
|
33
33
|
type?: string;
|
|
34
34
|
/**
|
|
35
35
|
* This value indicates the state of the operations
|
|
36
|
-
* @type {
|
|
36
|
+
* @type {string}
|
|
37
37
|
* @memberof RosettaOptions
|
|
38
38
|
*/
|
|
39
|
-
status?:
|
|
39
|
+
status?: string;
|
|
40
40
|
/**
|
|
41
41
|
* Recipient's address
|
|
42
42
|
* @type {string}
|
|
@@ -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
|
+
* A Peer is a representation of a node's peer.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface RosettaPeers
|
|
20
|
+
*/
|
|
21
|
+
export interface RosettaPeers {
|
|
22
|
+
/**
|
|
23
|
+
* peer id
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof RosettaPeers
|
|
26
|
+
*/
|
|
27
|
+
peer_id: string;
|
|
28
|
+
/**
|
|
29
|
+
* meta data
|
|
30
|
+
* @type {object}
|
|
31
|
+
* @memberof RosettaPeers
|
|
32
|
+
*/
|
|
33
|
+
metadata?: object;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function RosettaPeersFromJSON(json: any): RosettaPeers {
|
|
37
|
+
return RosettaPeersFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function RosettaPeersFromJSONTyped(json: any, ignoreDiscriminator: boolean): RosettaPeers {
|
|
41
|
+
if ((json === undefined) || (json === null)) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
|
|
46
|
+
'peer_id': json['peer_id'],
|
|
47
|
+
'metadata': !exists(json, 'metadata') ? undefined : json['metadata'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function RosettaPeersToJSON(value?: RosettaPeers | null): any {
|
|
52
|
+
if (value === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (value === null) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'peer_id': value.peer_id,
|
|
61
|
+
'metadata': value.metadata,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|