dash-platform-sdk 1.4.0-dev.4 → 1.4.0-dev.5
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/bundle.min.js +17 -17
- package/package.json +2 -2
- package/proto/generated/platform.client.d.ts +10 -0
- package/proto/generated/platform.client.js +7 -0
- package/proto/generated/platform.d.ts +160 -0
- package/proto/generated/platform.js +333 -1
- package/src/DashPlatformSDK.d.ts +3 -1
- package/src/DashPlatformSDK.js +8 -5
- package/src/dataContracts/create.d.ts +2 -2
- package/src/dataContracts/getDataContractByIdentifier.d.ts +1 -2
- package/src/dataContracts/index.d.ts +2 -2
- package/src/documents/create.d.ts +1 -2
- package/src/documents/index.d.ts +2 -2
- package/src/documents/query.d.ts +1 -2
- package/src/identities/getIdentityBalance.d.ts +1 -1
- package/src/identities/getIdentityByIdentifier.d.ts +1 -2
- package/src/identities/getIdentityContractNonce.d.ts +1 -1
- package/src/identities/getIdentityNonce.d.ts +1 -1
- package/src/identities/getIdentityPublicKeys.d.ts +1 -2
- package/src/identities/index.d.ts +2 -2
- package/src/names/index.d.ts +1 -2
- package/src/node/index.d.ts +2 -3
- package/src/node/index.js +2 -4
- package/src/node/totalCredits.d.ts +1 -2
- package/src/node/totalCredits.js +2 -2
- package/src/platformAddresses/getAddressInfo.d.ts +4 -0
- package/src/platformAddresses/getAddressInfo.js +45 -0
- package/src/platformAddresses/index.d.ts +15 -0
- package/src/platformAddresses/index.js +17 -0
- package/src/tokens/getIdentitiesTokenBalances.d.ts +1 -2
- package/src/tokens/getIdentityTokensBalances.d.ts +1 -2
- package/src/tokens/getTokenContractInfo.d.ts +1 -2
- package/src/tokens/getTokenDirectPurchasePrices.d.ts +2 -1
- package/src/tokens/getTokenTotalSupply.d.ts +2 -1
- package/src/tokens/index.d.ts +2 -2
- package/src/utils/index.d.ts +1 -2
- package/src/voting/index.d.ts +2 -2
- package/test/unit/PlatformAddress.spec.d.ts +1 -0
- package/test/unit/PlatformAddress.spec.js +13 -0
- package/types.d.ts +7 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DataContractTokens, DataContractWASM, PlatformVersionWASM, StateTransitionWASM } from 'pshenmic-dpp';
|
|
1
|
+
import { DataContractTokens, DataContractWASM, IdentifierLike, PlatformVersionWASM, StateTransitionWASM } from 'pshenmic-dpp';
|
|
3
2
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
|
+
import { DataContractConfig } from '../../types.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,2 @@
|
|
|
1
|
-
import { DocumentWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { IdentifierLike } from '../../types.js';
|
|
1
|
+
import { DocumentWASM, IdentifierLike } from 'pshenmic-dpp';
|
|
3
2
|
export default function createDocument(dataContractId: IdentifierLike, documentType: string, data: object, owner: IdentifierLike, revision?: bigint, documentId?: IdentifierLike): DocumentWASM;
|
package/src/documents/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentTransitionParams
|
|
2
|
-
import { DocumentWASM, IdentifierWASM, StateTransitionWASM, WhereClause } from 'pshenmic-dpp';
|
|
1
|
+
import { DocumentTransitionParams } from '../../types.js';
|
|
2
|
+
import { DocumentWASM, IdentifierLike, IdentifierWASM, StateTransitionWASM, WhereClause } from 'pshenmic-dpp';
|
|
3
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
|
package/src/documents/query.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DocumentWASM, IdentifierWASM, WhereClause } from 'pshenmic-dpp';
|
|
2
|
-
import { IdentifierLike } from '../../types.js';
|
|
1
|
+
import { DocumentWASM, IdentifierLike, IdentifierWASM, WhereClause } from 'pshenmic-dpp';
|
|
3
2
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
4
3
|
export default function query(grpcPool: GRPCConnectionPool, dataContractId: IdentifierLike, documentTypeName: string, where?: WhereClause[], orderBy?: string[][], limit?: number | undefined, startAt?: IdentifierWASM, startAfter?: IdentifierWASM): Promise<DocumentWASM[]>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IdentifierLike } from '
|
|
1
|
+
import { IdentifierLike } from 'pshenmic-dpp';
|
|
2
2
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
3
|
export default function getIdentityBalance(grpcPool: GRPCConnectionPool, identifier: IdentifierLike): Promise<bigint>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IdentityWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { IdentifierLike } from '../../types.js';
|
|
1
|
+
import { IdentifierLike, IdentityWASM } from 'pshenmic-dpp';
|
|
3
2
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
4
3
|
export default function getIdentityByIdentifier(grpcPool: GRPCConnectionPool, identifier: IdentifierLike): Promise<IdentityWASM>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IdentifierLike } from '
|
|
1
|
+
import { IdentifierLike } from 'pshenmic-dpp';
|
|
2
2
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
3
|
export default function getIdentityContractNonce(grpcPool: GRPCConnectionPool, identity: IdentifierLike, dataContract: IdentifierLike): Promise<bigint>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IdentifierLike } from '
|
|
1
|
+
import { IdentifierLike } from 'pshenmic-dpp';
|
|
2
2
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
3
|
export default function getIdentityNonce(grpcPool: GRPCConnectionPool, identifier: IdentifierLike): Promise<bigint>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IdentityPublicKeyWASM } from 'pshenmic-dpp';
|
|
2
|
-
import { IdentifierLike } from '../../types.js';
|
|
1
|
+
import { IdentifierLike, IdentityPublicKeyWASM } from 'pshenmic-dpp';
|
|
3
2
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
4
3
|
export default function getIdentityPublicKeys(grpcPool: GRPCConnectionPool, identifier: IdentifierLike, keyIds?: number[]): Promise<IdentityPublicKeyWASM[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IdentityTransitionParams } from '../../types.js';
|
|
2
2
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
3
|
-
import { IdentityPublicKeyWASM, IdentityWASM, StateTransitionWASM } from 'pshenmic-dpp';
|
|
3
|
+
import { IdentifierLike, IdentityPublicKeyWASM, IdentityWASM, StateTransitionWASM } from 'pshenmic-dpp';
|
|
4
4
|
/**
|
|
5
5
|
* Collection of methods to query identities and its related data
|
|
6
6
|
*
|
package/src/names/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
-
import { DocumentWASM, PrivateKeyWASM } from 'pshenmic-dpp';
|
|
3
|
-
import { IdentifierLike } from '../../types.js';
|
|
2
|
+
import { DocumentWASM, IdentifierLike, PrivateKeyWASM } from 'pshenmic-dpp';
|
|
4
3
|
/**
|
|
5
4
|
* Functions related to DPNS names (usernames)
|
|
6
5
|
*
|
package/src/node/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
-
import {
|
|
2
|
+
import { NodeStatus } from '../../types.js';
|
|
3
3
|
import { EpochInfo } from './epochs.js';
|
|
4
4
|
/**
|
|
5
5
|
* Node controller for requesting information about DAPI node
|
|
@@ -9,8 +9,7 @@ import { EpochInfo } from './epochs.js';
|
|
|
9
9
|
export declare class NodeController {
|
|
10
10
|
/** @ignore **/
|
|
11
11
|
grpcPool: GRPCConnectionPool;
|
|
12
|
-
|
|
13
|
-
constructor(grpcPool: GRPCConnectionPool, network: Network);
|
|
12
|
+
constructor(grpcPool: GRPCConnectionPool);
|
|
14
13
|
/**
|
|
15
14
|
* Retrieves an info about node
|
|
16
15
|
* Includes information about genesis, chain, software versions
|
package/src/node/index.js
CHANGED
|
@@ -9,10 +9,8 @@ import getTotalCredits from './totalCredits.js';
|
|
|
9
9
|
export class NodeController {
|
|
10
10
|
/** @ignore **/
|
|
11
11
|
grpcPool;
|
|
12
|
-
|
|
13
|
-
constructor(grpcPool, network) {
|
|
12
|
+
constructor(grpcPool) {
|
|
14
13
|
this.grpcPool = grpcPool;
|
|
15
|
-
this.network = network;
|
|
16
14
|
}
|
|
17
15
|
/**
|
|
18
16
|
* Retrieves an info about node
|
|
@@ -29,7 +27,7 @@ export class NodeController {
|
|
|
29
27
|
* @return {Promise<bigint>}
|
|
30
28
|
*/
|
|
31
29
|
async totalCredits() {
|
|
32
|
-
return await getTotalCredits(this.grpcPool
|
|
30
|
+
return await getTotalCredits(this.grpcPool);
|
|
33
31
|
}
|
|
34
32
|
/**
|
|
35
33
|
* Retrieves an info about epochs
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
-
|
|
3
|
-
export default function totalCredits(grpcPool: GRPCConnectionPool, network: Network): Promise<bigint>;
|
|
2
|
+
export default function totalCredits(grpcPool: GRPCConnectionPool): Promise<bigint>;
|
package/src/node/totalCredits.js
CHANGED
|
@@ -4,7 +4,7 @@ import { verifyTotalCreditsProof } from 'pshenmic-dpp';
|
|
|
4
4
|
import { getQuorumPublicKey } from '../utils/getQuorumPublicKey.js';
|
|
5
5
|
import bytesToHex from '../utils/bytesToHex.js';
|
|
6
6
|
import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
|
|
7
|
-
export default async function totalCredits(grpcPool
|
|
7
|
+
export default async function totalCredits(grpcPool) {
|
|
8
8
|
const getTotalCreditsInPlatformRequest = GetTotalCreditsInPlatformRequest.create({
|
|
9
9
|
version: {
|
|
10
10
|
oneofKind: 'v0',
|
|
@@ -24,7 +24,7 @@ export default async function totalCredits(grpcPool, network) {
|
|
|
24
24
|
if (metadata == null) {
|
|
25
25
|
throw new Error('Metadata not found');
|
|
26
26
|
}
|
|
27
|
-
const activationHeight = network === 'testnet' ? TESTNET_ACTIVATION_HEIGHT : MAINNET_ACTIVATION_HEIGHT;
|
|
27
|
+
const activationHeight = grpcPool.network === 'testnet' ? TESTNET_ACTIVATION_HEIGHT : MAINNET_ACTIVATION_HEIGHT;
|
|
28
28
|
const { rootHash, totalCredits } = verifyTotalCreditsProof(proof.grovedbProof, HALVING_INTERVAL, activationHeight, Number(metadata.height), LATEST_PLATFORM_VERSION);
|
|
29
29
|
const quorumPublicKey = await getQuorumPublicKey(grpcPool.network, proof.quorumType, bytesToHex(proof.quorumHash));
|
|
30
30
|
const verify = await verifyTenderdashProof(proof, metadata, rootHash, quorumPublicKey);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
+
import { PlatformAddressLike } from 'pshenmic-dpp';
|
|
3
|
+
import { PlatformAddressInfo } from '../../types.js';
|
|
4
|
+
export declare function getAddressInfo(grpcPool: GRPCConnectionPool, platformAddress: PlatformAddressLike): Promise<PlatformAddressInfo>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PlatformAddressWASM, verifyPlatformAddressInfo } from 'pshenmic-dpp';
|
|
2
|
+
import { GetAddressInfoRequest } from '../../proto/generated/platform.js';
|
|
3
|
+
import { LATEST_PLATFORM_VERSION } 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
|
+
export async function getAddressInfo(grpcPool, platformAddress) {
|
|
8
|
+
const platformAddressWASM = new PlatformAddressWASM(platformAddress);
|
|
9
|
+
const getAddressInfoRequest = GetAddressInfoRequest.create({
|
|
10
|
+
version: {
|
|
11
|
+
oneofKind: 'v0',
|
|
12
|
+
v0: {
|
|
13
|
+
address: platformAddressWASM.bytes(),
|
|
14
|
+
prove: true
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const { response } = await grpcPool.getClient().getAddressInfo(getAddressInfoRequest);
|
|
19
|
+
const { version } = response;
|
|
20
|
+
if (version.oneofKind !== 'v0') {
|
|
21
|
+
throw new Error('Unexpected oneOf type returned from DAPI (must be v0)');
|
|
22
|
+
}
|
|
23
|
+
const { v0 } = version;
|
|
24
|
+
if (v0.result.oneofKind !== 'proof') {
|
|
25
|
+
throw new Error('Unexpected oneOf type returned from DAPI (must be proof)');
|
|
26
|
+
}
|
|
27
|
+
const { result: { proof }, metadata } = v0;
|
|
28
|
+
if (metadata == null) {
|
|
29
|
+
throw new Error('Metadata not found');
|
|
30
|
+
}
|
|
31
|
+
const { rootHash, address, nonce, balance } = await verifyPlatformAddressInfo(proof.grovedbProof, platformAddressWASM, true, LATEST_PLATFORM_VERSION);
|
|
32
|
+
if (address == null || nonce == null || balance == null) {
|
|
33
|
+
throw new Error(`Failed to fetch info for address ${platformAddressWASM.toBech32m(grpcPool.network)}`);
|
|
34
|
+
}
|
|
35
|
+
const quorumPublicKey = await getQuorumPublicKey(grpcPool.network, proof.quorumType, bytesToHex(proof.quorumHash));
|
|
36
|
+
const verify = await verifyTenderdashProof(proof, metadata, rootHash, quorumPublicKey);
|
|
37
|
+
if (!verify) {
|
|
38
|
+
throw new Error('Failed to verify query');
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
address,
|
|
42
|
+
nonce,
|
|
43
|
+
balance
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
+
import { PlatformAddressLike } from 'pshenmic-dpp';
|
|
3
|
+
import { PlatformAddressInfo } from '../../types.js';
|
|
4
|
+
export declare class PlatformAddressesController {
|
|
5
|
+
/** @ignore **/
|
|
6
|
+
grpcPool: GRPCConnectionPool;
|
|
7
|
+
constructor(grpcPool: GRPCConnectionPool);
|
|
8
|
+
/**
|
|
9
|
+
* Makes a query for platform address info, returns an object with address, balance and nonce
|
|
10
|
+
*
|
|
11
|
+
* @param address {PlatformAddressLike}
|
|
12
|
+
* @return {Promise<PlatformAddressInfo>}
|
|
13
|
+
*/
|
|
14
|
+
getAddressInfo(address: PlatformAddressLike): Promise<PlatformAddressInfo>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getAddressInfo } from './getAddressInfo.js';
|
|
2
|
+
export class PlatformAddressesController {
|
|
3
|
+
/** @ignore **/
|
|
4
|
+
grpcPool;
|
|
5
|
+
constructor(grpcPool) {
|
|
6
|
+
this.grpcPool = grpcPool;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Makes a query for platform address info, returns an object with address, balance and nonce
|
|
10
|
+
*
|
|
11
|
+
* @param address {PlatformAddressLike}
|
|
12
|
+
* @return {Promise<PlatformAddressInfo>}
|
|
13
|
+
*/
|
|
14
|
+
async getAddressInfo(address) {
|
|
15
|
+
return await getAddressInfo(this.grpcPool, address);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
-
import { IdentifierLike } from '
|
|
3
|
-
import { IdentifierWASM } from 'pshenmic-dpp';
|
|
2
|
+
import { IdentifierLike, IdentifierWASM } from 'pshenmic-dpp';
|
|
4
3
|
export interface IdentitiesTokenBalances {
|
|
5
4
|
identityId: IdentifierWASM;
|
|
6
5
|
balance?: bigint | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
-
import { IdentifierLike } from '
|
|
3
|
-
import { IdentifierWASM } from 'pshenmic-dpp';
|
|
2
|
+
import { IdentifierLike, IdentifierWASM } from 'pshenmic-dpp';
|
|
4
3
|
export interface IdentityTokenBalances {
|
|
5
4
|
tokenId: IdentifierWASM;
|
|
6
5
|
balance?: bigint | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
-
import { IdentifierLike } from '
|
|
3
|
-
import { IdentifierWASM } from 'pshenmic-dpp';
|
|
2
|
+
import { IdentifierLike, IdentifierWASM } from 'pshenmic-dpp';
|
|
4
3
|
export interface TokenContractInfo {
|
|
5
4
|
dataContractId: IdentifierWASM;
|
|
6
5
|
tokenContractPosition: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
-
import {
|
|
2
|
+
import { TokenDirectPurchasePrices } from '../../types.js';
|
|
3
|
+
import { IdentifierLike } from 'pshenmic-dpp';
|
|
3
4
|
export default function getTokenDirectPurchasePrices(grpcPool: GRPCConnectionPool, tokenIdentifiers: IdentifierLike[]): Promise<TokenDirectPurchasePrices[]>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
-
import {
|
|
2
|
+
import { TokenTotalSupply } from '../../types.js';
|
|
3
|
+
import { IdentifierLike } from 'pshenmic-dpp';
|
|
3
4
|
export default function getTokenTotalSupply(grpcPool: GRPCConnectionPool, tokenIdentifier: IdentifierLike): Promise<TokenTotalSupply>;
|
package/src/tokens/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import GRPCConnectionPool from '../grpcConnectionPool.js';
|
|
2
|
-
import {
|
|
2
|
+
import { TokenDirectPurchasePrices, TokenTotalSupply, TokenTransitionParams, TokenTransitionType } from '../../types.js';
|
|
3
3
|
import { IdentitiesTokenBalances } from './getIdentitiesTokenBalances.js';
|
|
4
4
|
import { IdentityTokenBalances } from './getIdentityTokensBalances.js';
|
|
5
5
|
import { TokenContractInfo } from './getTokenContractInfo.js';
|
|
6
|
-
import { StateTransitionWASM, TokenBaseTransitionWASM } from 'pshenmic-dpp';
|
|
6
|
+
import { IdentifierLike, StateTransitionWASM, TokenBaseTransitionWASM } from 'pshenmic-dpp';
|
|
7
7
|
/**
|
|
8
8
|
* Tokens controller for requesting information about tokens and tokens holders
|
|
9
9
|
*
|
package/src/utils/index.d.ts
CHANGED
package/src/voting/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IdentifierLike,
|
|
2
|
-
import {
|
|
1
|
+
import { IdentifierLike, IdentifierWASM, StateTransitionWASM, VoteWASM } from 'pshenmic-dpp';
|
|
2
|
+
import { ResourceVoteChoice } from '../../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Voting controller for performing masternode votes
|
|
5
5
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DashPlatformSDK } from '../../src/DashPlatformSDK.js';
|
|
2
|
+
let sdk;
|
|
3
|
+
describe('PlatformAddress', () => {
|
|
4
|
+
beforeAll(() => {
|
|
5
|
+
sdk = new DashPlatformSDK({ network: 'testnet' });
|
|
6
|
+
});
|
|
7
|
+
test('getAddressInfo', async () => {
|
|
8
|
+
const info = await sdk.platformAddresses.getAddressInfo('tdashevo1qpgz9hk6tkn5zj3653s8qkjmk9439qkf0gl4yxxw');
|
|
9
|
+
expect(info.balance).toBeDefined();
|
|
10
|
+
expect(info.nonce).toBeDefined();
|
|
11
|
+
expect(info.address).toBeDefined();
|
|
12
|
+
});
|
|
13
|
+
});
|
package/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CoreScriptWASM, DocumentWASM, GasFeesPaidByWASM, IdentifierWASM, KeyType, Purpose, SecurityLevel, TokenEmergencyActionWASM, TokenPricingScheduleWASM } from 'pshenmic-dpp';
|
|
2
|
-
export { CoreScriptWASM, DocumentWASM, GasFeesPaidByWASM, IdentifierWASM, KeyType, Purpose, SecurityLevel, TokenEmergencyActionWASM, TokenPricingScheduleWASM, StateTransitionWASM, BatchTransitionWASM, IdentityPublicKeyWASM, PrivateKeyWASM, DataContractUpdateTransitionWASM, IdentityWASM, IdentityUpdateTransitionWASM, IdentityCreditTransferWASM, MasternodeVoteTransitionWASM } from 'pshenmic-dpp';
|
|
3
|
-
export type IdentifierLike = IdentifierWASM | string | Uint8Array;
|
|
1
|
+
import { CoreScriptWASM, DocumentWASM, GasFeesPaidByWASM, IdentifierLike, IdentifierWASM, KeyType, PlatformAddressWASM, Purpose, SecurityLevel, TokenEmergencyActionWASM, TokenPricingScheduleWASM } from 'pshenmic-dpp';
|
|
2
|
+
export { CoreScriptWASM, DocumentWASM, GasFeesPaidByWASM, IdentifierWASM, KeyType, Purpose, SecurityLevel, TokenEmergencyActionWASM, TokenPricingScheduleWASM, StateTransitionWASM, BatchTransitionWASM, IdentityPublicKeyWASM, PrivateKeyWASM, DataContractUpdateTransitionWASM, IdentityWASM, IdentityUpdateTransitionWASM, IdentityCreditTransferWASM, MasternodeVoteTransitionWASM, IdentifierLike, PlatformAddressLike } from 'pshenmic-dpp';
|
|
4
3
|
export type Network = 'mainnet' | 'testnet';
|
|
5
4
|
export { DashPlatformSDK } from './src/DashPlatformSDK.js';
|
|
6
5
|
export type MasternodeList = Record<string, MasternodeInfo>;
|
|
@@ -206,3 +205,8 @@ export interface TokenDirectPurchasePrices {
|
|
|
206
205
|
pricingSchedule?: TokenPricingScheduleWASM | undefined;
|
|
207
206
|
}
|
|
208
207
|
export type ResourceVoteChoice = IdentifierLike | 'lock' | 'abstain';
|
|
208
|
+
export interface PlatformAddressInfo {
|
|
209
|
+
address: PlatformAddressWASM;
|
|
210
|
+
nonce: number;
|
|
211
|
+
balance: bigint;
|
|
212
|
+
}
|