@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
package/dist/group/facade.d.ts
CHANGED
|
@@ -1,77 +1,24 @@
|
|
|
1
|
+
import * as wasm from '../wasm.js';
|
|
1
2
|
import type { EvoSDK } from '../sdk.js';
|
|
2
3
|
export declare class GroupFacade {
|
|
3
4
|
private sdk;
|
|
4
5
|
constructor(sdk: EvoSDK);
|
|
5
|
-
info(contractId:
|
|
6
|
-
infoWithProof(contractId:
|
|
7
|
-
infos(
|
|
8
|
-
infosWithProof(
|
|
9
|
-
members(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}): Promise<any>;
|
|
24
|
-
identityGroupsWithProof(identityId: string, opts?: {
|
|
25
|
-
memberDataContracts?: string[];
|
|
26
|
-
ownerDataContracts?: string[];
|
|
27
|
-
moderatorDataContracts?: string[];
|
|
28
|
-
}): Promise<any>;
|
|
29
|
-
actions(contractId: string, groupContractPosition: number, status: string, opts?: {
|
|
30
|
-
startAtInfo?: unknown;
|
|
31
|
-
count?: number;
|
|
32
|
-
}): Promise<any>;
|
|
33
|
-
actionsWithProof(contractId: string, groupContractPosition: number, status: string, opts?: {
|
|
34
|
-
startAtInfo?: unknown;
|
|
35
|
-
count?: number;
|
|
36
|
-
}): Promise<any>;
|
|
37
|
-
actionSigners(contractId: string, groupContractPosition: number, status: string, actionId: string): Promise<any>;
|
|
38
|
-
actionSignersWithProof(contractId: string, groupContractPosition: number, status: string, actionId: string): Promise<any>;
|
|
39
|
-
groupsDataContracts(dataContractIds: string[]): Promise<any>;
|
|
40
|
-
groupsDataContractsWithProof(dataContractIds: string[]): Promise<any>;
|
|
41
|
-
contestedResources(params: {
|
|
42
|
-
documentTypeName: string;
|
|
43
|
-
contractId: string;
|
|
44
|
-
indexName: string;
|
|
45
|
-
startAtValue?: Uint8Array;
|
|
46
|
-
limit?: number;
|
|
47
|
-
orderAscending?: boolean;
|
|
48
|
-
}): Promise<any>;
|
|
49
|
-
contestedResourcesWithProof(params: {
|
|
50
|
-
documentTypeName: string;
|
|
51
|
-
contractId: string;
|
|
52
|
-
indexName: string;
|
|
53
|
-
startAtValue?: Uint8Array;
|
|
54
|
-
limit?: number;
|
|
55
|
-
orderAscending?: boolean;
|
|
56
|
-
}): Promise<any>;
|
|
57
|
-
contestedResourceVotersForIdentity(params: {
|
|
58
|
-
contractId: string;
|
|
59
|
-
documentTypeName: string;
|
|
60
|
-
indexName: string;
|
|
61
|
-
indexValues: any[];
|
|
62
|
-
contestantId: string;
|
|
63
|
-
startAtVoterInfo?: string;
|
|
64
|
-
limit?: number;
|
|
65
|
-
orderAscending?: boolean;
|
|
66
|
-
}): Promise<any>;
|
|
67
|
-
contestedResourceVotersForIdentityWithProof(params: {
|
|
68
|
-
contractId: string;
|
|
69
|
-
documentTypeName: string;
|
|
70
|
-
indexName: string;
|
|
71
|
-
indexValues: any[];
|
|
72
|
-
contestantId: string;
|
|
73
|
-
startAtIdentifierInfo?: string;
|
|
74
|
-
count?: number;
|
|
75
|
-
orderAscending?: boolean;
|
|
76
|
-
}): Promise<any>;
|
|
6
|
+
info(contractId: wasm.IdentifierLike, groupContractPosition: number): Promise<wasm.Group | undefined>;
|
|
7
|
+
infoWithProof(contractId: wasm.IdentifierLike, groupContractPosition: number): Promise<wasm.ProofMetadataResponseTyped<wasm.Group | undefined>>;
|
|
8
|
+
infos(query: wasm.GroupInfosQuery): Promise<Map<number, wasm.Group | undefined>>;
|
|
9
|
+
infosWithProof(query: wasm.GroupInfosQuery): Promise<wasm.ProofMetadataResponseTyped<Map<number, wasm.Group | undefined>>>;
|
|
10
|
+
members(query: wasm.GroupMembersQuery): Promise<Map<wasm.Identifier, bigint>>;
|
|
11
|
+
membersWithProof(query: wasm.GroupMembersQuery): Promise<wasm.ProofMetadataResponseTyped<Map<wasm.Identifier, bigint>>>;
|
|
12
|
+
identityGroups(query: wasm.IdentityGroupsQuery): Promise<wasm.IdentityGroupInfo[]>;
|
|
13
|
+
identityGroupsWithProof(query: wasm.IdentityGroupsQuery): Promise<wasm.ProofMetadataResponseTyped<wasm.IdentityGroupInfo[]>>;
|
|
14
|
+
actions(query: wasm.GroupActionsQuery): Promise<Map<wasm.Identifier, wasm.GroupAction | undefined>>;
|
|
15
|
+
actionsWithProof(query: wasm.GroupActionsQuery): Promise<wasm.ProofMetadataResponseTyped<Map<wasm.Identifier, wasm.GroupAction | undefined>>>;
|
|
16
|
+
actionSigners(query: wasm.GroupActionSignersQuery): Promise<Map<wasm.Identifier, bigint>>;
|
|
17
|
+
actionSignersWithProof(query: wasm.GroupActionSignersQuery): Promise<wasm.ProofMetadataResponseTyped<Map<wasm.Identifier, bigint>>>;
|
|
18
|
+
groupsDataContracts(dataContractIds: wasm.IdentifierLike[]): Promise<Map<wasm.Identifier, Map<number, wasm.Group | undefined>>>;
|
|
19
|
+
groupsDataContractsWithProof(dataContractIds: wasm.IdentifierLike[]): Promise<wasm.ProofMetadataResponseTyped<Map<wasm.Identifier, Map<number, wasm.Group | undefined>>>>;
|
|
20
|
+
contestedResources(query: wasm.VotePollsByDocumentTypeQuery): Promise<any[]>;
|
|
21
|
+
contestedResourcesWithProof(query: wasm.VotePollsByDocumentTypeQuery): Promise<wasm.ProofMetadataResponseTyped<Array<any>>>;
|
|
22
|
+
contestedResourceVotersForIdentity(query: wasm.ContestedResourceVotersForIdentityQuery): Promise<string[]>;
|
|
23
|
+
contestedResourceVotersForIdentityWithProof(query: wasm.ContestedResourceVotersForIdentityQuery): Promise<wasm.ProofMetadataResponseTyped<string[]>>;
|
|
77
24
|
}
|
package/dist/group/facade.js
CHANGED
|
@@ -8,51 +8,45 @@ export class GroupFacade {
|
|
|
8
8
|
const w = await this.sdk.getWasmSdkConnected();
|
|
9
9
|
return w.getGroupInfoWithProofInfo(contractId, groupContractPosition);
|
|
10
10
|
}
|
|
11
|
-
async infos(
|
|
11
|
+
async infos(query) {
|
|
12
12
|
const w = await this.sdk.getWasmSdkConnected();
|
|
13
|
-
return w.getGroupInfos(
|
|
13
|
+
return w.getGroupInfos(query);
|
|
14
14
|
}
|
|
15
|
-
async infosWithProof(
|
|
15
|
+
async infosWithProof(query) {
|
|
16
16
|
const w = await this.sdk.getWasmSdkConnected();
|
|
17
|
-
return w.getGroupInfosWithProofInfo(
|
|
17
|
+
return w.getGroupInfosWithProofInfo(query);
|
|
18
18
|
}
|
|
19
|
-
async members(
|
|
20
|
-
const { memberIds, startAt, limit } = opts;
|
|
19
|
+
async members(query) {
|
|
21
20
|
const w = await this.sdk.getWasmSdkConnected();
|
|
22
|
-
return w.getGroupMembers(
|
|
21
|
+
return w.getGroupMembers(query);
|
|
23
22
|
}
|
|
24
|
-
async membersWithProof(
|
|
25
|
-
const { memberIds, startAt, limit } = opts;
|
|
23
|
+
async membersWithProof(query) {
|
|
26
24
|
const w = await this.sdk.getWasmSdkConnected();
|
|
27
|
-
return w.getGroupMembersWithProofInfo(
|
|
25
|
+
return w.getGroupMembersWithProofInfo(query);
|
|
28
26
|
}
|
|
29
|
-
async identityGroups(
|
|
30
|
-
const { memberDataContracts, ownerDataContracts, moderatorDataContracts } = opts;
|
|
27
|
+
async identityGroups(query) {
|
|
31
28
|
const w = await this.sdk.getWasmSdkConnected();
|
|
32
|
-
return w.getIdentityGroups(
|
|
29
|
+
return w.getIdentityGroups(query);
|
|
33
30
|
}
|
|
34
|
-
async identityGroupsWithProof(
|
|
35
|
-
const { memberDataContracts, ownerDataContracts, moderatorDataContracts } = opts;
|
|
31
|
+
async identityGroupsWithProof(query) {
|
|
36
32
|
const w = await this.sdk.getWasmSdkConnected();
|
|
37
|
-
return w.getIdentityGroupsWithProofInfo(
|
|
33
|
+
return w.getIdentityGroupsWithProofInfo(query);
|
|
38
34
|
}
|
|
39
|
-
async actions(
|
|
40
|
-
const { startAtInfo, count } = opts;
|
|
35
|
+
async actions(query) {
|
|
41
36
|
const w = await this.sdk.getWasmSdkConnected();
|
|
42
|
-
return w.getGroupActions(
|
|
37
|
+
return w.getGroupActions(query);
|
|
43
38
|
}
|
|
44
|
-
async actionsWithProof(
|
|
45
|
-
const { startAtInfo, count } = opts;
|
|
39
|
+
async actionsWithProof(query) {
|
|
46
40
|
const w = await this.sdk.getWasmSdkConnected();
|
|
47
|
-
return w.getGroupActionsWithProofInfo(
|
|
41
|
+
return w.getGroupActionsWithProofInfo(query);
|
|
48
42
|
}
|
|
49
|
-
async actionSigners(
|
|
43
|
+
async actionSigners(query) {
|
|
50
44
|
const w = await this.sdk.getWasmSdkConnected();
|
|
51
|
-
return w.getGroupActionSigners(
|
|
45
|
+
return w.getGroupActionSigners(query);
|
|
52
46
|
}
|
|
53
|
-
async actionSignersWithProof(
|
|
47
|
+
async actionSignersWithProof(query) {
|
|
54
48
|
const w = await this.sdk.getWasmSdkConnected();
|
|
55
|
-
return w.getGroupActionSignersWithProofInfo(
|
|
49
|
+
return w.getGroupActionSignersWithProofInfo(query);
|
|
56
50
|
}
|
|
57
51
|
async groupsDataContracts(dataContractIds) {
|
|
58
52
|
const w = await this.sdk.getWasmSdkConnected();
|
|
@@ -62,24 +56,20 @@ export class GroupFacade {
|
|
|
62
56
|
const w = await this.sdk.getWasmSdkConnected();
|
|
63
57
|
return w.getGroupsDataContractsWithProofInfo(dataContractIds);
|
|
64
58
|
}
|
|
65
|
-
async contestedResources(
|
|
66
|
-
const { documentTypeName, contractId, indexName, startAtValue, limit, orderAscending } = params;
|
|
59
|
+
async contestedResources(query) {
|
|
67
60
|
const w = await this.sdk.getWasmSdkConnected();
|
|
68
|
-
return w.getContestedResources(
|
|
61
|
+
return w.getContestedResources(query);
|
|
69
62
|
}
|
|
70
|
-
async contestedResourcesWithProof(
|
|
71
|
-
const { documentTypeName, contractId, indexName, startAtValue, limit, orderAscending } = params;
|
|
63
|
+
async contestedResourcesWithProof(query) {
|
|
72
64
|
const w = await this.sdk.getWasmSdkConnected();
|
|
73
|
-
return w.getContestedResourcesWithProofInfo(
|
|
65
|
+
return w.getContestedResourcesWithProofInfo(query);
|
|
74
66
|
}
|
|
75
|
-
async contestedResourceVotersForIdentity(
|
|
76
|
-
const { contractId, documentTypeName, indexName, indexValues, contestantId, startAtVoterInfo, limit, orderAscending } = params;
|
|
67
|
+
async contestedResourceVotersForIdentity(query) {
|
|
77
68
|
const w = await this.sdk.getWasmSdkConnected();
|
|
78
|
-
return w.getContestedResourceVotersForIdentity(
|
|
69
|
+
return w.getContestedResourceVotersForIdentity(query);
|
|
79
70
|
}
|
|
80
|
-
async contestedResourceVotersForIdentityWithProof(
|
|
81
|
-
const { contractId, documentTypeName, indexName, indexValues, contestantId, startAtIdentifierInfo, count, orderAscending } = params;
|
|
71
|
+
async contestedResourceVotersForIdentityWithProof(query) {
|
|
82
72
|
const w = await this.sdk.getWasmSdkConnected();
|
|
83
|
-
return w.getContestedResourceVotersForIdentityWithProofInfo(
|
|
73
|
+
return w.getContestedResourceVotersForIdentityWithProofInfo(query);
|
|
84
74
|
}
|
|
85
75
|
}
|
|
@@ -3,73 +3,48 @@ import type { EvoSDK } from '../sdk.js';
|
|
|
3
3
|
export declare class IdentitiesFacade {
|
|
4
4
|
private sdk;
|
|
5
5
|
constructor(sdk: EvoSDK);
|
|
6
|
-
fetch(identityId:
|
|
7
|
-
fetchWithProof(identityId:
|
|
8
|
-
fetchUnproved(identityId:
|
|
9
|
-
getKeys(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
balanceWithProof(identityId: string): Promise<any>;
|
|
30
|
-
balances(identityIds: string[]): Promise<any>;
|
|
31
|
-
balancesWithProof(identityIds: string[]): Promise<any>;
|
|
32
|
-
balanceAndRevision(identityId: string): Promise<any>;
|
|
33
|
-
balanceAndRevisionWithProof(identityId: string): Promise<any>;
|
|
34
|
-
byPublicKeyHash(publicKeyHash: string): Promise<wasm.IdentityWasm>;
|
|
35
|
-
byPublicKeyHashWithProof(publicKeyHash: string): Promise<any>;
|
|
36
|
-
byNonUniquePublicKeyHash(publicKeyHash: string, opts?: {
|
|
37
|
-
startAfter?: string;
|
|
38
|
-
}): Promise<any>;
|
|
39
|
-
byNonUniquePublicKeyHashWithProof(publicKeyHash: string, opts?: {
|
|
40
|
-
startAfter?: string;
|
|
41
|
-
}): Promise<any>;
|
|
42
|
-
contractKeys(args: {
|
|
43
|
-
identityIds: string[];
|
|
44
|
-
contractId: string;
|
|
45
|
-
purposes?: number[];
|
|
46
|
-
}): Promise<any>;
|
|
47
|
-
contractKeysWithProof(args: {
|
|
48
|
-
identityIds: string[];
|
|
49
|
-
contractId: string;
|
|
50
|
-
purposes?: number[];
|
|
51
|
-
}): Promise<any>;
|
|
52
|
-
tokenBalances(identityId: string, tokenIds: string[]): Promise<any>;
|
|
53
|
-
tokenBalancesWithProof(identityId: string, tokenIds: string[]): Promise<any>;
|
|
6
|
+
fetch(identityId: wasm.IdentifierLike): Promise<wasm.Identity | undefined>;
|
|
7
|
+
fetchWithProof(identityId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.Identity>>;
|
|
8
|
+
fetchUnproved(identityId: wasm.IdentifierLike): Promise<wasm.Identity>;
|
|
9
|
+
getKeys(query: wasm.IdentityKeysQuery): Promise<wasm.IdentityKeyInfo[]>;
|
|
10
|
+
getKeysWithProof(query: wasm.IdentityKeysQuery): Promise<wasm.ProofMetadataResponseTyped<wasm.IdentityKeyInfo[]>>;
|
|
11
|
+
nonce(identityId: wasm.IdentifierLike): Promise<wasm.IdentityNonce>;
|
|
12
|
+
nonceWithProof(identityId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.IdentityNonce>>;
|
|
13
|
+
contractNonce(identityId: wasm.IdentifierLike, contractId: wasm.IdentifierLike): Promise<wasm.IdentityNonce>;
|
|
14
|
+
contractNonceWithProof(identityId: wasm.IdentifierLike, contractId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.IdentityNonce>>;
|
|
15
|
+
balance(identityId: wasm.IdentifierLike): Promise<wasm.IdentityBalanceInfo>;
|
|
16
|
+
balanceWithProof(identityId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.IdentityBalanceInfo>>;
|
|
17
|
+
balances(identityIds: wasm.IdentifierLike[]): Promise<wasm.IdentityBalanceEntry[]>;
|
|
18
|
+
balancesWithProof(identityIds: wasm.IdentifierLike[]): Promise<wasm.ProofMetadataResponseTyped<wasm.IdentityBalanceEntry[]>>;
|
|
19
|
+
balanceAndRevision(identityId: wasm.IdentifierLike): Promise<wasm.IdentityBalanceAndRevision>;
|
|
20
|
+
balanceAndRevisionWithProof(identityId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.IdentityBalanceAndRevision>>;
|
|
21
|
+
byPublicKeyHash(publicKeyHash: string | Uint8Array): Promise<wasm.Identity>;
|
|
22
|
+
byPublicKeyHashWithProof(publicKeyHash: string | Uint8Array): Promise<wasm.ProofMetadataResponseTyped<wasm.Identity>>;
|
|
23
|
+
byNonUniquePublicKeyHash(publicKeyHash: string | Uint8Array, startAfter?: wasm.IdentifierLike): Promise<wasm.Identity[]>;
|
|
24
|
+
byNonUniquePublicKeyHashWithProof(publicKeyHash: string | Uint8Array, startAfter?: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.Identity[]>>;
|
|
25
|
+
contractKeys(query: wasm.IdentitiesContractKeysQuery): Promise<wasm.IdentityContractKeys[]>;
|
|
26
|
+
contractKeysWithProof(query: wasm.IdentitiesContractKeysQuery): Promise<wasm.ProofMetadataResponseTyped<wasm.IdentityContractKeys[]>>;
|
|
27
|
+
tokenBalances(identityId: wasm.IdentifierLike, tokenIds: wasm.IdentifierLike[]): Promise<Map<wasm.Identifier, bigint>>;
|
|
28
|
+
tokenBalancesWithProof(identityId: wasm.IdentifierLike, tokenIds: wasm.IdentifierLike[]): Promise<wasm.ProofMetadataResponseTyped<Map<wasm.Identifier, bigint>>>;
|
|
54
29
|
create(args: {
|
|
55
30
|
assetLockProof: unknown;
|
|
56
31
|
assetLockPrivateKeyWif: string;
|
|
57
32
|
publicKeys: unknown[];
|
|
58
33
|
}): Promise<any>;
|
|
59
34
|
topUp(args: {
|
|
60
|
-
identityId:
|
|
35
|
+
identityId: wasm.IdentifierLike;
|
|
61
36
|
assetLockProof: unknown;
|
|
62
37
|
assetLockPrivateKeyWif: string;
|
|
63
38
|
}): Promise<any>;
|
|
64
39
|
creditTransfer(args: {
|
|
65
|
-
senderId:
|
|
66
|
-
recipientId:
|
|
40
|
+
senderId: wasm.IdentifierLike;
|
|
41
|
+
recipientId: wasm.IdentifierLike;
|
|
67
42
|
amount: number | bigint | string;
|
|
68
43
|
privateKeyWif: string;
|
|
69
44
|
keyId?: number;
|
|
70
45
|
}): Promise<any>;
|
|
71
46
|
creditWithdrawal(args: {
|
|
72
|
-
identityId:
|
|
47
|
+
identityId: wasm.IdentifierLike;
|
|
73
48
|
toAddress: string;
|
|
74
49
|
amount: number | bigint | string;
|
|
75
50
|
coreFeePerByte?: number;
|
|
@@ -77,7 +52,7 @@ export declare class IdentitiesFacade {
|
|
|
77
52
|
keyId?: number;
|
|
78
53
|
}): Promise<any>;
|
|
79
54
|
update(args: {
|
|
80
|
-
identityId:
|
|
55
|
+
identityId: wasm.IdentifierLike;
|
|
81
56
|
addPublicKeys?: unknown[];
|
|
82
57
|
disablePublicKeyIds?: number[];
|
|
83
58
|
privateKeyWif: string;
|
|
@@ -15,16 +15,13 @@ export class IdentitiesFacade {
|
|
|
15
15
|
const w = await this.sdk.getWasmSdkConnected();
|
|
16
16
|
return w.getIdentityUnproved(identityId);
|
|
17
17
|
}
|
|
18
|
-
async getKeys(
|
|
19
|
-
const { identityId, keyRequestType, specificKeyIds, searchPurposeMap, limit, offset } = args;
|
|
20
|
-
const mapJson = asJsonString(searchPurposeMap);
|
|
18
|
+
async getKeys(query) {
|
|
21
19
|
const w = await this.sdk.getWasmSdkConnected();
|
|
22
|
-
return w.getIdentityKeys(
|
|
20
|
+
return w.getIdentityKeys(query);
|
|
23
21
|
}
|
|
24
|
-
async getKeysWithProof(
|
|
25
|
-
const { identityId, keyRequestType, specificKeyIds, limit, offset } = args;
|
|
22
|
+
async getKeysWithProof(query) {
|
|
26
23
|
const w = await this.sdk.getWasmSdkConnected();
|
|
27
|
-
return w.getIdentityKeysWithProofInfo(
|
|
24
|
+
return w.getIdentityKeysWithProofInfo(query);
|
|
28
25
|
}
|
|
29
26
|
async nonce(identityId) {
|
|
30
27
|
const w = await this.sdk.getWasmSdkConnected();
|
|
@@ -74,27 +71,21 @@ export class IdentitiesFacade {
|
|
|
74
71
|
const w = await this.sdk.getWasmSdkConnected();
|
|
75
72
|
return w.getIdentityByPublicKeyHashWithProofInfo(publicKeyHash);
|
|
76
73
|
}
|
|
77
|
-
async byNonUniquePublicKeyHash(publicKeyHash,
|
|
78
|
-
const { startAfter } = opts;
|
|
74
|
+
async byNonUniquePublicKeyHash(publicKeyHash, startAfter) {
|
|
79
75
|
const w = await this.sdk.getWasmSdkConnected();
|
|
80
|
-
return w.getIdentityByNonUniquePublicKeyHash(publicKeyHash, startAfter
|
|
76
|
+
return w.getIdentityByNonUniquePublicKeyHash(publicKeyHash, startAfter);
|
|
81
77
|
}
|
|
82
|
-
async byNonUniquePublicKeyHashWithProof(publicKeyHash,
|
|
83
|
-
const { startAfter } = opts;
|
|
78
|
+
async byNonUniquePublicKeyHashWithProof(publicKeyHash, startAfter) {
|
|
84
79
|
const w = await this.sdk.getWasmSdkConnected();
|
|
85
|
-
return w.getIdentityByNonUniquePublicKeyHashWithProofInfo(publicKeyHash, startAfter
|
|
80
|
+
return w.getIdentityByNonUniquePublicKeyHashWithProofInfo(publicKeyHash, startAfter || undefined);
|
|
86
81
|
}
|
|
87
|
-
async contractKeys(
|
|
88
|
-
const { identityIds, contractId, purposes } = args;
|
|
89
|
-
const purposesArray = purposes && purposes.length > 0 ? Uint32Array.from(purposes) : null;
|
|
82
|
+
async contractKeys(query) {
|
|
90
83
|
const w = await this.sdk.getWasmSdkConnected();
|
|
91
|
-
return w.getIdentitiesContractKeys(
|
|
84
|
+
return w.getIdentitiesContractKeys(query);
|
|
92
85
|
}
|
|
93
|
-
async contractKeysWithProof(
|
|
94
|
-
const { identityIds, contractId, purposes } = args;
|
|
95
|
-
const purposesArray = purposes && purposes.length > 0 ? Uint32Array.from(purposes) : null;
|
|
86
|
+
async contractKeysWithProof(query) {
|
|
96
87
|
const w = await this.sdk.getWasmSdkConnected();
|
|
97
|
-
return w.getIdentitiesContractKeysWithProofInfo(
|
|
88
|
+
return w.getIdentitiesContractKeysWithProofInfo(query);
|
|
98
89
|
}
|
|
99
90
|
async tokenBalances(identityId, tokenIds) {
|
|
100
91
|
const w = await this.sdk.getWasmSdkConnected();
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import type { EvoSDK } from '../sdk.js';
|
|
2
|
+
import * as wasm from '../wasm.js';
|
|
2
3
|
export declare class ProtocolFacade {
|
|
3
4
|
private sdk;
|
|
4
5
|
constructor(sdk: EvoSDK);
|
|
5
|
-
versionUpgradeState(): Promise<
|
|
6
|
-
versionUpgradeStateWithProof(): Promise<
|
|
7
|
-
versionUpgradeVoteStatus(
|
|
8
|
-
|
|
9
|
-
count: number;
|
|
10
|
-
}): Promise<any>;
|
|
11
|
-
versionUpgradeVoteStatusWithProof(params: {
|
|
12
|
-
startProTxHash: string;
|
|
13
|
-
count: number;
|
|
14
|
-
}): Promise<any>;
|
|
6
|
+
versionUpgradeState(): Promise<wasm.ProtocolVersionUpgradeState>;
|
|
7
|
+
versionUpgradeStateWithProof(): Promise<wasm.ProofMetadataResponseTyped<wasm.ProtocolVersionUpgradeState>>;
|
|
8
|
+
versionUpgradeVoteStatus(startProTxHash: string | Uint8Array, count: number): Promise<Map<string, wasm.ProtocolVersionUpgradeVoteStatus>>;
|
|
9
|
+
versionUpgradeVoteStatusWithProof(startProTxHash: string | Uint8Array, count: number): Promise<wasm.ProofMetadataResponseTyped<unknown>>;
|
|
15
10
|
}
|
package/dist/protocol/facade.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
export class ProtocolFacade {
|
|
2
2
|
constructor(sdk) { this.sdk = sdk; }
|
|
3
|
-
async versionUpgradeState() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
async versionUpgradeState() {
|
|
4
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
5
|
+
return w.getProtocolVersionUpgradeState();
|
|
6
|
+
}
|
|
7
|
+
async versionUpgradeStateWithProof() {
|
|
8
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
9
|
+
return w.getProtocolVersionUpgradeStateWithProofInfo();
|
|
10
|
+
}
|
|
11
|
+
async versionUpgradeVoteStatus(startProTxHash, count) {
|
|
7
12
|
const w = await this.sdk.getWasmSdkConnected();
|
|
8
13
|
return w.getProtocolVersionUpgradeVoteStatus(startProTxHash, count);
|
|
9
14
|
}
|
|
10
|
-
async versionUpgradeVoteStatusWithProof(
|
|
11
|
-
const { startProTxHash, count } = params;
|
|
15
|
+
async versionUpgradeVoteStatusWithProof(startProTxHash, count) {
|
|
12
16
|
const w = await this.sdk.getWasmSdkConnected();
|
|
13
17
|
return w.getProtocolVersionUpgradeVoteStatusWithProofInfo(startProTxHash, count);
|
|
14
18
|
}
|
package/dist/system/facade.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import * as wasm from '../wasm.js';
|
|
1
2
|
import type { EvoSDK } from '../sdk.js';
|
|
2
3
|
export declare class SystemFacade {
|
|
3
4
|
private sdk;
|
|
4
5
|
constructor(sdk: EvoSDK);
|
|
5
|
-
status(): Promise<
|
|
6
|
-
currentQuorumsInfo(): Promise<
|
|
7
|
-
totalCreditsInPlatform(): Promise<
|
|
8
|
-
totalCreditsInPlatformWithProof(): Promise<
|
|
9
|
-
prefundedSpecializedBalance(identityId:
|
|
10
|
-
prefundedSpecializedBalanceWithProof(identityId:
|
|
11
|
-
waitForStateTransitionResult(stateTransitionHash: string): Promise<
|
|
12
|
-
pathElements(path: string[], keys: string[]): Promise<
|
|
13
|
-
pathElementsWithProof(path: string[], keys: string[]): Promise<
|
|
6
|
+
status(): Promise<wasm.StatusResponse>;
|
|
7
|
+
currentQuorumsInfo(): Promise<wasm.CurrentQuorumsInfo>;
|
|
8
|
+
totalCreditsInPlatform(): Promise<bigint | undefined>;
|
|
9
|
+
totalCreditsInPlatformWithProof(): Promise<wasm.ProofMetadataResponseTyped<bigint | undefined>>;
|
|
10
|
+
prefundedSpecializedBalance(identityId: wasm.IdentifierLike): Promise<wasm.PrefundedSpecializedBalance | undefined>;
|
|
11
|
+
prefundedSpecializedBalanceWithProof(identityId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.PrefundedSpecializedBalance | undefined>>;
|
|
12
|
+
waitForStateTransitionResult(stateTransitionHash: string): Promise<wasm.StateTransitionResult>;
|
|
13
|
+
pathElements(path: string[], keys: string[]): Promise<wasm.PathElement[]>;
|
|
14
|
+
pathElementsWithProof(path: string[], keys: string[]): Promise<wasm.ProofMetadataResponseTyped<wasm.PathElement[]>>;
|
|
14
15
|
}
|
package/dist/system/facade.js
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
export class SystemFacade {
|
|
2
2
|
constructor(sdk) { this.sdk = sdk; }
|
|
3
|
-
async status() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
async
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
async
|
|
3
|
+
async status() {
|
|
4
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
5
|
+
return w.getStatus();
|
|
6
|
+
}
|
|
7
|
+
async currentQuorumsInfo() {
|
|
8
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
9
|
+
return w.getCurrentQuorumsInfo();
|
|
10
|
+
}
|
|
11
|
+
async totalCreditsInPlatform() {
|
|
12
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
13
|
+
return w.getTotalCreditsInPlatform();
|
|
14
|
+
}
|
|
15
|
+
async totalCreditsInPlatformWithProof() {
|
|
16
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
17
|
+
return w.getTotalCreditsInPlatformWithProofInfo();
|
|
18
|
+
}
|
|
19
|
+
async prefundedSpecializedBalance(identityId) {
|
|
20
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
21
|
+
return w.getPrefundedSpecializedBalance(identityId);
|
|
22
|
+
}
|
|
23
|
+
async prefundedSpecializedBalanceWithProof(identityId) {
|
|
24
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
25
|
+
return w.getPrefundedSpecializedBalanceWithProofInfo(identityId);
|
|
26
|
+
}
|
|
27
|
+
async waitForStateTransitionResult(stateTransitionHash) {
|
|
28
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
29
|
+
return w.waitForStateTransitionResult(stateTransitionHash);
|
|
30
|
+
}
|
|
31
|
+
async pathElements(path, keys) {
|
|
32
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
33
|
+
return w.getPathElements(path, keys);
|
|
34
|
+
}
|
|
35
|
+
async pathElementsWithProof(path, keys) {
|
|
36
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
37
|
+
return w.getPathElementsWithProofInfo(path, keys);
|
|
38
|
+
}
|
|
12
39
|
}
|