Skip to content

Commit

Permalink
Merge pull request #48 from maestro-org/feat/chang-compatibility
Browse files Browse the repository at this point in the history
feat: chang compatibility
  • Loading branch information
Vardominator authored Aug 28, 2024
2 parents 277ccda + d93f4ec commit 2505e39
Show file tree
Hide file tree
Showing 5 changed files with 722 additions and 772 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@maestro-org/typescript-sdk",
"version": "1.5.6",
"version": "1.6.1",
"description": "TypeScript SDK for the Maestro Dapp Platform",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
16 changes: 8 additions & 8 deletions src/api/general/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ export const GeneralApiAxiosParamCreator = (configuration: Configuration) => ({
};
},
/**
* Returns the blockchain era history
* @summary Era history
* Returns the blockchain era summaries
* @summary Era summaries
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eraHistory: (options: AxiosRequestConfig = {}): RequestArgs => {
const localVarPath = `/era-history`;
eraSummaries: (options: AxiosRequestConfig = {}): RequestArgs => {
const localVarPath = `/era-summaries`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
const { baseOptions } = configuration;
Expand Down Expand Up @@ -162,13 +162,13 @@ export const GeneralApiFp = (configuration: Configuration) => {
return createRequestFunction(localVarAxiosArgs, configuration);
},
/**
* Returns the blockchain era history
* @summary Era history
* Returns the blockchain era summaries
* @summary Era summaries
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eraHistory(options?: AxiosRequestConfig): () => Promise<TimestampedEraSummaries> {
const localVarAxiosArgs = localVarAxiosParamCreator.eraHistory(options);
eraSummaries(options?: AxiosRequestConfig): () => Promise<TimestampedEraSummaries> {
const localVarAxiosArgs = localVarAxiosParamCreator.eraSummaries(options);
return createRequestFunction(localVarAxiosArgs, configuration);
},
/**
Expand Down
8 changes: 4 additions & 4 deletions src/api/general/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ export class GeneralApi extends BaseAPI {
}

/**
* Returns the blockchain era history
* @summary Era history
* Returns the blockchain era summaries
* @summary Era summaries
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof GeneralApi
*/
public eraHistory(options?: AxiosRequestConfig) {
return GeneralApiFp(this.configuration).eraHistory(options)();
public eraSummaries(options?: AxiosRequestConfig) {
return GeneralApiFp(this.configuration).eraSummaries(options)();
}

/**
Expand Down
120 changes: 64 additions & 56 deletions src/api/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ export type AccountAction = (typeof AccountAction)[keyof typeof AccountAction];
* @interface AccountDelegationHistory
*/
export interface AccountDelegationHistory {
/**
* Epoch number in which the delegation becomes active
* @type {number}
* @memberof AccountDelegationHistory
*/
active_epoch_no: number;
/**
* Bech32 encoded pool ID the account was delegated to
* @type {string}
Expand Down Expand Up @@ -679,31 +673,6 @@ export interface BlockInfo {
* @interface BlockInfoProtocolVersionInner
*/
export interface BlockInfoProtocolVersionInner {}
/**
*
* @export
* @interface Bound
*/
export interface Bound {
/**
*
* @type {number}
* @memberof Bound
*/
epoch: number;
/**
*
* @type {number}
* @memberof Bound
*/
slot: number;
/**
*
* @type {number}
* @memberof Bound
*/
time: number;
}

/**
*
Expand Down Expand Up @@ -1070,12 +1039,6 @@ export type DatumOptionType = (typeof DatumOptionType)[keyof typeof DatumOptionT
* @interface DelegatorInfo
*/
export interface DelegatorInfo {
/**
* Epoch at which the delegation becomes active
* @type {number}
* @memberof DelegatorInfo
*/
active_epoch_no?: number | null;
/**
* Delegator live stake
* @type {number}
Expand Down Expand Up @@ -1156,6 +1119,61 @@ export interface EpochInfo {
*/
tx_count: number;
}

/**
*
* @export
* @interface EraTime
*/
export interface EraTime {
/**
*
* @type {number}
* @memberof EraTime
*/
seconds: number;
}

/**
*
* @export
* @interface EraBound
*/
export interface EraBound {
/**
*
* @type {number}
* @memberof EraBound
*/
epoch: number;
/**
*
* @type {number}
* @memberof EraBound
*/
slot: number;
/**
*
* @type {EraTime}
* @memberof EraBound
*/
time: EraTime;
}

/**
*
* @export
* @interface SlotLength
*/
export interface SlotLength {
/**
*
* @type {number}
* @memberof SlotLength
*/
milliseconds: number;
}

/**
*
* @export
Expand All @@ -1170,17 +1188,18 @@ export interface EraParameters {
epoch_length: number;
/**
*
* @type {number}
* @type {SlotLength}
* @memberof EraParameters
*/
safe_zone?: number | null;
slot_length: SlotLength;
/**
*
* @type {number}
* @memberof EraParameters
*/
slot_length: number;
safe_zone: number;
}

/**
*
* @export
Expand All @@ -1189,10 +1208,10 @@ export interface EraParameters {
export interface EraSummary {
/**
*
* @type {Bound}
* @type {EraBound}
* @memberof EraSummary
*/
end?: Bound | null;
end: EraBound;
/**
*
* @type {EraParameters}
Expand All @@ -1201,11 +1220,12 @@ export interface EraSummary {
parameters: EraParameters;
/**
*
* @type {Bound}
* @type {EraBound}
* @memberof EraSummary
*/
start: Bound;
start: EraBound;
}

/**
* Execution units for Plutus scripts
* @export
Expand Down Expand Up @@ -2346,12 +2366,6 @@ export interface PoolHistory {
* @interface PoolInfo
*/
export interface PoolInfo {
/**
* Epoch when the update takes effect
* @type {number}
* @memberof PoolInfo
*/
active_epoch_no: number;
/**
* Active stake
* @type {string}
Expand Down Expand Up @@ -2701,12 +2715,6 @@ export interface PoolRetireCert {
* @interface PoolUpdate
*/
export interface PoolUpdate {
/**
* Epoch when the update takes effect
* @type {number}
* @memberof PoolUpdate
*/
active_epoch_no: number;
/**
* UNIX timestamp of the block containing the transaction
* @type {number}
Expand Down
Loading

0 comments on commit 2505e39

Please sign in to comment.