@dashevo/evo-sdk 2.1.3 → 3.0.0-dev.10

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.
@@ -28,19 +28,17 @@ export class DpnsFacade {
28
28
  const w = await this.sdk.getWasmSdkConnected();
29
29
  return w.dpnsRegisterName(label, identityId, publicKeyId, privateKeyWif, onPreorder ?? null);
30
30
  }
31
- async usernames(identityId, opts = {}) {
32
- const { limit } = opts;
31
+ async usernames(query) {
33
32
  const w = await this.sdk.getWasmSdkConnected();
34
- return w.getDpnsUsernames(identityId, limit ?? null);
33
+ return w.getDpnsUsernames(query);
35
34
  }
36
35
  async username(identityId) {
37
36
  const w = await this.sdk.getWasmSdkConnected();
38
37
  return w.getDpnsUsername(identityId);
39
38
  }
40
- async usernamesWithProof(identityId, opts = {}) {
41
- const { limit } = opts;
39
+ async usernamesWithProof(query) {
42
40
  const w = await this.sdk.getWasmSdkConnected();
43
- return w.getDpnsUsernamesWithProofInfo(identityId, limit ?? null);
41
+ return w.getDpnsUsernamesWithProofInfo(query);
44
42
  }
45
43
  async usernameWithProof(identityId) {
46
44
  const w = await this.sdk.getWasmSdkConnected();
@@ -1,39 +1,17 @@
1
+ import * as wasm from '../wasm.js';
1
2
  import type { EvoSDK } from '../sdk.js';
3
+ import type { EpochsQuery, FinalizedEpochsQuery, EvonodeProposedBlocksRangeQuery } from '../wasm.js';
2
4
  export declare class EpochFacade {
3
5
  private sdk;
4
6
  constructor(sdk: EvoSDK);
5
- epochsInfo(params?: {
6
- startEpoch?: number;
7
- count?: number;
8
- ascending?: boolean;
9
- }): Promise<any>;
10
- epochsInfoWithProof(params?: {
11
- startEpoch?: number;
12
- count?: number;
13
- ascending?: boolean;
14
- }): Promise<any>;
15
- finalizedInfos(params?: {
16
- startEpoch?: number;
17
- count?: number;
18
- ascending?: boolean;
19
- }): Promise<any>;
20
- finalizedInfosWithProof(params?: {
21
- startEpoch?: number;
22
- count?: number;
23
- ascending?: boolean;
24
- }): Promise<any>;
25
- current(): Promise<any>;
26
- currentWithProof(): Promise<any>;
27
- evonodesProposedBlocksByIds(epoch: number, ids: string[]): Promise<any>;
28
- evonodesProposedBlocksByIdsWithProof(epoch: number, ids: string[]): Promise<any>;
29
- evonodesProposedBlocksByRange(epoch: number, opts?: {
30
- limit?: number;
31
- startAfter?: string;
32
- orderAscending?: boolean;
33
- }): Promise<any>;
34
- evonodesProposedBlocksByRangeWithProof(epoch: number, opts?: {
35
- limit?: number;
36
- startAfter?: string;
37
- orderAscending?: boolean;
38
- }): Promise<any>;
7
+ epochsInfo(query?: EpochsQuery): Promise<Map<number, wasm.ExtendedEpochInfo | undefined>>;
8
+ epochsInfoWithProof(query?: EpochsQuery): Promise<wasm.ProofMetadataResponseTyped<Map<number, wasm.ExtendedEpochInfo | undefined>>>;
9
+ finalizedInfos(query: FinalizedEpochsQuery): Promise<Map<number, wasm.FinalizedEpochInfo | undefined>>;
10
+ finalizedInfosWithProof(query: FinalizedEpochsQuery): Promise<wasm.ProofMetadataResponseTyped<Map<number, wasm.FinalizedEpochInfo | undefined>>>;
11
+ current(): Promise<wasm.ExtendedEpochInfo>;
12
+ currentWithProof(): Promise<wasm.ProofMetadataResponseTyped<wasm.ExtendedEpochInfo>>;
13
+ evonodesProposedBlocksByIds(epoch: number, ids: string[]): Promise<Map<wasm.Identifier, bigint>>;
14
+ evonodesProposedBlocksByIdsWithProof(epoch: number, ids: string[]): Promise<wasm.ProofMetadataResponseTyped<unknown>>;
15
+ evonodesProposedBlocksByRange(query: EvonodeProposedBlocksRangeQuery): Promise<Map<wasm.Identifier, bigint>>;
16
+ evonodesProposedBlocksByRangeWithProof(query: EvonodeProposedBlocksRangeQuery): Promise<wasm.ProofMetadataResponseTyped<unknown>>;
39
17
  }
@@ -1,27 +1,26 @@
1
1
  export class EpochFacade {
2
2
  constructor(sdk) { this.sdk = sdk; }
3
- async epochsInfo(params = {}) {
4
- const { startEpoch, count, ascending } = params;
3
+ async epochsInfo(query = {}) {
5
4
  const w = await this.sdk.getWasmSdkConnected();
6
- return w.getEpochsInfo(startEpoch ?? null, count ?? null, ascending ?? null);
5
+ return w.getEpochsInfo(query);
7
6
  }
8
- async epochsInfoWithProof(params = {}) {
9
- const { startEpoch, count, ascending } = params;
7
+ async epochsInfoWithProof(query = {}) {
10
8
  const w = await this.sdk.getWasmSdkConnected();
11
- return w.getEpochsInfoWithProofInfo(startEpoch ?? null, count ?? null, ascending ?? null);
9
+ return w.getEpochsInfoWithProofInfo(query);
12
10
  }
13
- async finalizedInfos(params = {}) {
14
- const { startEpoch, count, ascending } = params;
11
+ async finalizedInfos(query) {
15
12
  const w = await this.sdk.getWasmSdkConnected();
16
- return w.getFinalizedEpochInfos(startEpoch ?? null, count ?? null, ascending ?? null);
13
+ return w.getFinalizedEpochInfos(query);
17
14
  }
18
- async finalizedInfosWithProof(params = {}) {
19
- const { startEpoch, count, ascending } = params;
15
+ async finalizedInfosWithProof(query) {
20
16
  const w = await this.sdk.getWasmSdkConnected();
21
- return w.getFinalizedEpochInfosWithProofInfo(startEpoch ?? null, count ?? null, ascending ?? null);
17
+ return w.getFinalizedEpochInfosWithProofInfo(query);
22
18
  }
23
19
  async current() { const w = await this.sdk.getWasmSdkConnected(); return w.getCurrentEpoch(); }
24
- async currentWithProof() { const w = await this.sdk.getWasmSdkConnected(); return w.getCurrentEpochWithProofInfo(); }
20
+ async currentWithProof() {
21
+ const w = await this.sdk.getWasmSdkConnected();
22
+ return w.getCurrentEpochWithProofInfo();
23
+ }
25
24
  async evonodesProposedBlocksByIds(epoch, ids) {
26
25
  const w = await this.sdk.getWasmSdkConnected();
27
26
  return w.getEvonodesProposedEpochBlocksByIds(epoch, ids);
@@ -30,14 +29,12 @@ export class EpochFacade {
30
29
  const w = await this.sdk.getWasmSdkConnected();
31
30
  return w.getEvonodesProposedEpochBlocksByIdsWithProofInfo(epoch, ids);
32
31
  }
33
- async evonodesProposedBlocksByRange(epoch, opts = {}) {
34
- const { limit, startAfter, orderAscending } = opts;
32
+ async evonodesProposedBlocksByRange(query) {
35
33
  const w = await this.sdk.getWasmSdkConnected();
36
- return w.getEvonodesProposedEpochBlocksByRange(epoch, limit ?? null, startAfter ?? null, orderAscending ?? null);
34
+ return w.getEvonodesProposedEpochBlocksByRange(query);
37
35
  }
38
- async evonodesProposedBlocksByRangeWithProof(epoch, opts = {}) {
39
- const { limit, startAfter, orderAscending } = opts;
36
+ async evonodesProposedBlocksByRangeWithProof(query) {
40
37
  const w = await this.sdk.getWasmSdkConnected();
41
- return w.getEvonodesProposedEpochBlocksByRangeWithProofInfo(epoch, limit ?? null, startAfter ?? null, orderAscending ?? null);
38
+ return w.getEvonodesProposedEpochBlocksByRangeWithProofInfo(query);
42
39
  }
43
40
  }