dash-platform-sdk 1.3.0-dev.6 → 1.3.0-dev.7
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/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +4 -2
- package/proto/generated/google/protobuf/wrappers.js +1 -1
- package/proto/generated/platform.client.d.ts +46 -46
- package/proto/generated/platform.client.js +1 -1
- package/proto/generated/platform.d.ts +1 -1
- package/proto/generated/platform.js +2 -2
- package/src/DashPlatformSDK.d.ts +14 -14
- package/src/DashPlatformSDK.js +12 -12
- package/src/contestedResources/getContestedResourceVoteState.d.ts +3 -3
- package/src/contestedResources/getContestedResourceVoteState.js +4 -4
- package/src/contestedResources/index.d.ts +3 -3
- package/src/contestedResources/index.js +1 -1
- package/src/dataContracts/create.d.ts +1 -1
- package/src/dataContracts/getDataContractByIdentifier.d.ts +2 -2
- package/src/dataContracts/getDataContractByIdentifier.js +5 -5
- package/src/dataContracts/index.d.ts +2 -2
- package/src/dataContracts/index.js +3 -3
- package/src/documents/create.d.ts +1 -1
- package/src/documents/createStateTransition.d.ts +1 -1
- package/src/documents/index.d.ts +2 -2
- package/src/documents/index.js +3 -3
- package/src/documents/query.d.ts +2 -2
- package/src/documents/query.js +6 -6
- package/src/grpcConnectionPool.d.ts +2 -2
- package/src/grpcConnectionPool.js +4 -4
- package/src/identities/createStateTransition.d.ts +1 -1
- package/src/identities/getIdentityBalance.d.ts +2 -2
- package/src/identities/getIdentityBalance.js +4 -4
- package/src/identities/getIdentityByIdentifier.d.ts +2 -2
- package/src/identities/getIdentityByIdentifier.js +4 -4
- package/src/identities/getIdentityByNonUniquePublicKeyHash.d.ts +1 -1
- package/src/identities/getIdentityByNonUniquePublicKeyHash.js +6 -6
- package/src/identities/getIdentityByPublicKeyHash.d.ts +1 -1
- package/src/identities/getIdentityByPublicKeyHash.js +5 -5
- package/src/identities/getIdentityContractNonce.d.ts +2 -2
- package/src/identities/getIdentityContractNonce.js +4 -4
- package/src/identities/getIdentityNonce.d.ts +2 -2
- package/src/identities/getIdentityNonce.js +4 -4
- package/src/identities/getIdentityPublicKeys.d.ts +2 -2
- package/src/identities/getIdentityPublicKeys.js +4 -4
- package/src/identities/index.d.ts +2 -2
- package/src/identities/index.js +9 -9
- package/src/keyPair/index.d.ts +1 -1
- package/src/keyPair/index.js +3 -3
- package/src/names/index.d.ts +2 -2
- package/src/names/index.js +7 -7
- package/src/names/registerName.d.ts +1 -1
- package/src/names/registerName.js +10 -10
- package/src/names/searchByIdentity.d.ts +1 -1
- package/src/names/searchByIdentity.js +1 -1
- package/src/names/searchByName.d.ts +1 -1
- package/src/names/searchByName.js +2 -2
- package/src/node/epochs.d.ts +1 -1
- package/src/node/epochs.js +5 -5
- package/src/node/index.d.ts +3 -3
- package/src/node/index.js +3 -3
- package/src/node/status.d.ts +2 -2
- package/src/node/status.js +2 -2
- package/src/node/totalCredits.d.ts +2 -2
- package/src/node/totalCredits.js +5 -5
- package/src/signer/PrivateKeySigner.d.ts +1 -0
- package/src/signer/PrivateKeySigner.js +1 -0
- package/src/signer/setSigner.d.ts +1 -1
- package/src/stateTransitions/broadcast.d.ts +1 -1
- package/src/stateTransitions/broadcast.js +1 -1
- package/src/stateTransitions/index.d.ts +1 -1
- package/src/stateTransitions/index.js +2 -2
- package/src/stateTransitions/waitForStateTransitionResult.d.ts +1 -1
- package/src/tokens/createStateTransition.d.ts +1 -1
- package/src/tokens/getIdentitiesTokenBalances.d.ts +2 -2
- package/src/tokens/getIdentitiesTokenBalances.js +4 -4
- package/src/tokens/getIdentityTokensBalances.d.ts +2 -2
- package/src/tokens/getIdentityTokensBalances.js +4 -4
- package/src/tokens/getTokenContractInfo.d.ts +2 -2
- package/src/tokens/getTokenContractInfo.js +4 -4
- package/src/tokens/getTokenDirectPurchasePrices.d.ts +2 -2
- package/src/tokens/getTokenDirectPurchasePrices.js +4 -4
- package/src/tokens/getTokenTotalSupply.d.ts +2 -2
- package/src/tokens/getTokenTotalSupply.js +4 -4
- package/src/tokens/index.d.ts +5 -5
- package/src/tokens/index.js +7 -7
- package/src/types.d.ts +2 -2
- package/src/types.js +1 -1
- package/src/utils/calculateMsgHash.js +1 -1
- package/src/utils/calculateSignHash.d.ts +1 -1
- package/src/utils/calculateSignHash.js +3 -3
- package/src/utils/calculateStateIdHash.d.ts +1 -1
- package/src/utils/calculateStateIdHash.js +2 -2
- package/src/utils/createVoterIdentityId.js +3 -3
- package/src/utils/getEvonodeList.d.ts +1 -1
- package/src/utils/index.js +3 -3
- package/src/utils/sha256.js +2 -2
- package/src/utils/signHash.js +1 -1
- package/src/utils/signRequestId.js +1 -1
- package/src/utils/verifyTenderdashProof.d.ts +1 -1
- package/src/utils/verifyTenderdashProof.js +4 -4
- package/src/voting/index.d.ts +1 -1
- package/src/voting/index.js +2 -2
- package/test/unit/ContestedResources.spec.js +2 -3
- package/test/unit/DataContract.spec.js +1 -1
- package/test/unit/Document.spec.js +1 -1
- package/test/unit/Identity.spec.js +1 -1
- package/test/unit/KeyPair.spec.js +1 -1
- package/test/unit/Names.spec.js +3 -3
- package/test/unit/Node.spec.js +1 -1
- package/test/unit/SDK.spec.js +1 -1
- package/test/unit/Tokens.spec.js +1 -1
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DashPlatformSDK } from './src/DashPlatformSDK';
|
|
1
|
+
import { DashPlatformSDK } from './src/DashPlatformSDK.js';
|
|
2
2
|
export { DashPlatformSDK };
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DashPlatformSDK } from './src/DashPlatformSDK';
|
|
1
|
+
import { DashPlatformSDK } from './src/DashPlatformSDK.js';
|
|
2
2
|
export { DashPlatformSDK };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dash-platform-sdk",
|
|
3
|
-
"version": "1.3.0-dev.
|
|
3
|
+
"version": "1.3.0-dev.7",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Lightweight SDK for accessing Dash Platform blockchain",
|
|
6
6
|
"ts-standard": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"jest": "^29.7.0",
|
|
31
31
|
"jest-environment-jsdom": "^30.1.2",
|
|
32
32
|
"protoc": "^32.1.0",
|
|
33
|
+
"replace-in-file": "^8.3.0",
|
|
33
34
|
"rollup": "^4.52.4",
|
|
34
35
|
"ts-proto": "^2.7.7",
|
|
35
36
|
"ts-standard": "^12.0.2",
|
|
@@ -39,8 +40,9 @@
|
|
|
39
40
|
},
|
|
40
41
|
"scripts": {
|
|
41
42
|
"build": "tsc && rollup -c rollup.config.js",
|
|
42
|
-
"build:grpc": "protoc -I=./proto --ts_opt generate_dependencies --ts_out=proto/generated --ts_opt=long_type_string ./proto/platform.proto",
|
|
43
|
+
"build:grpc": "protoc -I=./proto --ts_opt generate_dependencies --ts_out=proto/generated --ts_opt=output_typescript --ts_opt=long_type_string ./proto/platform.proto && npm run patch:grpc",
|
|
43
44
|
"build:typescript": "tsc",
|
|
45
|
+
"patch:grpc": "node scripts/patch-esm-grpc.js",
|
|
44
46
|
"lint": "ts-standard --fix",
|
|
45
47
|
"test": "jest",
|
|
46
48
|
"docs": "typedoc"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies,long_type_string
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies,output_typescript,long_type_string
|
|
2
2
|
// @generated from protobuf file "google/protobuf/wrappers.proto" (package "google.protobuf", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
//
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
|
2
2
|
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
|
3
|
-
import type { GetTokenTotalSupplyResponse } from "./platform";
|
|
4
|
-
import type { GetTokenTotalSupplyRequest } from "./platform";
|
|
5
|
-
import type { GetTokenDirectPurchasePricesResponse } from "./platform";
|
|
6
|
-
import type { GetTokenDirectPurchasePricesRequest } from "./platform";
|
|
7
|
-
import type { GetTokenContractInfoResponse } from "./platform";
|
|
8
|
-
import type { GetTokenContractInfoRequest } from "./platform";
|
|
9
|
-
import type { GetIdentitiesTokenBalancesResponse } from "./platform";
|
|
10
|
-
import type { GetIdentitiesTokenBalancesRequest } from "./platform";
|
|
11
|
-
import type { GetIdentityTokenBalancesResponse } from "./platform";
|
|
12
|
-
import type { GetIdentityTokenBalancesRequest } from "./platform";
|
|
13
|
-
import type { GetStatusResponse } from "./platform";
|
|
14
|
-
import type { GetStatusRequest } from "./platform";
|
|
15
|
-
import type { GetTotalCreditsInPlatformResponse } from "./platform";
|
|
16
|
-
import type { GetTotalCreditsInPlatformRequest } from "./platform";
|
|
17
|
-
import type { GetContestedResourceVoteStateResponse } from "./platform";
|
|
18
|
-
import type { GetContestedResourceVoteStateRequest } from "./platform";
|
|
19
|
-
import type { GetContestedResourcesResponse } from "./platform";
|
|
20
|
-
import type { GetContestedResourcesRequest } from "./platform";
|
|
21
|
-
import type { GetEpochsInfoResponse } from "./platform";
|
|
22
|
-
import type { GetEpochsInfoRequest } from "./platform";
|
|
23
|
-
import type { GetIdentityByNonUniquePublicKeyHashResponse } from "./platform";
|
|
24
|
-
import type { GetIdentityByNonUniquePublicKeyHashRequest } from "./platform";
|
|
25
|
-
import type { GetIdentityByPublicKeyHashResponse } from "./platform";
|
|
26
|
-
import type { GetIdentityByPublicKeyHashRequest } from "./platform";
|
|
27
|
-
import type { GetDocumentsResponse } from "./platform";
|
|
28
|
-
import type { GetDocumentsRequest } from "./platform";
|
|
29
|
-
import type { GetDataContractResponse } from "./platform";
|
|
30
|
-
import type { GetDataContractRequest } from "./platform";
|
|
31
|
-
import type { GetIdentityBalanceAndRevisionResponse } from "./platform";
|
|
32
|
-
import type { GetIdentityBalanceAndRevisionRequest } from "./platform";
|
|
33
|
-
import type { GetIdentitiesBalancesResponse } from "./platform";
|
|
34
|
-
import type { GetIdentitiesBalancesRequest } from "./platform";
|
|
35
|
-
import type { GetIdentityBalanceResponse } from "./platform";
|
|
36
|
-
import type { GetIdentityBalanceRequest } from "./platform";
|
|
37
|
-
import type { GetIdentityContractNonceResponse } from "./platform";
|
|
38
|
-
import type { GetIdentityContractNonceRequest } from "./platform";
|
|
39
|
-
import type { GetIdentityNonceResponse } from "./platform";
|
|
40
|
-
import type { GetIdentityNonceRequest } from "./platform";
|
|
41
|
-
import type { GetIdentitiesContractKeysResponse } from "./platform";
|
|
42
|
-
import type { GetIdentitiesContractKeysRequest } from "./platform";
|
|
43
|
-
import type { GetIdentityKeysResponse } from "./platform";
|
|
44
|
-
import type { GetIdentityKeysRequest } from "./platform";
|
|
45
|
-
import type { GetIdentityResponse } from "./platform";
|
|
46
|
-
import type { GetIdentityRequest } from "./platform";
|
|
47
|
-
import type { BroadcastStateTransitionResponse } from "./platform";
|
|
48
|
-
import type { BroadcastStateTransitionRequest } from "./platform";
|
|
3
|
+
import type { GetTokenTotalSupplyResponse } from "./platform.js";
|
|
4
|
+
import type { GetTokenTotalSupplyRequest } from "./platform.js";
|
|
5
|
+
import type { GetTokenDirectPurchasePricesResponse } from "./platform.js";
|
|
6
|
+
import type { GetTokenDirectPurchasePricesRequest } from "./platform.js";
|
|
7
|
+
import type { GetTokenContractInfoResponse } from "./platform.js";
|
|
8
|
+
import type { GetTokenContractInfoRequest } from "./platform.js";
|
|
9
|
+
import type { GetIdentitiesTokenBalancesResponse } from "./platform.js";
|
|
10
|
+
import type { GetIdentitiesTokenBalancesRequest } from "./platform.js";
|
|
11
|
+
import type { GetIdentityTokenBalancesResponse } from "./platform.js";
|
|
12
|
+
import type { GetIdentityTokenBalancesRequest } from "./platform.js";
|
|
13
|
+
import type { GetStatusResponse } from "./platform.js";
|
|
14
|
+
import type { GetStatusRequest } from "./platform.js";
|
|
15
|
+
import type { GetTotalCreditsInPlatformResponse } from "./platform.js";
|
|
16
|
+
import type { GetTotalCreditsInPlatformRequest } from "./platform.js";
|
|
17
|
+
import type { GetContestedResourceVoteStateResponse } from "./platform.js";
|
|
18
|
+
import type { GetContestedResourceVoteStateRequest } from "./platform.js";
|
|
19
|
+
import type { GetContestedResourcesResponse } from "./platform.js";
|
|
20
|
+
import type { GetContestedResourcesRequest } from "./platform.js";
|
|
21
|
+
import type { GetEpochsInfoResponse } from "./platform.js";
|
|
22
|
+
import type { GetEpochsInfoRequest } from "./platform.js";
|
|
23
|
+
import type { GetIdentityByNonUniquePublicKeyHashResponse } from "./platform.js";
|
|
24
|
+
import type { GetIdentityByNonUniquePublicKeyHashRequest } from "./platform.js";
|
|
25
|
+
import type { GetIdentityByPublicKeyHashResponse } from "./platform.js";
|
|
26
|
+
import type { GetIdentityByPublicKeyHashRequest } from "./platform.js";
|
|
27
|
+
import type { GetDocumentsResponse } from "./platform.js";
|
|
28
|
+
import type { GetDocumentsRequest } from "./platform.js";
|
|
29
|
+
import type { GetDataContractResponse } from "./platform.js";
|
|
30
|
+
import type { GetDataContractRequest } from "./platform.js";
|
|
31
|
+
import type { GetIdentityBalanceAndRevisionResponse } from "./platform.js";
|
|
32
|
+
import type { GetIdentityBalanceAndRevisionRequest } from "./platform.js";
|
|
33
|
+
import type { GetIdentitiesBalancesResponse } from "./platform.js";
|
|
34
|
+
import type { GetIdentitiesBalancesRequest } from "./platform.js";
|
|
35
|
+
import type { GetIdentityBalanceResponse } from "./platform.js";
|
|
36
|
+
import type { GetIdentityBalanceRequest } from "./platform.js";
|
|
37
|
+
import type { GetIdentityContractNonceResponse } from "./platform.js";
|
|
38
|
+
import type { GetIdentityContractNonceRequest } from "./platform.js";
|
|
39
|
+
import type { GetIdentityNonceResponse } from "./platform.js";
|
|
40
|
+
import type { GetIdentityNonceRequest } from "./platform.js";
|
|
41
|
+
import type { GetIdentitiesContractKeysResponse } from "./platform.js";
|
|
42
|
+
import type { GetIdentitiesContractKeysRequest } from "./platform.js";
|
|
43
|
+
import type { GetIdentityKeysResponse } from "./platform.js";
|
|
44
|
+
import type { GetIdentityKeysRequest } from "./platform.js";
|
|
45
|
+
import type { GetIdentityResponse } from "./platform.js";
|
|
46
|
+
import type { GetIdentityRequest } from "./platform.js";
|
|
47
|
+
import type { BroadcastStateTransitionResponse } from "./platform.js";
|
|
48
|
+
import type { BroadcastStateTransitionRequest } from "./platform.js";
|
|
49
49
|
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
50
50
|
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
|
51
51
|
/**
|
|
@@ -5,7 +5,7 @@ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
|
5
5
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
6
6
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
7
7
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
8
|
-
import { UInt32Value } from "./google/protobuf/wrappers";
|
|
8
|
+
import { UInt32Value } from "./google/protobuf/wrappers.js";
|
|
9
9
|
/**
|
|
10
10
|
* Proof message includes cryptographic proofs for validating responses
|
|
11
11
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies,long_type_string
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies,output_typescript,long_type_string
|
|
2
2
|
// @generated from protobuf file "platform.proto" (package "org.dash.platform.dapi.v0", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
@@ -6,7 +6,7 @@ import { WireType } from "@protobuf-ts/runtime";
|
|
|
6
6
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
7
7
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
8
8
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
9
|
-
import { UInt32Value } from "./google/protobuf/wrappers";
|
|
9
|
+
import { UInt32Value } from "./google/protobuf/wrappers.js";
|
|
10
10
|
/**
|
|
11
11
|
* @generated from protobuf enum org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType
|
|
12
12
|
*/
|
package/src/DashPlatformSDK.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import GRPCConnectionPool from './grpcConnectionPool';
|
|
2
|
-
import { IdentitiesController } from './identities';
|
|
3
|
-
import { StateTransitionsController } from './stateTransitions';
|
|
4
|
-
import { DocumentsController } from './documents';
|
|
5
|
-
import { UtilsController } from './utils';
|
|
6
|
-
import { KeyPairController } from './keyPair';
|
|
7
|
-
import { NodeController } from './node';
|
|
8
|
-
import { NamesController } from './names';
|
|
9
|
-
import { DataContractsController } from './dataContracts';
|
|
10
|
-
import { ContestedResourcesController } from './contestedResources';
|
|
11
|
-
import { TokensController } from './tokens';
|
|
12
|
-
import { AbstractSigner } from './signer/AbstractSigner';
|
|
13
|
-
import { VotingController } from './voting';
|
|
14
|
-
import { Network } from './types';
|
|
1
|
+
import GRPCConnectionPool from './grpcConnectionPool.js';
|
|
2
|
+
import { IdentitiesController } from './identities/index.js';
|
|
3
|
+
import { StateTransitionsController } from './stateTransitions/index.js';
|
|
4
|
+
import { DocumentsController } from './documents/index.js';
|
|
5
|
+
import { UtilsController } from './utils/index.js';
|
|
6
|
+
import { KeyPairController } from './keyPair/index.js';
|
|
7
|
+
import { NodeController } from './node/index.js';
|
|
8
|
+
import { NamesController } from './names/index.js';
|
|
9
|
+
import { DataContractsController } from './dataContracts/index.js';
|
|
10
|
+
import { ContestedResourcesController } from './contestedResources/index.js';
|
|
11
|
+
import { TokensController } from './tokens/index.js';
|
|
12
|
+
import { AbstractSigner } from './signer/AbstractSigner.js';
|
|
13
|
+
import { VotingController } from './voting/index.js';
|
|
14
|
+
import { Network } from './types.js';
|
|
15
15
|
export interface GRPCOptions {
|
|
16
16
|
poolLimit: 5;
|
|
17
17
|
dapiUrl?: string | string[];
|
package/src/DashPlatformSDK.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import GRPCConnectionPool from './grpcConnectionPool';
|
|
2
|
-
import { IdentitiesController } from './identities';
|
|
3
|
-
import { StateTransitionsController } from './stateTransitions';
|
|
4
|
-
import { DocumentsController } from './documents';
|
|
5
|
-
import { UtilsController } from './utils';
|
|
6
|
-
import { KeyPairController } from './keyPair';
|
|
7
|
-
import { NodeController } from './node';
|
|
8
|
-
import { NamesController } from './names';
|
|
9
|
-
import { DataContractsController } from './dataContracts';
|
|
10
|
-
import { ContestedResourcesController } from './contestedResources';
|
|
11
|
-
import { TokensController } from './tokens';
|
|
12
|
-
import { VotingController } from './voting';
|
|
1
|
+
import GRPCConnectionPool from './grpcConnectionPool.js';
|
|
2
|
+
import { IdentitiesController } from './identities/index.js';
|
|
3
|
+
import { StateTransitionsController } from './stateTransitions/index.js';
|
|
4
|
+
import { DocumentsController } from './documents/index.js';
|
|
5
|
+
import { UtilsController } from './utils/index.js';
|
|
6
|
+
import { KeyPairController } from './keyPair/index.js';
|
|
7
|
+
import { NodeController } from './node/index.js';
|
|
8
|
+
import { NamesController } from './names/index.js';
|
|
9
|
+
import { DataContractsController } from './dataContracts/index.js';
|
|
10
|
+
import { ContestedResourcesController } from './contestedResources/index.js';
|
|
11
|
+
import { TokensController } from './tokens/index.js';
|
|
12
|
+
import { VotingController } from './voting/index.js';
|
|
13
13
|
/**
|
|
14
14
|
* Javascript SDK for that let you interact with a Dash Platform blockchain
|
|
15
15
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ContestedResourceVoteState, ContestedStateResultType } from '../types';
|
|
2
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
3
|
-
import { GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo } from '../../proto/generated/platform';
|
|
1
|
+
import { ContestedResourceVoteState, ContestedStateResultType } from '../types.js';
|
|
2
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
|
+
import { GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo } from '../../proto/generated/platform.js';
|
|
4
4
|
import { DataContractWASM } from 'pshenmic-dpp';
|
|
5
5
|
export type StartAtIdentifierInfo = GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo;
|
|
6
6
|
export default function getContestedResourceVoteState(grpcPool: GRPCConnectionPool, contract: DataContractWASM, documentTypeName: string, indexName: string, indexValues: Array<Uint8Array<ArrayBufferLike>>, resultType: ContestedStateResultType, allowIncludeLockedAndAbstainingVoteTally: boolean, startAtIdentifierInfo?: StartAtIdentifierInfo, count?: number): Promise<ContestedResourceVoteState>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GetContestedResourceVoteStateRequest } from '../../proto/generated/platform';
|
|
1
|
+
import { GetContestedResourceVoteStateRequest } from '../../proto/generated/platform.js';
|
|
2
2
|
import { DocumentWASM, IdentifierWASM, PlatformVersionWASM, verifyVotePollVoteStateProof } from 'pshenmic-dpp';
|
|
3
|
-
import verifyTenderdashProof from '../utils/verifyTenderdashProof';
|
|
4
|
-
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey';
|
|
5
|
-
import bytesToHex from '../utils/bytesToHex';
|
|
3
|
+
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
4
|
+
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
5
|
+
import bytesToHex from '../utils/bytesToHex.js';
|
|
6
6
|
export default async function getContestedResourceVoteState(grpcPool, contract, documentTypeName, indexName, indexValues, resultType, allowIncludeLockedAndAbstainingVoteTally, startAtIdentifierInfo, count) {
|
|
7
7
|
if (startAtIdentifierInfo != null) {
|
|
8
8
|
startAtIdentifierInfo = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
2
|
-
import { ContestedResourceVoteState, ContestedStateResultType } from '../types';
|
|
1
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
+
import { ContestedResourceVoteState, ContestedStateResultType } from '../types.js';
|
|
3
3
|
import { DataContractWASM } from 'pshenmic-dpp';
|
|
4
|
-
import { StartAtIdentifierInfo } from './getContestedResourceVoteState';
|
|
4
|
+
import { StartAtIdentifierInfo } from './getContestedResourceVoteState.js';
|
|
5
5
|
/**
|
|
6
6
|
* Contested Resources controller for requesting information about contested resources
|
|
7
7
|
*
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DataContractWASM, PlatformVersionWASM, TokenConfigurationWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { DataContractConfig, IdentifierLike } from '../types';
|
|
2
|
+
import { DataContractConfig, IdentifierLike } from '../types.js';
|
|
3
3
|
export default function createDataContract(ownerId: IdentifierLike, identityNonce: bigint, schema: object, tokenConfiguration?: TokenConfigurationWASM, config?: DataContractConfig, fullValidation?: boolean | undefined, platformVersion?: PlatformVersionWASM | undefined): DataContractWASM;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DataContractWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { IdentifierLike } from '../types';
|
|
3
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
2
|
+
import { IdentifierLike } from '../types.js';
|
|
3
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
4
4
|
export default function getByIdentifier(grpcPool: GRPCConnectionPool, identifier: IdentifierLike): Promise<DataContractWASM>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DataContractWASM, IdentifierWASM, PlatformVersionWASM, verifyContractProof } from 'pshenmic-dpp';
|
|
2
|
-
import { GetDataContractRequest } from '../../proto/generated/platform';
|
|
3
|
-
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey';
|
|
4
|
-
import bytesToHex from '../utils/bytesToHex';
|
|
5
|
-
import verifyTenderdashProof from '../utils/verifyTenderdashProof';
|
|
6
|
-
import { DPNS_DATA_CONTRACT_BYTES, DPNS_DATA_CONTRACT_ID } from '../constants';
|
|
2
|
+
import { GetDataContractRequest } from '../../proto/generated/platform.js';
|
|
3
|
+
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
4
|
+
import bytesToHex from '../utils/bytesToHex.js';
|
|
5
|
+
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
6
|
+
import { DPNS_DATA_CONTRACT_BYTES, DPNS_DATA_CONTRACT_ID } from '../constants.js';
|
|
7
7
|
export default async function getByIdentifier(grpcPool, identifier) {
|
|
8
8
|
const id = new IdentifierWASM(identifier);
|
|
9
9
|
if (id.base58() === DPNS_DATA_CONTRACT_ID) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DataContractConfig, IdentifierLike } from '../types';
|
|
1
|
+
import { DataContractConfig, IdentifierLike } from '../types.js';
|
|
2
2
|
import { DataContractWASM, PlatformVersionWASM, StateTransitionWASM, TokenConfigurationWASM } from 'pshenmic-dpp';
|
|
3
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
3
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
4
4
|
/**
|
|
5
5
|
* Collection of methods necessary to work with Data Contracts in the network,
|
|
6
6
|
* such as data contract creation or retrieval
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import getDataContractByIdentifier from './getDataContractByIdentifier';
|
|
2
|
-
import createDataContract from './create';
|
|
3
|
-
import createStateTransition from './createStateTransition';
|
|
1
|
+
import getDataContractByIdentifier from './getDataContractByIdentifier.js';
|
|
2
|
+
import createDataContract from './create.js';
|
|
3
|
+
import createStateTransition from './createStateTransition.js';
|
|
4
4
|
/**
|
|
5
5
|
* Collection of methods necessary to work with Data Contracts in the network,
|
|
6
6
|
* such as data contract creation or retrieval
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DocumentWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { IdentifierLike } from '../types';
|
|
2
|
+
import { IdentifierLike } from '../types.js';
|
|
3
3
|
export default function createDocument(dataContractId: IdentifierLike, documentType: string, data: object, owner: IdentifierLike, revision?: bigint, documentId?: IdentifierLike): DocumentWASM;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DocumentWASM, StateTransitionWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { DocumentTransitionParams } from '../types';
|
|
2
|
+
import { DocumentTransitionParams } from '../types.js';
|
|
3
3
|
export default function createStateTransition(document: DocumentWASM, type: 'create' | 'replace' | 'delete' | 'updatePrice' | 'transfer' | 'purchase', params: DocumentTransitionParams): StateTransitionWASM;
|
package/src/documents/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DocumentTransitionParams, IdentifierLike } from '../types';
|
|
1
|
+
import { DocumentTransitionParams, IdentifierLike } from '../types.js';
|
|
2
2
|
import { DocumentWASM, IdentifierWASM, StateTransitionWASM } from 'pshenmic-dpp';
|
|
3
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
3
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
4
4
|
/**
|
|
5
5
|
* Collection of methods to work with documents like creation, querying or preparing a transition action
|
|
6
6
|
*
|
package/src/documents/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import createDocument from './create';
|
|
1
|
+
import createDocument from './create.js';
|
|
2
2
|
import { IdentifierWASM, PrefundedVotingBalanceWASM, TokenPaymentInfoWASM } from 'pshenmic-dpp';
|
|
3
|
-
import createStateTransition from './createStateTransition';
|
|
4
|
-
import query from './query';
|
|
3
|
+
import createStateTransition from './createStateTransition.js';
|
|
4
|
+
import query from './query.js';
|
|
5
5
|
/**
|
|
6
6
|
* Collection of methods to work with documents like creation, querying or preparing a transition action
|
|
7
7
|
*
|
package/src/documents/query.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DocumentWASM, IdentifierWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { IdentifierLike } from '../types';
|
|
3
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
2
|
+
import { IdentifierLike } from '../types.js';
|
|
3
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
4
4
|
export default function query(grpcPool: GRPCConnectionPool, dataContractId: IdentifierLike, documentTypeName: string, where?: ArrayLike<any>, orderBy?: ArrayLike<any>, limit?: number | undefined, startAt?: IdentifierWASM, startAfter?: IdentifierWASM): Promise<DocumentWASM[]>;
|
package/src/documents/query.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { GetDocumentsRequest } from '../../proto/generated/platform';
|
|
1
|
+
import { GetDocumentsRequest } from '../../proto/generated/platform.js';
|
|
2
2
|
import { IdentifierWASM, PlatformVersionWASM, verifyDocumentsProof } from 'pshenmic-dpp';
|
|
3
|
-
import { DAPI_DEFAULT_LIMIT } from '../constants';
|
|
4
|
-
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey';
|
|
5
|
-
import bytesToHex from '../utils/bytesToHex';
|
|
6
|
-
import verifyTenderdashProof from '../utils/verifyTenderdashProof';
|
|
3
|
+
import { DAPI_DEFAULT_LIMIT } from '../constants.js';
|
|
4
|
+
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
5
|
+
import bytesToHex from '../utils/bytesToHex.js';
|
|
6
|
+
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
7
7
|
import { encode } from 'cbor-x';
|
|
8
|
-
import getDataContractByIdentifier from '../dataContracts/getDataContractByIdentifier';
|
|
8
|
+
import getDataContractByIdentifier from '../dataContracts/getDataContractByIdentifier.js';
|
|
9
9
|
export default async function query(grpcPool, dataContractId, documentTypeName, where, orderBy, limit = 100, startAt, startAfter) {
|
|
10
10
|
if ([startAt, startAfter].filter(e => e != null).length === 2) {
|
|
11
11
|
throw new Error('Only startAt or startAfter could be specified at one time');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PlatformClient } from '../proto/generated/platform.client';
|
|
2
|
-
import { Network } from './types';
|
|
1
|
+
import { PlatformClient } from '../proto/generated/platform.client.js';
|
|
2
|
+
import { Network } from './types.js';
|
|
3
3
|
export type MasternodeList = Record<string, MasternodeInfo>;
|
|
4
4
|
export interface GRPCOptions {
|
|
5
5
|
poolLimit: 5;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport';
|
|
2
|
-
import { PlatformClient } from '../proto/generated/platform.client';
|
|
3
|
-
import getEvonodeList from './utils/getEvonodeList';
|
|
4
|
-
import { GetStatusRequest } from '../proto/generated/platform';
|
|
5
|
-
import getRandomArrayItem from './utils/getRandomArrayItem';
|
|
2
|
+
import { PlatformClient } from '../proto/generated/platform.client.js';
|
|
3
|
+
import getEvonodeList from './utils/getEvonodeList.js';
|
|
4
|
+
import { GetStatusRequest } from '../proto/generated/platform.js';
|
|
5
|
+
import getRandomArrayItem from './utils/getRandomArrayItem.js';
|
|
6
6
|
const GRPC_DEFAULT_POOL_LIMIT = 5;
|
|
7
7
|
const seedNodes = {
|
|
8
8
|
testnet: [
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { StateTransitionWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { IdentityTransitionParams } from '../types';
|
|
2
|
+
import { IdentityTransitionParams } from '../types.js';
|
|
3
3
|
export default function createStateTransition(type: 'create' | 'update' | 'topUp', params: IdentityTransitionParams): StateTransitionWASM;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IdentifierLike } from '../types';
|
|
2
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
1
|
+
import { IdentifierLike } from '../types.js';
|
|
2
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
3
|
export default function getIdentityBalance(grpcPool: GRPCConnectionPool, identifier: IdentifierLike): Promise<bigint>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GetIdentityBalanceRequest } from '../../proto/generated/platform';
|
|
1
|
+
import { GetIdentityBalanceRequest } from '../../proto/generated/platform.js';
|
|
2
2
|
import { IdentifierWASM, PlatformVersionWASM, verifyIdentityBalanceProof } from 'pshenmic-dpp';
|
|
3
|
-
import verifyTenderdashProof from '../utils/verifyTenderdashProof';
|
|
4
|
-
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey';
|
|
5
|
-
import bytesToHex from '../utils/bytesToHex';
|
|
3
|
+
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
4
|
+
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
5
|
+
import bytesToHex from '../utils/bytesToHex.js';
|
|
6
6
|
export default async function getIdentityBalance(grpcPool, identifier) {
|
|
7
7
|
const id = new IdentifierWASM(identifier);
|
|
8
8
|
const getIdentityBalanceRequest = GetIdentityBalanceRequest.create({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IdentityWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { IdentifierLike } from '../types';
|
|
3
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
2
|
+
import { IdentifierLike } from '../types.js';
|
|
3
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
4
4
|
export default function getIdentityByIdentifier(grpcPool: GRPCConnectionPool, identifier: IdentifierLike): Promise<IdentityWASM>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GetIdentityRequest } from '../../proto/generated/platform';
|
|
1
|
+
import { GetIdentityRequest } from '../../proto/generated/platform.js';
|
|
2
2
|
import { IdentifierWASM, PlatformVersionWASM, verifyIdentityByIdentifierProof } from 'pshenmic-dpp';
|
|
3
|
-
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey';
|
|
4
|
-
import bytesToHex from '../utils/bytesToHex';
|
|
5
|
-
import verifyTenderdashProof from '../utils/verifyTenderdashProof';
|
|
3
|
+
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
4
|
+
import bytesToHex from '../utils/bytesToHex.js';
|
|
5
|
+
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
6
6
|
export default async function getIdentityByIdentifier(grpcPool, identifier) {
|
|
7
7
|
const id = new IdentifierWASM(identifier);
|
|
8
8
|
const getIdentityRequest = GetIdentityRequest.create({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IdentityWASM } from 'pshenmic-dpp';
|
|
2
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
2
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
3
|
export default function getIdentityByNonUniquePublicKeyHash(grpcPool: GRPCConnectionPool, hex: string): Promise<IdentityWASM>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { GetIdentityByNonUniquePublicKeyHashRequest } from '../../proto/generated/platform';
|
|
1
|
+
import { GetIdentityByNonUniquePublicKeyHashRequest } from '../../proto/generated/platform.js';
|
|
2
2
|
import { PlatformVersionWASM, verifyIdentifierByNonUniquePublicKeyHashProof } from 'pshenmic-dpp';
|
|
3
|
-
import hexToBytes from '../utils/hexToBytes';
|
|
4
|
-
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey';
|
|
5
|
-
import bytesToHex from '../utils/bytesToHex';
|
|
6
|
-
import verifyTenderdashProof from '../utils/verifyTenderdashProof';
|
|
7
|
-
import getIdentityByIdentifier from './getIdentityByIdentifier';
|
|
3
|
+
import hexToBytes from '../utils/hexToBytes.js';
|
|
4
|
+
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
5
|
+
import bytesToHex from '../utils/bytesToHex.js';
|
|
6
|
+
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
7
|
+
import getIdentityByIdentifier from './getIdentityByIdentifier.js';
|
|
8
8
|
export default async function getIdentityByNonUniquePublicKeyHash(grpcPool, hex) {
|
|
9
9
|
const getIdentityByNonUniquePublicKeyHashRequest = GetIdentityByNonUniquePublicKeyHashRequest.create({
|
|
10
10
|
version: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IdentityWASM } from 'pshenmic-dpp';
|
|
2
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
2
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
3
|
export default function getIdentityByPublicKeyHash(grpcPool: GRPCConnectionPool, hex: string): Promise<IdentityWASM>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { GetIdentityByPublicKeyHashRequest } from '../../proto/generated/platform';
|
|
1
|
+
import { GetIdentityByPublicKeyHashRequest } from '../../proto/generated/platform.js';
|
|
2
2
|
import { PlatformVersionWASM, verifyIdentityByUniqueKeyHashProof } from 'pshenmic-dpp';
|
|
3
|
-
import hexToBytes from '../utils/hexToBytes';
|
|
4
|
-
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey';
|
|
5
|
-
import bytesToHex from '../utils/bytesToHex';
|
|
6
|
-
import verifyTenderdashProof from '../utils/verifyTenderdashProof';
|
|
3
|
+
import hexToBytes from '../utils/hexToBytes.js';
|
|
4
|
+
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
5
|
+
import bytesToHex from '../utils/bytesToHex.js';
|
|
6
|
+
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
7
7
|
export default async function getIdentityByPublicKeyHash(grpcPool, hex) {
|
|
8
8
|
const getIdentityByPublicKeyHashRequest = GetIdentityByPublicKeyHashRequest.create({
|
|
9
9
|
version: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IdentifierLike } from '../types';
|
|
2
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
1
|
+
import { IdentifierLike } from '../types.js';
|
|
2
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
3
|
export default function getIdentityContractNonce(grpcPool: GRPCConnectionPool, identity: IdentifierLike, dataContract: IdentifierLike): Promise<bigint>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GetIdentityContractNonceRequest } from '../../proto/generated/platform';
|
|
1
|
+
import { GetIdentityContractNonceRequest } from '../../proto/generated/platform.js';
|
|
2
2
|
import { IdentifierWASM, PlatformVersionWASM, verifyIdentityContractNonceProof } from 'pshenmic-dpp';
|
|
3
|
-
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey';
|
|
4
|
-
import bytesToHex from '../utils/bytesToHex';
|
|
5
|
-
import verifyTenderdashProof from '../utils/verifyTenderdashProof';
|
|
3
|
+
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
4
|
+
import bytesToHex from '../utils/bytesToHex.js';
|
|
5
|
+
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
6
6
|
const IDENTITY_CONTRACT_NONCE_VALUE_FILTER = BigInt(0xFFFFFFFFFF);
|
|
7
7
|
export default async function getIdentityContractNonce(grpcPool, identity, dataContract) {
|
|
8
8
|
const identityIdentifier = new IdentifierWASM(identity);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IdentifierLike } from '../types';
|
|
2
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
1
|
+
import { IdentifierLike } from '../types.js';
|
|
2
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
3
|
export default function getIdentityNonce(grpcPool: GRPCConnectionPool, identifier: IdentifierLike): Promise<bigint>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GetIdentityNonceRequest } from '../../proto/generated/platform';
|
|
1
|
+
import { GetIdentityNonceRequest } from '../../proto/generated/platform.js';
|
|
2
2
|
import { IdentifierWASM, PlatformVersionWASM, verifyIdentityNonceProof } from 'pshenmic-dpp';
|
|
3
|
-
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey';
|
|
4
|
-
import bytesToHex from '../utils/bytesToHex';
|
|
5
|
-
import verifyTenderdashProof from '../utils/verifyTenderdashProof';
|
|
3
|
+
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
4
|
+
import bytesToHex from '../utils/bytesToHex.js';
|
|
5
|
+
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
6
6
|
const IDENTITY_NONCE_VALUE_FILTER = BigInt(0xFFFFFFFFFF);
|
|
7
7
|
export default async function getIdentityNonce(grpcPool, identifier) {
|
|
8
8
|
const id = new IdentifierWASM(identifier);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IdentityPublicKeyWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { IdentifierLike } from '../types';
|
|
3
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
2
|
+
import { IdentifierLike } from '../types.js';
|
|
3
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
4
4
|
export default function getIdentityPublicKeys(grpcPool: GRPCConnectionPool, identifier: IdentifierLike): Promise<IdentityPublicKeyWASM[]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GetIdentityKeysRequest, KeyRequestType } from '../../proto/generated/platform';
|
|
1
|
+
import { GetIdentityKeysRequest, KeyRequestType } from '../../proto/generated/platform.js';
|
|
2
2
|
import { IdentifierWASM, PlatformVersionWASM, verifyIdentityKeysByIdentifierProof } from 'pshenmic-dpp';
|
|
3
|
-
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey';
|
|
4
|
-
import bytesToHex from '../utils/bytesToHex';
|
|
5
|
-
import verifyTenderdashProof from '../utils/verifyTenderdashProof';
|
|
3
|
+
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
4
|
+
import bytesToHex from '../utils/bytesToHex.js';
|
|
5
|
+
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
6
6
|
export default async function getIdentityPublicKeys(grpcPool, identifier) {
|
|
7
7
|
const id = new IdentifierWASM(identifier);
|
|
8
8
|
const getIdentityKeysRequest = GetIdentityKeysRequest.create({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IdentifierLike, IdentityTransitionParams } from '../types';
|
|
2
|
-
import GRPCConnectionPool from '../grpcConnectionPool';
|
|
1
|
+
import { IdentifierLike, IdentityTransitionParams } from '../types.js';
|
|
2
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
3
|
import { IdentityPublicKeyWASM, IdentityWASM, StateTransitionWASM } from 'pshenmic-dpp';
|
|
4
4
|
/**
|
|
5
5
|
* Collection of methods to query identities and its related data
|