@dashevo/evo-sdk 2.1.3 → 2.2.0-dev.2
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/dist/contracts/facade.d.ts +9 -17
- package/dist/contracts/facade.js +4 -6
- package/dist/documents/facade.d.ts +23 -38
- package/dist/documents/facade.js +4 -10
- package/dist/dpns/facade.d.ts +10 -13
- package/dist/dpns/facade.js +4 -6
- package/dist/epoch/facade.d.ts +12 -34
- package/dist/epoch/facade.js +16 -19
- package/dist/evo-sdk.module.js +1 -1
- package/dist/evo-sdk.module.js.map +1 -1
- package/dist/group/facade.d.ts +19 -72
- package/dist/group/facade.js +28 -38
- package/dist/identities/facade.d.ts +28 -53
- package/dist/identities/facade.js +12 -21
- package/dist/protocol/facade.d.ts +5 -10
- package/dist/protocol/facade.js +10 -6
- package/dist/system/facade.d.ts +10 -9
- package/dist/system/facade.js +36 -9
- package/dist/tokens/facade.d.ts +46 -48
- package/dist/tokens/facade.js +2 -2
- package/dist/voting/facade.d.ts +10 -46
- package/dist/voting/facade.js +12 -20
- package/dist/wallet/functions.d.ts +16 -15
- package/dist/wallet/functions.js +10 -10
- package/package.json +2 -2
|
@@ -3,29 +3,21 @@ import type { EvoSDK } from '../sdk.js';
|
|
|
3
3
|
export declare class ContractsFacade {
|
|
4
4
|
private sdk;
|
|
5
5
|
constructor(sdk: EvoSDK);
|
|
6
|
-
fetch(contractId:
|
|
7
|
-
fetchWithProof(contractId:
|
|
8
|
-
getHistory(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}): Promise<any>;
|
|
13
|
-
getHistoryWithProof(args: {
|
|
14
|
-
contractId: string;
|
|
15
|
-
limit?: number;
|
|
16
|
-
startAtMs?: number | bigint;
|
|
17
|
-
}): Promise<any>;
|
|
18
|
-
getMany(contractIds: string[]): Promise<any>;
|
|
19
|
-
getManyWithProof(contractIds: string[]): Promise<any>;
|
|
6
|
+
fetch(contractId: wasm.IdentifierLike): Promise<wasm.DataContract | undefined>;
|
|
7
|
+
fetchWithProof(contractId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.DataContract>>;
|
|
8
|
+
getHistory(query: wasm.DataContractHistoryQuery): Promise<Map<bigint, wasm.DataContract>>;
|
|
9
|
+
getHistoryWithProof(query: wasm.DataContractHistoryQuery): Promise<wasm.ProofMetadataResponseTyped<Map<bigint, wasm.DataContract>>>;
|
|
10
|
+
getMany(contractIds: wasm.IdentifierLike[]): Promise<Map<wasm.Identifier, wasm.DataContract | undefined>>;
|
|
11
|
+
getManyWithProof(contractIds: wasm.IdentifierLike[]): Promise<wasm.ProofMetadataResponseTyped<Map<wasm.Identifier, wasm.DataContract | undefined>>>;
|
|
20
12
|
create(args: {
|
|
21
|
-
ownerId:
|
|
13
|
+
ownerId: wasm.IdentifierLike;
|
|
22
14
|
definition: unknown;
|
|
23
15
|
privateKeyWif: string;
|
|
24
16
|
keyId?: number;
|
|
25
17
|
}): Promise<any>;
|
|
26
18
|
update(args: {
|
|
27
|
-
contractId:
|
|
28
|
-
ownerId:
|
|
19
|
+
contractId: wasm.IdentifierLike;
|
|
20
|
+
ownerId: wasm.IdentifierLike;
|
|
29
21
|
updates: unknown;
|
|
30
22
|
privateKeyWif: string;
|
|
31
23
|
keyId?: number;
|
package/dist/contracts/facade.js
CHANGED
|
@@ -11,15 +11,13 @@ export class ContractsFacade {
|
|
|
11
11
|
const w = await this.sdk.getWasmSdkConnected();
|
|
12
12
|
return w.getDataContractWithProofInfo(contractId);
|
|
13
13
|
}
|
|
14
|
-
async getHistory(
|
|
15
|
-
const { contractId, limit, startAtMs } = args;
|
|
14
|
+
async getHistory(query) {
|
|
16
15
|
const w = await this.sdk.getWasmSdkConnected();
|
|
17
|
-
return w.getDataContractHistory(
|
|
16
|
+
return w.getDataContractHistory(query);
|
|
18
17
|
}
|
|
19
|
-
async getHistoryWithProof(
|
|
20
|
-
const { contractId, limit, startAtMs } = args;
|
|
18
|
+
async getHistoryWithProof(query) {
|
|
21
19
|
const w = await this.sdk.getWasmSdkConnected();
|
|
22
|
-
return w.getDataContractHistoryWithProofInfo(
|
|
20
|
+
return w.getDataContractHistoryWithProofInfo(query);
|
|
23
21
|
}
|
|
24
22
|
async getMany(contractIds) {
|
|
25
23
|
const w = await this.sdk.getWasmSdkConnected();
|
|
@@ -1,72 +1,57 @@
|
|
|
1
|
+
import * as wasm from '../wasm.js';
|
|
1
2
|
import type { EvoSDK } from '../sdk.js';
|
|
2
3
|
export declare class DocumentsFacade {
|
|
3
4
|
private sdk;
|
|
4
5
|
constructor(sdk: EvoSDK);
|
|
5
|
-
query(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
orderBy?: unknown;
|
|
10
|
-
limit?: number;
|
|
11
|
-
startAfter?: string;
|
|
12
|
-
startAt?: string;
|
|
13
|
-
}): Promise<any>;
|
|
14
|
-
queryWithProof(params: {
|
|
15
|
-
contractId: string;
|
|
16
|
-
type: string;
|
|
17
|
-
where?: unknown;
|
|
18
|
-
orderBy?: unknown;
|
|
19
|
-
limit?: number;
|
|
20
|
-
startAfter?: string;
|
|
21
|
-
startAt?: string;
|
|
22
|
-
}): Promise<any>;
|
|
23
|
-
get(contractId: string, type: string, documentId: string): Promise<any>;
|
|
24
|
-
getWithProof(contractId: string, type: string, documentId: string): Promise<any>;
|
|
6
|
+
query(query: wasm.DocumentsQuery): Promise<Map<wasm.Identifier, wasm.Document | undefined>>;
|
|
7
|
+
queryWithProof(query: wasm.DocumentsQuery): Promise<wasm.ProofMetadataResponseTyped<Map<wasm.Identifier, wasm.Document | undefined>>>;
|
|
8
|
+
get(contractId: wasm.IdentifierLike, type: string, documentId: wasm.IdentifierLike): Promise<wasm.Document | undefined>;
|
|
9
|
+
getWithProof(contractId: wasm.IdentifierLike, type: string, documentId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.Document | undefined>>;
|
|
25
10
|
create(args: {
|
|
26
|
-
contractId:
|
|
11
|
+
contractId: wasm.IdentifierLike;
|
|
27
12
|
type: string;
|
|
28
|
-
ownerId:
|
|
13
|
+
ownerId: wasm.IdentifierLike;
|
|
29
14
|
data: unknown;
|
|
30
15
|
entropyHex: string;
|
|
31
16
|
privateKeyWif: string;
|
|
32
17
|
}): Promise<any>;
|
|
33
18
|
replace(args: {
|
|
34
|
-
contractId:
|
|
19
|
+
contractId: wasm.IdentifierLike;
|
|
35
20
|
type: string;
|
|
36
|
-
documentId:
|
|
37
|
-
ownerId:
|
|
21
|
+
documentId: wasm.IdentifierLike;
|
|
22
|
+
ownerId: wasm.IdentifierLike;
|
|
38
23
|
data: unknown;
|
|
39
24
|
revision: number | bigint;
|
|
40
25
|
privateKeyWif: string;
|
|
41
26
|
}): Promise<any>;
|
|
42
27
|
delete(args: {
|
|
43
|
-
contractId:
|
|
28
|
+
contractId: wasm.IdentifierLike;
|
|
44
29
|
type: string;
|
|
45
|
-
documentId:
|
|
46
|
-
ownerId:
|
|
30
|
+
documentId: wasm.IdentifierLike;
|
|
31
|
+
ownerId: wasm.IdentifierLike;
|
|
47
32
|
privateKeyWif: string;
|
|
48
33
|
}): Promise<any>;
|
|
49
34
|
transfer(args: {
|
|
50
|
-
contractId:
|
|
35
|
+
contractId: wasm.IdentifierLike;
|
|
51
36
|
type: string;
|
|
52
|
-
documentId:
|
|
53
|
-
ownerId:
|
|
54
|
-
recipientId:
|
|
37
|
+
documentId: wasm.IdentifierLike;
|
|
38
|
+
ownerId: wasm.IdentifierLike;
|
|
39
|
+
recipientId: wasm.IdentifierLike;
|
|
55
40
|
privateKeyWif: string;
|
|
56
41
|
}): Promise<any>;
|
|
57
42
|
purchase(args: {
|
|
58
|
-
contractId:
|
|
43
|
+
contractId: wasm.IdentifierLike;
|
|
59
44
|
type: string;
|
|
60
|
-
documentId:
|
|
61
|
-
buyerId:
|
|
45
|
+
documentId: wasm.IdentifierLike;
|
|
46
|
+
buyerId: wasm.IdentifierLike;
|
|
62
47
|
price: number | bigint | string;
|
|
63
48
|
privateKeyWif: string;
|
|
64
49
|
}): Promise<any>;
|
|
65
50
|
setPrice(args: {
|
|
66
|
-
contractId:
|
|
51
|
+
contractId: wasm.IdentifierLike;
|
|
67
52
|
type: string;
|
|
68
|
-
documentId:
|
|
69
|
-
ownerId:
|
|
53
|
+
documentId: wasm.IdentifierLike;
|
|
54
|
+
ownerId: wasm.IdentifierLike;
|
|
70
55
|
price: number | bigint | string;
|
|
71
56
|
privateKeyWif: string;
|
|
72
57
|
}): Promise<any>;
|
package/dist/documents/facade.js
CHANGED
|
@@ -4,19 +4,13 @@ export class DocumentsFacade {
|
|
|
4
4
|
this.sdk = sdk;
|
|
5
5
|
}
|
|
6
6
|
// Query many documents
|
|
7
|
-
async query(
|
|
8
|
-
const { contractId, type, where, orderBy, limit, startAfter, startAt } = params;
|
|
9
|
-
const whereJson = asJsonString(where);
|
|
10
|
-
const orderJson = asJsonString(orderBy);
|
|
7
|
+
async query(query) {
|
|
11
8
|
const w = await this.sdk.getWasmSdkConnected();
|
|
12
|
-
return w.getDocuments(
|
|
9
|
+
return w.getDocuments(query);
|
|
13
10
|
}
|
|
14
|
-
async queryWithProof(
|
|
15
|
-
const { contractId, type, where, orderBy, limit, startAfter, startAt } = params;
|
|
16
|
-
const whereJson = asJsonString(where);
|
|
17
|
-
const orderJson = asJsonString(orderBy);
|
|
11
|
+
async queryWithProof(query) {
|
|
18
12
|
const w = await this.sdk.getWasmSdkConnected();
|
|
19
|
-
return w.getDocumentsWithProofInfo(
|
|
13
|
+
return w.getDocumentsWithProofInfo(query);
|
|
20
14
|
}
|
|
21
15
|
async get(contractId, type, documentId) {
|
|
22
16
|
const w = await this.sdk.getWasmSdkConnected();
|
package/dist/dpns/facade.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as wasm from '../wasm.js';
|
|
1
2
|
import type { EvoSDK } from '../sdk.js';
|
|
2
3
|
export declare class DpnsFacade {
|
|
3
4
|
private sdk;
|
|
@@ -6,22 +7,18 @@ export declare class DpnsFacade {
|
|
|
6
7
|
isValidUsername(label: string): Promise<boolean>;
|
|
7
8
|
isContestedUsername(label: string): Promise<boolean>;
|
|
8
9
|
isNameAvailable(label: string): Promise<boolean>;
|
|
9
|
-
resolveName(name: string): Promise<
|
|
10
|
+
resolveName(name: string): Promise<string | undefined>;
|
|
10
11
|
registerName(args: {
|
|
11
12
|
label: string;
|
|
12
|
-
identityId:
|
|
13
|
+
identityId: wasm.IdentifierLike;
|
|
13
14
|
publicKeyId: number;
|
|
14
15
|
privateKeyWif: string;
|
|
15
16
|
onPreorder?: Function;
|
|
16
|
-
}): Promise<
|
|
17
|
-
usernames(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}): Promise<any>;
|
|
24
|
-
usernameWithProof(identityId: string): Promise<any>;
|
|
25
|
-
getUsernameByName(username: string): Promise<any>;
|
|
26
|
-
getUsernameByNameWithProof(username: string): Promise<any>;
|
|
17
|
+
}): Promise<wasm.RegisterDpnsNameResult>;
|
|
18
|
+
usernames(query: wasm.DpnsUsernamesQuery): Promise<string[]>;
|
|
19
|
+
username(identityId: wasm.IdentifierLike): Promise<string | undefined>;
|
|
20
|
+
usernamesWithProof(query: wasm.DpnsUsernamesQuery): Promise<wasm.DpnsUsernamesProofResponse>;
|
|
21
|
+
usernameWithProof(identityId: wasm.IdentifierLike): Promise<wasm.DpnsUsernameProofResponse>;
|
|
22
|
+
getUsernameByName(username: string): Promise<wasm.DpnsUsernameInfo>;
|
|
23
|
+
getUsernameByNameWithProof(username: string): Promise<wasm.ProofMetadataResponseTyped<wasm.DpnsUsernameInfo>>;
|
|
27
24
|
}
|
package/dist/dpns/facade.js
CHANGED
|
@@ -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(
|
|
32
|
-
const { limit } = opts;
|
|
31
|
+
async usernames(query) {
|
|
33
32
|
const w = await this.sdk.getWasmSdkConnected();
|
|
34
|
-
return w.getDpnsUsernames(
|
|
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(
|
|
41
|
-
const { limit } = opts;
|
|
39
|
+
async usernamesWithProof(query) {
|
|
42
40
|
const w = await this.sdk.getWasmSdkConnected();
|
|
43
|
-
return w.getDpnsUsernamesWithProofInfo(
|
|
41
|
+
return w.getDpnsUsernamesWithProofInfo(query);
|
|
44
42
|
}
|
|
45
43
|
async usernameWithProof(identityId) {
|
|
46
44
|
const w = await this.sdk.getWasmSdkConnected();
|
package/dist/epoch/facade.d.ts
CHANGED
|
@@ -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(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
}
|
package/dist/epoch/facade.js
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
export class EpochFacade {
|
|
2
2
|
constructor(sdk) { this.sdk = sdk; }
|
|
3
|
-
async epochsInfo(
|
|
4
|
-
const { startEpoch, count, ascending } = params;
|
|
3
|
+
async epochsInfo(query = {}) {
|
|
5
4
|
const w = await this.sdk.getWasmSdkConnected();
|
|
6
|
-
return w.getEpochsInfo(
|
|
5
|
+
return w.getEpochsInfo(query);
|
|
7
6
|
}
|
|
8
|
-
async epochsInfoWithProof(
|
|
9
|
-
const { startEpoch, count, ascending } = params;
|
|
7
|
+
async epochsInfoWithProof(query = {}) {
|
|
10
8
|
const w = await this.sdk.getWasmSdkConnected();
|
|
11
|
-
return w.getEpochsInfoWithProofInfo(
|
|
9
|
+
return w.getEpochsInfoWithProofInfo(query);
|
|
12
10
|
}
|
|
13
|
-
async finalizedInfos(
|
|
14
|
-
const { startEpoch, count, ascending } = params;
|
|
11
|
+
async finalizedInfos(query) {
|
|
15
12
|
const w = await this.sdk.getWasmSdkConnected();
|
|
16
|
-
return w.getFinalizedEpochInfos(
|
|
13
|
+
return w.getFinalizedEpochInfos(query);
|
|
17
14
|
}
|
|
18
|
-
async finalizedInfosWithProof(
|
|
19
|
-
const { startEpoch, count, ascending } = params;
|
|
15
|
+
async finalizedInfosWithProof(query) {
|
|
20
16
|
const w = await this.sdk.getWasmSdkConnected();
|
|
21
|
-
return w.getFinalizedEpochInfosWithProofInfo(
|
|
17
|
+
return w.getFinalizedEpochInfosWithProofInfo(query);
|
|
22
18
|
}
|
|
23
19
|
async current() { const w = await this.sdk.getWasmSdkConnected(); return w.getCurrentEpoch(); }
|
|
24
|
-
async currentWithProof() {
|
|
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(
|
|
34
|
-
const { limit, startAfter, orderAscending } = opts;
|
|
32
|
+
async evonodesProposedBlocksByRange(query) {
|
|
35
33
|
const w = await this.sdk.getWasmSdkConnected();
|
|
36
|
-
return w.getEvonodesProposedEpochBlocksByRange(
|
|
34
|
+
return w.getEvonodesProposedEpochBlocksByRange(query);
|
|
37
35
|
}
|
|
38
|
-
async evonodesProposedBlocksByRangeWithProof(
|
|
39
|
-
const { limit, startAfter, orderAscending } = opts;
|
|
36
|
+
async evonodesProposedBlocksByRangeWithProof(query) {
|
|
40
37
|
const w = await this.sdk.getWasmSdkConnected();
|
|
41
|
-
return w.getEvonodesProposedEpochBlocksByRangeWithProofInfo(
|
|
38
|
+
return w.getEvonodesProposedEpochBlocksByRangeWithProofInfo(query);
|
|
42
39
|
}
|
|
43
40
|
}
|