pshenmic-dpp 2.0.0-dev.1 → 2.0.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/binaries/bindingsTypes.d.ts +6 -2
- package/dist/binaries/bindingsTypes.js +1 -0
- package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
- package/dist/binaries/wasm/wasmBytes.js +1 -1
- package/dist/src/dpp/enums.d.ts +1 -1
- package/dist/src/dpp/enums.js +1 -1
- package/dist/src/dpp/structs/Address/AddressWitness.d.ts +1 -1
- package/dist/src/dpp/structs/Address/PlatformAddress.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/entities/AddressFundsFeeStrategyStep.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +1 -1
- package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.d.ts +1 -1
- package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.js +1 -2
- package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.d.ts +1 -1
- package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.d.ts +1 -1
- package/dist/src/dpp/structs/AssetLockProof/OutPoint.d.ts +1 -1
- package/dist/src/dpp/structs/AssetLockProof/Transaction.d.ts +1 -1
- package/dist/src/dpp/structs/AssetLockProof/TxIn.d.ts +1 -1
- package/dist/src/dpp/structs/AssetLockProof/TxOut.d.ts +1 -1
- package/dist/src/dpp/structs/AssetLockProof/Witness.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/BatchTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/BatchedTransition.d.ts +3 -2
- package/dist/src/dpp/structs/Batch/DocumentBaseTransition.d.ts +3 -3
- package/dist/src/dpp/structs/Batch/DocumentBaseTransition.js +2 -2
- package/dist/src/dpp/structs/Batch/DocumentTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenBaseTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenPaymentInfo.d.ts +2 -2
- package/dist/src/dpp/structs/Batch/TokenPaymentInfo.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenPricingSchedule.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransition.d.ts +2 -2
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.d.ts +2 -2
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.d.ts +1 -1
- package/dist/src/dpp/structs/ConsensusError.d.ts +2 -2
- package/dist/src/dpp/structs/ConsensusError.js +1 -1
- package/dist/src/dpp/structs/ContractBounds.d.ts +1 -1
- package/dist/src/dpp/structs/CoreScript.d.ts +1 -1
- package/dist/src/dpp/structs/DataContract.d.ts +3 -2
- package/dist/src/dpp/structs/DataContract.js +4 -1
- package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.d.ts +1 -1
- package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Document.d.ts +2 -2
- package/dist/src/dpp/structs/Document.js +2 -2
- package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.d.ts +1 -1
- package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.d.ts +1 -1
- package/dist/src/dpp/structs/GroupStateTransitionInfo.d.ts +1 -1
- package/dist/src/dpp/structs/Identifier.d.ts +1 -1
- package/dist/src/dpp/structs/Identity.d.ts +1 -1
- package/dist/src/dpp/structs/IdentityPublicKey.d.ts +1 -1
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.d.ts +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.d.ts +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.d.ts +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.d.ts +2 -2
- package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.d.ts +2 -2
- package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.js +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.d.ts +2 -2
- package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.js +1 -1
- package/dist/src/dpp/structs/InstantLock.d.ts +1 -1
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.d.ts +1 -1
- package/dist/src/dpp/structs/MasternodeVote/ResourceVoteChoice.d.ts +1 -1
- package/dist/src/dpp/structs/MasternodeVote/Vote.d.ts +1 -1
- package/dist/src/dpp/structs/MasternodeVote/VotePoll.d.ts +1 -1
- package/dist/src/dpp/structs/PartialIdentity.d.ts +1 -1
- package/dist/src/dpp/structs/PrivateKey.d.ts +1 -1
- package/dist/src/dpp/structs/PublicKey.d.ts +1 -1
- package/dist/src/dpp/structs/StateTransition.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/ActionTaker.d.ts +2 -2
- package/dist/src/dpp/structs/TokenConfiguration/AuthorizedActionTakers.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/ChangeControlRules.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/DistributionFunction.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/Group.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/RewardDistributionType.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfiguration.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationChangeItem.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationConvention.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationLocalization.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRecipient.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRules.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenKeepsHistoryRules.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenMarketplaceRules.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenPerpetualDistribution.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenPreProgrammedDistribution.d.ts +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenTradeMode.d.ts +1 -1
- package/dist/src/dpp/types.d.ts +29 -30
- package/dist/src/dpp/utils.d.ts +1 -1
- package/dist/src/dpp/utils.js +14 -0
- package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.d.ts +1 -1
- package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.js +1 -1
- package/dist/src/dpp/verify/Document/verifyDocumentsProof.d.ts +1 -1
- package/dist/src/dpp/verify/Document/verifyDocumentsProof.js +1 -1
- package/dist/src/dpp/verify/StateTransition/utils.js +3 -3
- package/dist/src/dpp/verify/Tokens/verifyTokenDirectPurchasePrices.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SharedEncryptedNoteNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { SharedEncryptedNoteNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
export declare class SharedEncryptedNoteWASM {
|
|
3
3
|
/** @private **/
|
|
4
4
|
_rawSharedNote: SharedEncryptedNoteNAPI;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GroupStateTransitionInfoNAPI } from '../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { GroupStateTransitionInfoNAPI } from '../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../types.js';
|
|
3
3
|
import { IdentifierWASM } from './Identifier.js';
|
|
4
4
|
export declare class GroupStateTransitionInfoWASM {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IdentifierLike } from '../types.js';
|
|
2
|
-
import { IdentifierNAPI } from '../../../binaries/bindingsTypes.js';
|
|
2
|
+
import type { IdentifierNAPI } from '../../../binaries/bindingsTypes.js';
|
|
3
3
|
export declare class IdentifierWASM {
|
|
4
4
|
/** @private **/
|
|
5
5
|
_rawIdentifier: IdentifierNAPI;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IdentifierWASM } from './Identifier.js';
|
|
2
2
|
import { IdentityPublicKeyWASM } from './IdentityPublicKey.js';
|
|
3
3
|
import { IdentifierLike, PlatformVersionLike } from '../types.js';
|
|
4
|
-
import { IdentityNAPI } from '../../../binaries/bindingsTypes.js';
|
|
4
|
+
import type { IdentityNAPI } from '../../../binaries/bindingsTypes.js';
|
|
5
5
|
export declare class IdentityWASM {
|
|
6
6
|
/** @private **/
|
|
7
7
|
_rawIdentity: IdentityNAPI;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyTypeLike, NetworkLike, PurposeLike, SecurityLevelLike } from '../types.js';
|
|
2
|
-
import { IdentityPublicKeyNAPI } from '../../../binaries/bindingsTypes.js';
|
|
2
|
+
import type { IdentityPublicKeyNAPI } from '../../../binaries/bindingsTypes.js';
|
|
3
3
|
import { KeyType, Purpose, SecurityLevel } from '../enums.js';
|
|
4
4
|
import { ContractBoundsWASM } from './ContractBounds.js';
|
|
5
5
|
import { PrivateKeyWASM } from './PrivateKey.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdentityPublicKeyInCreationNAPI } from '../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityPublicKeyInCreationNAPI } from '../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { KeyTypeLike, NetworkLike, PurposeLike, SecurityLevelLike } from '../types.js';
|
|
3
3
|
import { ContractBoundsWASM } from './ContractBounds.js';
|
|
4
4
|
import { IdentityPublicKeyWASM } from './IdentityPublicKey.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdentityCreateTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityCreateTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentityPublicKeyInCreationWASM } from '../IdentityPublicKeyInCreation.js';
|
|
3
3
|
import { AssetLockProofWASM } from '../AssetLockProof/AssetLockProof.js';
|
|
4
4
|
import { PlatformVersionLike } from '../../types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdentityCreditTransferNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityCreditTransferNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { IdentifierWASM } from '../Identifier.js';
|
|
4
4
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdentityCreditWithdrawalTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityCreditWithdrawalTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike, PoolingLike } from '../../types.js';
|
|
3
3
|
import { CoreScriptWASM } from '../CoreScript.js';
|
|
4
4
|
import { IdentifierWASM } from '../Identifier.js';
|
|
@@ -13,7 +13,7 @@ export declare class IdentityCreditWithdrawalTransitionWASM {
|
|
|
13
13
|
get pooling(): string;
|
|
14
14
|
set pooling(value: PoolingLike);
|
|
15
15
|
get identityId(): IdentifierWASM;
|
|
16
|
-
set identityId(value:
|
|
16
|
+
set identityId(value: IdentifierLike);
|
|
17
17
|
get userFeeIncrease(): number;
|
|
18
18
|
set userFeeIncrease(value: number);
|
|
19
19
|
get nonce(): bigint;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdentityTopUpTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityTopUpTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { AssetLockProofWASM } from '../AssetLockProof/AssetLockProof.js';
|
|
3
3
|
import { IdentifierLike } from '../../types.js';
|
|
4
4
|
import { IdentifierWASM } from '../Identifier.js';
|
|
@@ -10,7 +10,7 @@ export declare class IdentityTopUpTransitionWASM {
|
|
|
10
10
|
get userFeeIncrease(): number;
|
|
11
11
|
set userFeeIncrease(value: number);
|
|
12
12
|
get identityIdentifier(): IdentifierWASM;
|
|
13
|
-
set identityIdentifier(id:
|
|
13
|
+
set identityIdentifier(id: IdentifierLike);
|
|
14
14
|
get assetLockProof(): AssetLockProofWASM;
|
|
15
15
|
set assetLockProof(value: AssetLockProofWASM);
|
|
16
16
|
get signature(): Uint8Array;
|
|
@@ -19,7 +19,7 @@ export class IdentityTopUpTransitionWASM {
|
|
|
19
19
|
return IdentifierWASM.createFromRawInstance(this._rawIdentityTopUpTransition.identityIdentifier);
|
|
20
20
|
}
|
|
21
21
|
set identityIdentifier(id) {
|
|
22
|
-
this._rawIdentityTopUpTransition.identityIdentifier = id
|
|
22
|
+
this._rawIdentityTopUpTransition.identityIdentifier = prepareIdentifierValue(id);
|
|
23
23
|
}
|
|
24
24
|
get assetLockProof() {
|
|
25
25
|
return AssetLockProofWASM.createFromRawInstance(this._rawIdentityTopUpTransition.assetLockProof);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdentityUpdateTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityUpdateTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { IdentityPublicKeyInCreationWASM } from '../IdentityPublicKeyInCreation.js';
|
|
4
4
|
import { IdentifierWASM } from '../Identifier.js';
|
|
@@ -13,7 +13,7 @@ export declare class IdentityUpdateTransitionWASM {
|
|
|
13
13
|
get nonce(): bigint;
|
|
14
14
|
set nonce(value: bigint);
|
|
15
15
|
get identityIdentifier(): IdentifierWASM;
|
|
16
|
-
set identityIdentifier(value:
|
|
16
|
+
set identityIdentifier(value: IdentifierLike);
|
|
17
17
|
get publicKeyIdsToDisable(): number[];
|
|
18
18
|
set publicKeyIdsToDisable(value: number[]);
|
|
19
19
|
get publicKeyIdsToAdd(): IdentityPublicKeyInCreationWASM[];
|
|
@@ -26,7 +26,7 @@ export class IdentityUpdateTransitionWASM {
|
|
|
26
26
|
return IdentifierWASM.createFromRawInstance(this._rawIdentityUpdateTransition.identityIdentifier);
|
|
27
27
|
}
|
|
28
28
|
set identityIdentifier(value) {
|
|
29
|
-
this._rawIdentityUpdateTransition.identityIdentifier = value
|
|
29
|
+
this._rawIdentityUpdateTransition.identityIdentifier = prepareIdentifierValue(value);
|
|
30
30
|
}
|
|
31
31
|
get publicKeyIdsToDisable() {
|
|
32
32
|
return this._rawIdentityUpdateTransition.publicKeyIdsToDisable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InstantLockNAPI } from '../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { InstantLockNAPI } from '../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { OutPointWASM } from './AssetLockProof/OutPoint.js';
|
|
3
3
|
export declare class InstantLockWASM {
|
|
4
4
|
_rawInstantLock: InstantLockNAPI;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MasternodeVoteTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { MasternodeVoteTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { VoteWASM } from './Vote.js';
|
|
4
4
|
import { IdentifierWASM } from '../Identifier.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResourceVoteChoiceNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { ResourceVoteChoiceNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { IdentifierWASM } from '../Identifier.js';
|
|
4
4
|
export declare class ResourceVoteChoiceWASM {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VoteNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { VoteNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { VotePollWASM } from './VotePoll.js';
|
|
3
3
|
import { ResourceVoteChoiceWASM } from './ResourceVoteChoice.js';
|
|
4
4
|
export declare class VoteWASM {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VotePollNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { VotePollNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { IdentifierWASM } from '../Identifier.js';
|
|
4
4
|
export declare class VotePollWASM {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PartialIdentityNAPI } from '../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { PartialIdentityNAPI } from '../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../types.js';
|
|
3
3
|
import { IdentityPublicKeyWASM } from './IdentityPublicKey.js';
|
|
4
4
|
import { IdentifierWASM } from './Identifier.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PrivateKeyNAPI } from '../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { PrivateKeyNAPI } from '../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { NetworkLike } from '../types.js';
|
|
3
3
|
import { PublicKeyWASM } from './PublicKey.js';
|
|
4
4
|
export declare class PrivateKeyWASM {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StateTransitionNAPI } from '../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { StateTransitionNAPI } from '../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { PrivateKeyWASM } from './PrivateKey.js';
|
|
3
3
|
import { IdentityPublicKeyWASM } from './IdentityPublicKey.js';
|
|
4
4
|
import { IdentifierLike, KeyTypeLike, PurposeLike } from '../types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionTakerNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { ActionTakerNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { IdentifierWASM } from '../Identifier.js';
|
|
4
4
|
export declare class ActionTakerWASM {
|
|
@@ -7,6 +7,6 @@ export declare class ActionTakerWASM {
|
|
|
7
7
|
constructor(value: IdentifierLike | IdentifierLike[]);
|
|
8
8
|
getType(): string;
|
|
9
9
|
get value(): IdentifierWASM | IdentifierWASM[];
|
|
10
|
-
set value(value:
|
|
10
|
+
set value(value: IdentifierLike | IdentifierLike[]);
|
|
11
11
|
static createFromRawInstance(rawInstance: ActionTakerNAPI): ActionTakerWASM;
|
|
12
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthorizedActionTakersNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { AuthorizedActionTakersNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { IdentifierWASM } from '../Identifier.js';
|
|
4
4
|
export declare class AuthorizedActionTakersWASM {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeControlRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { ChangeControlRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { AuthorizedActionTakersWASM } from './AuthorizedActionTakers.js';
|
|
3
3
|
import { ActionGoalLike, IdentifierLike } from '../../types.js';
|
|
4
4
|
import { GroupWASM } from './Group.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DistributionFunctionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { DistributionFunctionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { DistributionExponential, DistributionFixedAmount, DistributionInvertedLogarithmic, DistributionLinear, DistributionLogarithmic, DistributionPolynomial, DistributionRandom, DistributionStepDecreasingAmount, DistributionStepwise } from '../../types.js';
|
|
3
3
|
export declare class DistributionFunctionWASM {
|
|
4
4
|
/** @private **/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RewardDistributionTypeNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { RewardDistributionTypeNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { DistributionFunctionWASM } from './DistributionFunction.js';
|
|
3
3
|
import { RewardDistribution } from '../../types.js';
|
|
4
4
|
export declare class RewardDistributionTypeWASM {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenConfigurationNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { TokenConfigurationNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { TokenConfigurationConventionWASM } from './TokenConfigurationConvention.js';
|
|
3
3
|
import { ChangeControlRulesWASM } from './ChangeControlRules.js';
|
|
4
4
|
import { TokenKeepsHistoryRulesWASM } from './TokenKeepsHistoryRules.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenConfigurationChangeItemNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { TokenConfigurationChangeItemNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { TokenConfigurationConventionWASM } from './TokenConfigurationConvention.js';
|
|
3
3
|
import { AuthorizedActionTakersWASM } from './AuthorizedActionTakers.js';
|
|
4
4
|
import { TokenPerpetualDistributionWASM } from './TokenPerpetualDistribution.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenConfigurationConventionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { TokenConfigurationConventionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { ISO639_CODES } from '../../types.js';
|
|
3
3
|
import { TokenConfigurationLocalizationWASM } from './TokenConfigurationLocalization.js';
|
|
4
4
|
export declare class TokenConfigurationConventionWASM {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenConfigurationLocalizationNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { TokenConfigurationLocalizationNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { TokenConfigurationLocalizationJson } from '../../types.js';
|
|
3
3
|
export declare class TokenConfigurationLocalizationWASM {
|
|
4
4
|
/** @private **/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenDistributionRecipientNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { TokenDistributionRecipientNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { IdentifierWASM } from '../Identifier.js';
|
|
4
4
|
export declare class TokenDistributionRecipientWASM {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenDistributionRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { TokenDistributionRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { TokenPerpetualDistributionWASM } from './TokenPerpetualDistribution.js';
|
|
3
3
|
import { ChangeControlRulesWASM } from './ChangeControlRules.js';
|
|
4
4
|
import { TokenPreProgrammedDistributionWASM } from './TokenPreProgrammedDistribution.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenKeepsHistoryRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { TokenKeepsHistoryRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
export declare class TokenKeepsHistoryRulesWASM {
|
|
3
3
|
/** @private **/
|
|
4
4
|
_rawTokenKeepsHistoryRules: TokenKeepsHistoryRulesNAPI;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenMarketplaceRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { TokenMarketplaceRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { TokenTradeModeWASM } from './TokenTradeMode.js';
|
|
3
3
|
import { ChangeControlRulesWASM } from './ChangeControlRules.js';
|
|
4
4
|
export declare class TokenMarketplaceRulesWASM {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenPerpetualDistributionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { TokenPerpetualDistributionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { RewardDistributionTypeWASM } from './RewardDistributionType.js';
|
|
3
3
|
import { TokenDistributionRecipientWASM } from './TokenDistributionRecipient.js';
|
|
4
4
|
export declare class TokenPerpetualDistributionWASM {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenPreProgrammedDistributionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { TokenPreProgrammedDistributionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
export declare class TokenPreProgrammedDistributionWASM {
|
|
3
3
|
/** @private **/
|
|
4
4
|
_rawTokenPreProgrammedDistribution: TokenPreProgrammedDistributionNAPI;
|
package/dist/src/dpp/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as protocol from '../../binaries/bindingsTypes.js';
|
|
2
|
-
import {
|
|
3
|
-
import { ActionGoal, AssetLockProofType, GasFeesPaidBy, KeyType, NetworkWASM, PlatformVersionWASM, Pooling, Purpose, SecurityLevel, TokenDistributionType, TokenEmergencyAction, VoteStateResultType } from './enums.js';
|
|
1
|
+
import type * as protocol from '../../binaries/bindingsTypes.js';
|
|
2
|
+
import { ActionGoal, AssetLockProofType, GasFeesPaidByWASM, KeyType, NetworkWASM, PlatformVersionWASM, PoolingWASM, Purpose, SecurityLevel, TokenDistributionType, TokenEmergencyActionWASM, VoteStateResultType } from './enums.js';
|
|
4
3
|
import { IdentifierWASM } from './structs/Identifier.js';
|
|
5
4
|
import { languageCodes } from './constants.js';
|
|
6
5
|
import { DistributionFunctionWASM } from './structs/TokenConfiguration/DistributionFunction.js';
|
|
@@ -31,36 +30,36 @@ import { VoteWASM } from './structs/MasternodeVote/Vote.js';
|
|
|
31
30
|
import { TokenPricingScheduleWASM } from './structs/Batch/TokenPricingSchedule.js';
|
|
32
31
|
import { PlatformAddressWASM } from './structs/Address/PlatformAddress.js';
|
|
33
32
|
export type DashPlatformProtocol = typeof protocol;
|
|
34
|
-
export type IdentifierLike = string | Uint8Array | IdentifierNAPI | IdentifierWASM;
|
|
35
|
-
export type KeyTypeLike = KeyType | keyof typeof KeyType
|
|
36
|
-
export type NetworkLike = NetworkWASM | keyof typeof NetworkWASM
|
|
37
|
-
export type SecurityLevelLike = SecurityLevel | keyof typeof SecurityLevel
|
|
38
|
-
export type PlatformVersionLike = PlatformVersionWASM | keyof typeof PlatformVersionWASM
|
|
39
|
-
export type PurposeLike = Purpose | keyof typeof Purpose
|
|
40
|
-
export type ActionGoalLike = ActionGoal | keyof typeof ActionGoal
|
|
41
|
-
export type GasFeesPaidByLike =
|
|
42
|
-
export type TokenDistributionLike = TokenDistributionType | keyof typeof TokenDistributionType
|
|
43
|
-
export type TokenEmergencyActionLike =
|
|
44
|
-
export type AssetLockProofTypeLike = AssetLockProofType | keyof typeof AssetLockProofType
|
|
45
|
-
export type PoolingLike =
|
|
46
|
-
export type VoteStateResultTypeLike = VoteStateResultType | keyof typeof VoteStateResultType
|
|
33
|
+
export type IdentifierLike = string | Uint8Array | protocol.IdentifierNAPI | IdentifierWASM;
|
|
34
|
+
export type KeyTypeLike = KeyType | keyof typeof KeyType | Lowercase<keyof typeof KeyType>;
|
|
35
|
+
export type NetworkLike = NetworkWASM | keyof typeof NetworkWASM | Lowercase<keyof typeof NetworkWASM>;
|
|
36
|
+
export type SecurityLevelLike = SecurityLevel | keyof typeof SecurityLevel | Lowercase<keyof typeof SecurityLevel>;
|
|
37
|
+
export type PlatformVersionLike = PlatformVersionWASM | Lowercase<keyof typeof PlatformVersionWASM>;
|
|
38
|
+
export type PurposeLike = Purpose | keyof typeof Purpose | Lowercase<keyof typeof Purpose>;
|
|
39
|
+
export type ActionGoalLike = ActionGoal | keyof typeof ActionGoal | Lowercase<keyof typeof ActionGoal>;
|
|
40
|
+
export type GasFeesPaidByLike = GasFeesPaidByWASM | keyof typeof GasFeesPaidByWASM | Lowercase<keyof typeof GasFeesPaidByWASM>;
|
|
41
|
+
export type TokenDistributionLike = TokenDistributionType | keyof typeof TokenDistributionType | Lowercase<keyof typeof TokenDistributionType>;
|
|
42
|
+
export type TokenEmergencyActionLike = TokenEmergencyActionWASM | keyof typeof TokenEmergencyActionWASM | Lowercase<keyof typeof TokenEmergencyActionWASM>;
|
|
43
|
+
export type AssetLockProofTypeLike = AssetLockProofType | keyof typeof AssetLockProofType | Lowercase<keyof typeof AssetLockProofType>;
|
|
44
|
+
export type PoolingLike = PoolingWASM | keyof typeof PoolingWASM | Lowercase<keyof typeof PoolingWASM>;
|
|
45
|
+
export type VoteStateResultTypeLike = VoteStateResultType | keyof typeof VoteStateResultType | Lowercase<keyof typeof VoteStateResultType>;
|
|
47
46
|
export type EnumLike = KeyTypeLike | NetworkLike | SecurityLevelLike | PlatformVersionLike | PurposeLike;
|
|
48
|
-
export type AddressWitnessP2PKH = AddressWitnessP2pkhNAPI;
|
|
49
|
-
export type AddressWitnessP2SH = AddressWitnessP2shNAPI;
|
|
50
|
-
export type TokenConfigurationLocalizationJson = TokenConfigurationLocalizationJsonNAPI;
|
|
51
|
-
export type DistributionFixedAmount = DistributionFixedAmountNAPI;
|
|
52
|
-
export type DistributionRandom = DistributionRandomNAPI;
|
|
53
|
-
export type DistributionStepDecreasingAmount = DistributionStepDecreasingAmountNAPI;
|
|
47
|
+
export type AddressWitnessP2PKH = protocol.AddressWitnessP2pkhNAPI;
|
|
48
|
+
export type AddressWitnessP2SH = protocol.AddressWitnessP2shNAPI;
|
|
49
|
+
export type TokenConfigurationLocalizationJson = protocol.TokenConfigurationLocalizationJsonNAPI;
|
|
50
|
+
export type DistributionFixedAmount = protocol.DistributionFixedAmountNAPI;
|
|
51
|
+
export type DistributionRandom = protocol.DistributionRandomNAPI;
|
|
52
|
+
export type DistributionStepDecreasingAmount = protocol.DistributionStepDecreasingAmountNAPI;
|
|
54
53
|
export interface DistributionStepwiseStep {
|
|
55
54
|
step: bigint;
|
|
56
55
|
amount: bigint;
|
|
57
56
|
}
|
|
58
57
|
export type DistributionStepwise = DistributionStepwiseStep[];
|
|
59
|
-
export type DistributionLinear = DistributionLinearNAPI;
|
|
60
|
-
export type DistributionPolynomial = DistributionPolynomialNAPI;
|
|
61
|
-
export type DistributionExponential = DistributionExponentialNAPI;
|
|
62
|
-
export type DistributionLogarithmic = DistributionLogarithmicNAPI;
|
|
63
|
-
export type DistributionInvertedLogarithmic = DistributionInvertedLogarithmicNAPI;
|
|
58
|
+
export type DistributionLinear = protocol.DistributionLinearNAPI;
|
|
59
|
+
export type DistributionPolynomial = protocol.DistributionPolynomialNAPI;
|
|
60
|
+
export type DistributionExponential = protocol.DistributionExponentialNAPI;
|
|
61
|
+
export type DistributionLogarithmic = protocol.DistributionLogarithmicNAPI;
|
|
62
|
+
export type DistributionInvertedLogarithmic = protocol.DistributionInvertedLogarithmicNAPI;
|
|
64
63
|
export interface RewardDistribution {
|
|
65
64
|
interval: bigint | number;
|
|
66
65
|
function: DistributionFunctionWASM;
|
|
@@ -149,11 +148,11 @@ export interface VerifiedIdentityBalance {
|
|
|
149
148
|
id: IdentifierWASM;
|
|
150
149
|
}
|
|
151
150
|
export interface VerifiedIdentityTokenInfo {
|
|
152
|
-
|
|
151
|
+
tokenId: IdentifierWASM;
|
|
153
152
|
identityTokenInfo: IdentityTokenInfo;
|
|
154
153
|
}
|
|
155
154
|
export interface VerifiedTokenPricingSchedule {
|
|
156
|
-
|
|
155
|
+
tokenId: IdentifierWASM;
|
|
157
156
|
pricingSchedule?: TokenPricingScheduleWASM;
|
|
158
157
|
}
|
|
159
158
|
export interface VerifiedBalanceTransfer {
|
|
@@ -197,7 +196,7 @@ export interface VerifiedIdentityWithAddressInfos {
|
|
|
197
196
|
infos: VerifiedAddressInfo[];
|
|
198
197
|
}
|
|
199
198
|
export type VerifiedStateTransitionResultVariants = DataContractWASM | IdentityWASM | IdentifierWASM | VerifiedIdentityBalance | VerifiedIdentityTokenInfo | VerifiedTokenPricingSchedule | TokenStatus | VerifiedIdentityBalance[] | PartialIdentityWASM | VerifiedBalanceTransfer | VerifiedDocument[] | DocumentWASM | VerifiedTokenGroupActionWithDocument | VerifiedTokenGroupActionWithTokenBalance | VerifiedTokenGroupActionWithTokenIdentityInfo | VerifiedTokenGroupActionWithTokenPricingSchedule | VoteWASM | VerifiedAddressInfo[] | VerifiedIdentityFullWithAddressInfos | VerifiedIdentityWithAddressInfos;
|
|
200
|
-
export type VerifiedStateTransitionResultVariantsRAW = DataContractNAPI | IdentityNAPI | IdentifierNAPI | VerifiedIdentityBalanceNAPI | VerifiedIdentityTokenInfoNAPI | VerifiedTokenPricingScheduleNAPI | TokenStatusNAPI | VerifiedIdentityBalanceNAPI[] | PartialIdentityNAPI | VerifiedBalanceTransferNAPI | VerifiedDocumentNAPI[] | DocumentNAPI | VerifiedTokenGroupActionWithDocumentNAPI | VerifiedTokenGroupActionWithTokenBalanceNAPI | VerifiedTokenGroupActionWithTokenIdentityInfoNAPI | VerifiedTokenGroupActionWithTokenPricingScheduleNAPI | VoteNAPI | VerifiedAddressInfosNAPI[] | VerifiedIdentityFullWithAddressInfosNAPI | VerifiedIdentityWithAddressInfosNAPI;
|
|
199
|
+
export type VerifiedStateTransitionResultVariantsRAW = protocol.DataContractNAPI | protocol.IdentityNAPI | protocol.IdentifierNAPI | protocol.VerifiedIdentityBalanceNAPI | protocol.VerifiedIdentityTokenInfoNAPI | protocol.VerifiedTokenPricingScheduleNAPI | protocol.TokenStatusNAPI | protocol.VerifiedIdentityBalanceNAPI[] | protocol.PartialIdentityNAPI | protocol.VerifiedBalanceTransferNAPI | protocol.VerifiedDocumentNAPI[] | protocol.DocumentNAPI | protocol.VerifiedTokenGroupActionWithDocumentNAPI | protocol.VerifiedTokenGroupActionWithTokenBalanceNAPI | protocol.VerifiedTokenGroupActionWithTokenIdentityInfoNAPI | protocol.VerifiedTokenGroupActionWithTokenPricingScheduleNAPI | protocol.VoteNAPI | protocol.VerifiedAddressInfosNAPI[] | protocol.VerifiedIdentityFullWithAddressInfosNAPI | protocol.VerifiedIdentityWithAddressInfosNAPI;
|
|
201
200
|
export interface VerifiedStateTransitionResult {
|
|
202
201
|
rootHash: Uint8Array;
|
|
203
202
|
result: VerifiedStateTransitionResultVariants;
|
package/dist/src/dpp/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamicValue, IdentifierLikeNAPI } from '../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { DynamicValue, IdentifierLikeNAPI } from '../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from './types.js';
|
|
3
3
|
export declare function valueToDynamicValue(value: any): DynamicValue;
|
|
4
4
|
export declare function valueFromDynamicValue(dynamicValue: DynamicValue): any;
|
package/dist/src/dpp/utils.js
CHANGED
|
@@ -25,6 +25,20 @@ export function valueToDynamicValue(value) {
|
|
|
25
25
|
else if (typeof value === 'function') {
|
|
26
26
|
throw new Error('Cannot parse value from function');
|
|
27
27
|
}
|
|
28
|
+
if (typeof value === 'number') {
|
|
29
|
+
// we cannot strongly pass uint or float without js layer check
|
|
30
|
+
if (Number.isInteger(value)) {
|
|
31
|
+
if (value > 4294967295 || value < 0) {
|
|
32
|
+
return dppProvider.dpp.DynamicValue.fromInt(value);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return dppProvider.dpp.DynamicValue.fromUInt(value);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return dppProvider.dpp.DynamicValue.fromFloat(value);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
28
42
|
else {
|
|
29
43
|
return new dppProvider.dpp.DynamicValue(value);
|
|
30
44
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PlatformVersionLike, StartAt, VerifiedVoteState, VoteStateResultTypeLike } from '../../types.js';
|
|
2
2
|
import { DataContractWASM } from '../../structs/DataContract.js';
|
|
3
|
-
export declare function verifyVotePollVoteStateProof(proof: Uint8Array, contract: DataContractWASM, documentTypeName: string, indexName: string, indexValues:
|
|
3
|
+
export declare function verifyVotePollVoteStateProof(proof: Uint8Array, contract: DataContractWASM, documentTypeName: string, indexName: string, indexValues: Uint8Array[], resultType: VoteStateResultTypeLike, allowIncludeLockedAndAbstainingVoteTally: boolean, count: number | undefined, startAt: StartAt | undefined, platformVersion: PlatformVersionLike): VerifiedVoteState;
|
|
@@ -2,7 +2,7 @@ import { dppProvider } from '../../provider.js';
|
|
|
2
2
|
import { valueFromDynamicValue, valueToDynamicValue } from '../../utils.js';
|
|
3
3
|
import { IdentifierWASM } from '../../structs/Identifier.js';
|
|
4
4
|
export function verifyVotePollVoteStateProof(proof, contract, documentTypeName, indexName, indexValues, resultType, allowIncludeLockedAndAbstainingVoteTally, count, startAt, platformVersion) {
|
|
5
|
-
const result = dppProvider.dpp.verifyVotePollVoteStateProof(proof, contract._rawDataContract, documentTypeName, indexName,
|
|
5
|
+
const result = dppProvider.dpp.verifyVotePollVoteStateProof(proof, contract._rawDataContract, documentTypeName, indexName, indexValues, valueToDynamicValue(resultType), allowIncludeLockedAndAbstainingVoteTally, count, valueToDynamicValue(startAt), valueToDynamicValue(platformVersion));
|
|
6
6
|
const winner = valueFromDynamicValue(result.result.winner);
|
|
7
7
|
const winnerBlockInfo = winner?.blockInfo;
|
|
8
8
|
const outWinner = winner != null
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IdentifierLike, PlatformVersionLike, VerifiedDocuments, WhereClause } from '../../types.js';
|
|
2
2
|
import { DataContractWASM } from '../../structs/DataContract.js';
|
|
3
|
-
export declare function verifyDocumentsProof(proof: Uint8Array, contract: DataContractWASM, documentTypeName: string, whereClauses: WhereClause[], orderBy: string[][], limit: number | undefined | null, startAt: IdentifierLike | undefined | null, startAtIncluded: boolean, blockTimeMs: bigint | undefined | null, platformVersion: PlatformVersionLike): VerifiedDocuments;
|
|
3
|
+
export declare function verifyDocumentsProof(proof: Uint8Array, contract: DataContractWASM, documentTypeName: string, whereClauses: WhereClause[] | undefined, orderBy: string[][] | undefined, limit: number | undefined | null, startAt: IdentifierLike | undefined | null, startAtIncluded: boolean, blockTimeMs: bigint | undefined | null, platformVersion: PlatformVersionLike): VerifiedDocuments;
|
|
@@ -2,7 +2,7 @@ import { dppProvider } from '../../provider.js';
|
|
|
2
2
|
import { DocumentWASM } from '../../structs/Document.js';
|
|
3
3
|
import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
|
|
4
4
|
export function verifyDocumentsProof(proof, contract, documentTypeName, whereClauses, orderBy, limit, startAt, startAtIncluded, blockTimeMs, platformVersion) {
|
|
5
|
-
const result = dppProvider.dpp.verifyDocumentsProof(proof, contract._rawDataContract, documentTypeName, valueToDynamicValue(whereClauses), orderBy, limit, startAt != null ? prepareIdentifierValue(startAt) : undefined, startAtIncluded, blockTimeMs?.toString(), valueToDynamicValue(platformVersion));
|
|
5
|
+
const result = dppProvider.dpp.verifyDocumentsProof(proof, contract._rawDataContract, documentTypeName, valueToDynamicValue(whereClauses), orderBy ?? [], limit, startAt != null ? prepareIdentifierValue(startAt) : undefined, startAtIncluded, blockTimeMs?.toString(), valueToDynamicValue(platformVersion));
|
|
6
6
|
return {
|
|
7
7
|
rootHash: result.rootHash,
|
|
8
8
|
documents: result.documents.map(DocumentWASM.createFromRawInstance)
|
|
@@ -15,18 +15,18 @@ const converters = () => {
|
|
|
15
15
|
[dppProvider.dpp.PartialIdentityNAPI, v => PartialIdentityWASM.createFromRawInstance(v)],
|
|
16
16
|
[dppProvider.dpp.DocumentNAPI, v => DocumentWASM.createFromRawInstance(v)],
|
|
17
17
|
[dppProvider.dpp.VoteNAPI, v => VoteWASM.createFromRawInstance(v)],
|
|
18
|
-
[dppProvider.dpp.IdentityTokenBalanceNAPI, v => ({
|
|
18
|
+
[dppProvider.dpp.IdentityTokenBalanceNAPI, (v) => ({
|
|
19
19
|
id: IdentifierWASM.createFromRawInstance(v.id),
|
|
20
20
|
balance: BigInt(v.balance)
|
|
21
21
|
})],
|
|
22
22
|
[dppProvider.dpp.VerifiedIdentityTokenInfoNAPI, (v) => ({
|
|
23
|
-
|
|
23
|
+
tokenId: IdentifierWASM.createFromRawInstance(v.id),
|
|
24
24
|
identityTokenInfo: {
|
|
25
25
|
frozen: v.identityTokenInfo.frozen
|
|
26
26
|
}
|
|
27
27
|
})],
|
|
28
28
|
[dppProvider.dpp.VerifiedTokenPricingScheduleNAPI, (v) => ({
|
|
29
|
-
|
|
29
|
+
tokenId: IdentifierWASM.createFromRawInstance(v.id),
|
|
30
30
|
pricingSchedule: v.pricingSchedule != null
|
|
31
31
|
? TokenPricingScheduleWASM.createFromRawInstance(v.pricingSchedule)
|
|
32
32
|
: undefined
|
|
@@ -7,7 +7,7 @@ export function verifyTokenDirectPurchasePrices(proof, tokenIds, verifySubsetOfP
|
|
|
7
7
|
return {
|
|
8
8
|
rootHash: result.rootHash,
|
|
9
9
|
prices: result.prices.map(price => ({
|
|
10
|
-
|
|
10
|
+
tokenId: IdentifierWASM.createFromRawInstance(price.id),
|
|
11
11
|
pricingSchedule: price.pricingSchedule != null ? TokenPricingScheduleWASM.createFromRawInstance(price.pricingSchedule) : undefined
|
|
12
12
|
}))
|
|
13
13
|
};
|