Skip to content

Commit 2505e39

Browse files
authored
Merge pull request #48 from maestro-org/feat/chang-compatibility
feat: chang compatibility
2 parents 277ccda + d93f4ec commit 2505e39

File tree

5 files changed

+722
-772
lines changed

5 files changed

+722
-772
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@maestro-org/typescript-sdk",
3-
"version": "1.5.6",
3+
"version": "1.6.1",
44
"description": "TypeScript SDK for the Maestro Dapp Platform",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",

src/api/general/helpers.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ export const GeneralApiAxiosParamCreator = (configuration: Configuration) => ({
4747
};
4848
},
4949
/**
50-
* Returns the blockchain era history
51-
* @summary Era history
50+
* Returns the blockchain era summaries
51+
* @summary Era summaries
5252
* @param {*} [options] Override http request option.
5353
* @throws {RequiredError}
5454
*/
55-
eraHistory: (options: AxiosRequestConfig = {}): RequestArgs => {
56-
const localVarPath = `/era-history`;
55+
eraSummaries: (options: AxiosRequestConfig = {}): RequestArgs => {
56+
const localVarPath = `/era-summaries`;
5757
// use dummy base URL string because the URL constructor only accepts absolute URLs.
5858
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5959
const { baseOptions } = configuration;
@@ -162,13 +162,13 @@ export const GeneralApiFp = (configuration: Configuration) => {
162162
return createRequestFunction(localVarAxiosArgs, configuration);
163163
},
164164
/**
165-
* Returns the blockchain era history
166-
* @summary Era history
165+
* Returns the blockchain era summaries
166+
* @summary Era summaries
167167
* @param {*} [options] Override http request option.
168168
* @throws {RequiredError}
169169
*/
170-
eraHistory(options?: AxiosRequestConfig): () => Promise<TimestampedEraSummaries> {
171-
const localVarAxiosArgs = localVarAxiosParamCreator.eraHistory(options);
170+
eraSummaries(options?: AxiosRequestConfig): () => Promise<TimestampedEraSummaries> {
171+
const localVarAxiosArgs = localVarAxiosParamCreator.eraSummaries(options);
172172
return createRequestFunction(localVarAxiosArgs, configuration);
173173
},
174174
/**

src/api/general/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ export class GeneralApi extends BaseAPI {
2121
}
2222

2323
/**
24-
* Returns the blockchain era history
25-
* @summary Era history
24+
* Returns the blockchain era summaries
25+
* @summary Era summaries
2626
* @param {*} [options] Override http request option.
2727
* @throws {RequiredError}
2828
* @memberof GeneralApi
2929
*/
30-
public eraHistory(options?: AxiosRequestConfig) {
31-
return GeneralApiFp(this.configuration).eraHistory(options)();
30+
public eraSummaries(options?: AxiosRequestConfig) {
31+
return GeneralApiFp(this.configuration).eraSummaries(options)();
3232
}
3333

3434
/**

src/api/type.ts

Lines changed: 64 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ export type AccountAction = (typeof AccountAction)[keyof typeof AccountAction];
2121
* @interface AccountDelegationHistory
2222
*/
2323
export interface AccountDelegationHistory {
24-
/**
25-
* Epoch number in which the delegation becomes active
26-
* @type {number}
27-
* @memberof AccountDelegationHistory
28-
*/
29-
active_epoch_no: number;
3024
/**
3125
* Bech32 encoded pool ID the account was delegated to
3226
* @type {string}
@@ -679,31 +673,6 @@ export interface BlockInfo {
679673
* @interface BlockInfoProtocolVersionInner
680674
*/
681675
export interface BlockInfoProtocolVersionInner {}
682-
/**
683-
*
684-
* @export
685-
* @interface Bound
686-
*/
687-
export interface Bound {
688-
/**
689-
*
690-
* @type {number}
691-
* @memberof Bound
692-
*/
693-
epoch: number;
694-
/**
695-
*
696-
* @type {number}
697-
* @memberof Bound
698-
*/
699-
slot: number;
700-
/**
701-
*
702-
* @type {number}
703-
* @memberof Bound
704-
*/
705-
time: number;
706-
}
707676

708677
/**
709678
*
@@ -1070,12 +1039,6 @@ export type DatumOptionType = (typeof DatumOptionType)[keyof typeof DatumOptionT
10701039
* @interface DelegatorInfo
10711040
*/
10721041
export interface DelegatorInfo {
1073-
/**
1074-
* Epoch at which the delegation becomes active
1075-
* @type {number}
1076-
* @memberof DelegatorInfo
1077-
*/
1078-
active_epoch_no?: number | null;
10791042
/**
10801043
* Delegator live stake
10811044
* @type {number}
@@ -1156,6 +1119,61 @@ export interface EpochInfo {
11561119
*/
11571120
tx_count: number;
11581121
}
1122+
1123+
/**
1124+
*
1125+
* @export
1126+
* @interface EraTime
1127+
*/
1128+
export interface EraTime {
1129+
/**
1130+
*
1131+
* @type {number}
1132+
* @memberof EraTime
1133+
*/
1134+
seconds: number;
1135+
}
1136+
1137+
/**
1138+
*
1139+
* @export
1140+
* @interface EraBound
1141+
*/
1142+
export interface EraBound {
1143+
/**
1144+
*
1145+
* @type {number}
1146+
* @memberof EraBound
1147+
*/
1148+
epoch: number;
1149+
/**
1150+
*
1151+
* @type {number}
1152+
* @memberof EraBound
1153+
*/
1154+
slot: number;
1155+
/**
1156+
*
1157+
* @type {EraTime}
1158+
* @memberof EraBound
1159+
*/
1160+
time: EraTime;
1161+
}
1162+
1163+
/**
1164+
*
1165+
* @export
1166+
* @interface SlotLength
1167+
*/
1168+
export interface SlotLength {
1169+
/**
1170+
*
1171+
* @type {number}
1172+
* @memberof SlotLength
1173+
*/
1174+
milliseconds: number;
1175+
}
1176+
11591177
/**
11601178
*
11611179
* @export
@@ -1170,17 +1188,18 @@ export interface EraParameters {
11701188
epoch_length: number;
11711189
/**
11721190
*
1173-
* @type {number}
1191+
* @type {SlotLength}
11741192
* @memberof EraParameters
11751193
*/
1176-
safe_zone?: number | null;
1194+
slot_length: SlotLength;
11771195
/**
11781196
*
11791197
* @type {number}
11801198
* @memberof EraParameters
11811199
*/
1182-
slot_length: number;
1200+
safe_zone: number;
11831201
}
1202+
11841203
/**
11851204
*
11861205
* @export
@@ -1189,10 +1208,10 @@ export interface EraParameters {
11891208
export interface EraSummary {
11901209
/**
11911210
*
1192-
* @type {Bound}
1211+
* @type {EraBound}
11931212
* @memberof EraSummary
11941213
*/
1195-
end?: Bound | null;
1214+
end: EraBound;
11961215
/**
11971216
*
11981217
* @type {EraParameters}
@@ -1201,11 +1220,12 @@ export interface EraSummary {
12011220
parameters: EraParameters;
12021221
/**
12031222
*
1204-
* @type {Bound}
1223+
* @type {EraBound}
12051224
* @memberof EraSummary
12061225
*/
1207-
start: Bound;
1226+
start: EraBound;
12081227
}
1228+
12091229
/**
12101230
* Execution units for Plutus scripts
12111231
* @export
@@ -2346,12 +2366,6 @@ export interface PoolHistory {
23462366
* @interface PoolInfo
23472367
*/
23482368
export interface PoolInfo {
2349-
/**
2350-
* Epoch when the update takes effect
2351-
* @type {number}
2352-
* @memberof PoolInfo
2353-
*/
2354-
active_epoch_no: number;
23552369
/**
23562370
* Active stake
23572371
* @type {string}
@@ -2701,12 +2715,6 @@ export interface PoolRetireCert {
27012715
* @interface PoolUpdate
27022716
*/
27032717
export interface PoolUpdate {
2704-
/**
2705-
* Epoch when the update takes effect
2706-
* @type {number}
2707-
* @memberof PoolUpdate
2708-
*/
2709-
active_epoch_no: number;
27102718
/**
27112719
* UNIX timestamp of the block containing the transaction
27122720
* @type {number}

0 commit comments

Comments
 (0)