pshenmic-dpp 2.0.0-dev.6 → 2.0.0-dev.8
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 +31 -15
- package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
- package/dist/binaries/pshenmic_dpp.d.ts +5 -1
- package/dist/binaries/pshenmic_dpp.js +1 -1
- package/dist/binaries/wasm/wasmBytes.js +1 -1
- package/dist/binaries/wasm.d.ts +5 -1
- package/dist/binaries/wasm.js +1 -1
- package/dist/src/dpp/dpp.d.ts +3 -2
- package/dist/src/dpp/dpp.js +3 -2
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.d.ts +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +4 -3
- package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.js +1 -1
- package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.d.ts +2 -2
- package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.js +2 -2
- package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.d.ts +4 -2
- package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.js +8 -2
- package/dist/src/dpp/structs/StateTransition.d.ts +1 -0
- package/dist/src/dpp/structs/StateTransition.js +3 -0
- package/dist/src/dpp/types.d.ts +16 -9
- package/dist/src/dpp/utils.d.ts +3 -2
- package/dist/src/dpp/utils.js +12 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.d.ts +2 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.js +12 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.d.ts +2 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.js +14 -0
- package/dist/src/dpp/verify/StateTransition/utils.js +5 -5
- package/package.json +1 -1
package/dist/binaries/wasm.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export const verifyAddressesInfos: any;
|
|
2
|
+
export const verifyAddressInfo: any;
|
|
1
3
|
export const verifyContractProof: any;
|
|
2
4
|
export const verifyDocumentsProof: any;
|
|
3
5
|
export const verifyEpochsInfoProof: any;
|
|
@@ -77,6 +79,7 @@ export const OutPointNAPI: any;
|
|
|
77
79
|
export const OutputAddressNAPI: any;
|
|
78
80
|
export const OutputAddressNullableCreditsNAPI: any;
|
|
79
81
|
export const PartialIdentityNAPI: any;
|
|
82
|
+
export const PlatformAddressInfoNAPI: any;
|
|
80
83
|
export const PlatformAddressNAPI: any;
|
|
81
84
|
export const PrefundedVotingBalanceNAPI: any;
|
|
82
85
|
export const PrivateEncryptedNoteNAPI: any;
|
|
@@ -119,7 +122,6 @@ export const TotalSingleTokenBalanceNAPI: any;
|
|
|
119
122
|
export const TransactionNAPI: any;
|
|
120
123
|
export const TxInNAPI: any;
|
|
121
124
|
export const TxOutNAPI: any;
|
|
122
|
-
export const VerifiedAddressInfosNAPI: any;
|
|
123
125
|
export const VerifiedBalanceTransferNAPI: any;
|
|
124
126
|
export const VerifiedContractNAPI: any;
|
|
125
127
|
export const VerifiedDocumentNAPI: any;
|
|
@@ -135,6 +137,8 @@ export const VerifiedIdentityKeysByIdentifierNAPI: any;
|
|
|
135
137
|
export const VerifiedIdentityNonceNAPI: any;
|
|
136
138
|
export const VerifiedIdentityTokenInfoNAPI: any;
|
|
137
139
|
export const VerifiedIdentityWithAddressInfosNAPI: any;
|
|
140
|
+
export const VerifiedPlatformAddressesInfosNAPI: any;
|
|
141
|
+
export const VerifiedPlatformAddressInfoNAPI: any;
|
|
138
142
|
export const VerifiedStateTransitionResultNAPI: any;
|
|
139
143
|
export const VerifiedTokenBalancesForIdentitiesNAPI: any;
|
|
140
144
|
export const VerifiedTokenContractInfoNAPI: any;
|
package/dist/binaries/wasm.js
CHANGED
|
@@ -41,4 +41,4 @@ const wasm = instantiateNapiModuleSync(decompressSync(wasmBytes), {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
export const { verifyContractProof, verifyDocumentsProof, verifyEpochsInfoProof, verifyIdentifierByNonUniquePublicKeyHashProof, verifyIdentityBalanceProof, verifyIdentityByIdentifierProof, verifyIdentityByUniqueKeyHashProof, verifyIdentityContractNonceProof, verifyIdentityKeysByIdentifierProof, verifyIdentityNonceProof, verifySignatureDigest, verifyStateTransitionResult, verifyTokenBalancesForIdentitiesProof, verifyTokenContractInfoProof, verifyTokenDirectPurchasePrices, verifyTokensBalancesForIdentityProof, verifyTokenTotalSupplyProof, verifyTotalCreditsProof, verifyVotePollVoteStateProof, ActionTakerNAPI, AddressCreditWithdrawalTransitionNAPI, AddressFundingFromAssetLockTransitionNAPI, AddressFundsFeeStrategyStepNAPI, AddressFundsTransferTransitionNAPI, AddressWitnessNAPI, AssetLockProofNAPI, AuthorizedActionTakersNAPI, BatchedTransitionNAPI, BatchTransitionNAPI, BlockBasedDistributionNAPI, BlockInfoNAPI, ChainAssetLockProofNAPI, ChangeControlRulesNAPI, ConsensusErrorNAPI, ContenderWithSerializedDocumentNAPI, ContestedDocumentVotePollQueryExecutionResultNAPI, ContractBoundsNAPI, CoreScriptNAPI, DataContractCreateTransitionNAPI, DataContractNAPI, DataContractUpdateTransitionNAPI, DistributionFunctionNAPI, DocumentBaseTransitionNAPI, DocumentCreateTransitionNAPI, DocumentDeleteTransitionNAPI, DocumentNAPI, DocumentPurchaseTransitionNAPI, DocumentReplaceTransitionNAPI, DocumentTransferTransitionNAPI, DocumentTransitionNAPI, DocumentUpdatePriceTransitionNAPI, DynamicValue, EpochBasedDistributionNAPI, ExtendedEpochInfoNAPI, GroupNAPI, GroupStateTransitionInfoNAPI, IdentifierNAPI, IdentityCreateFromAddressesTransitionNAPI, IdentityCreateTransitionNAPI, IdentityCreditTransferNAPI, IdentityCreditTransferToAddressesTransitionNAPI, IdentityCreditWithdrawalTransitionNAPI, IdentityNAPI, IdentityPublicKeyInCreationNAPI, IdentityPublicKeyNAPI, IdentityTokenBalanceNAPI, IdentityTokenBalanceOptionalNAPI, IdentityTokenInfoNAPI, IdentityTopUpFromAddressesTransitionNAPI, IdentityTopUpTransitionNAPI, IdentityUpdateTransitionNAPI, InputAddressNAPI, InstantAssetLockProofNAPI, InstantLockNAPI, MasternodeVoteTransitionNAPI, OutPointNAPI, OutputAddressNAPI, OutputAddressNullableCreditsNAPI, PartialIdentityNAPI, PlatformAddressNAPI, PrefundedVotingBalanceNAPI, PrivateEncryptedNoteNAPI, PrivateKeyNAPI, PublicKeyNAPI, ResourceVoteChoiceNAPI, RewardDistributionTypeNAPI, SharedEncryptedNoteNAPI, StateTransitionNAPI, TimeBasedDistributionNAPI, TokenBaseTransitionNAPI, TokenBurnTransitionNAPI, TokenClaimTransitionNAPI, TokenConfigUpdateTransitionNAPI, TokenConfigurationChangeItemNAPI, TokenConfigurationConventionNAPI, TokenConfigurationLocalizationNAPI, TokenConfigurationNAPI, TokenContractInfoNAPI, TokenDestroyFrozenFundsTransitionNAPI, TokenDirectPurchaseTransitionNAPI, TokenDistributionRecipientNAPI, TokenDistributionRulesNAPI, TokenEmergencyActionTransitionNAPI, TokenFreezeTransitionNAPI, TokenKeepsHistoryRulesNAPI, TokenMarketplaceRulesNAPI, TokenMintTransitionNAPI, TokenPaymentInfoNAPI, TokenPerpetualDistributionNAPI, TokenPreProgrammedDistributionNAPI, TokenPricingScheduleNAPI, TokenSetPriceForDirectPurchaseTransitionNAPI, TokenStatusNAPI, TokenTradeModeNAPI, TokenTransferTransitionNAPI, TokenTransitionNAPI, TokenUnFreezeTransitionNAPI, TotalSingleTokenBalanceNAPI, TransactionNAPI, TxInNAPI, TxOutNAPI,
|
|
44
|
+
export const { verifyAddressesInfos, verifyAddressInfo, verifyContractProof, verifyDocumentsProof, verifyEpochsInfoProof, verifyIdentifierByNonUniquePublicKeyHashProof, verifyIdentityBalanceProof, verifyIdentityByIdentifierProof, verifyIdentityByUniqueKeyHashProof, verifyIdentityContractNonceProof, verifyIdentityKeysByIdentifierProof, verifyIdentityNonceProof, verifySignatureDigest, verifyStateTransitionResult, verifyTokenBalancesForIdentitiesProof, verifyTokenContractInfoProof, verifyTokenDirectPurchasePrices, verifyTokensBalancesForIdentityProof, verifyTokenTotalSupplyProof, verifyTotalCreditsProof, verifyVotePollVoteStateProof, ActionTakerNAPI, AddressCreditWithdrawalTransitionNAPI, AddressFundingFromAssetLockTransitionNAPI, AddressFundsFeeStrategyStepNAPI, AddressFundsTransferTransitionNAPI, AddressWitnessNAPI, AssetLockProofNAPI, AuthorizedActionTakersNAPI, BatchedTransitionNAPI, BatchTransitionNAPI, BlockBasedDistributionNAPI, BlockInfoNAPI, ChainAssetLockProofNAPI, ChangeControlRulesNAPI, ConsensusErrorNAPI, ContenderWithSerializedDocumentNAPI, ContestedDocumentVotePollQueryExecutionResultNAPI, ContractBoundsNAPI, CoreScriptNAPI, DataContractCreateTransitionNAPI, DataContractNAPI, DataContractUpdateTransitionNAPI, DistributionFunctionNAPI, DocumentBaseTransitionNAPI, DocumentCreateTransitionNAPI, DocumentDeleteTransitionNAPI, DocumentNAPI, DocumentPurchaseTransitionNAPI, DocumentReplaceTransitionNAPI, DocumentTransferTransitionNAPI, DocumentTransitionNAPI, DocumentUpdatePriceTransitionNAPI, DynamicValue, EpochBasedDistributionNAPI, ExtendedEpochInfoNAPI, GroupNAPI, GroupStateTransitionInfoNAPI, IdentifierNAPI, IdentityCreateFromAddressesTransitionNAPI, IdentityCreateTransitionNAPI, IdentityCreditTransferNAPI, IdentityCreditTransferToAddressesTransitionNAPI, IdentityCreditWithdrawalTransitionNAPI, IdentityNAPI, IdentityPublicKeyInCreationNAPI, IdentityPublicKeyNAPI, IdentityTokenBalanceNAPI, IdentityTokenBalanceOptionalNAPI, IdentityTokenInfoNAPI, IdentityTopUpFromAddressesTransitionNAPI, IdentityTopUpTransitionNAPI, IdentityUpdateTransitionNAPI, InputAddressNAPI, InstantAssetLockProofNAPI, InstantLockNAPI, MasternodeVoteTransitionNAPI, OutPointNAPI, OutputAddressNAPI, OutputAddressNullableCreditsNAPI, PartialIdentityNAPI, PlatformAddressInfoNAPI, PlatformAddressNAPI, PrefundedVotingBalanceNAPI, PrivateEncryptedNoteNAPI, PrivateKeyNAPI, PublicKeyNAPI, ResourceVoteChoiceNAPI, RewardDistributionTypeNAPI, SharedEncryptedNoteNAPI, StateTransitionNAPI, TimeBasedDistributionNAPI, TokenBaseTransitionNAPI, TokenBurnTransitionNAPI, TokenClaimTransitionNAPI, TokenConfigUpdateTransitionNAPI, TokenConfigurationChangeItemNAPI, TokenConfigurationConventionNAPI, TokenConfigurationLocalizationNAPI, TokenConfigurationNAPI, TokenContractInfoNAPI, TokenDestroyFrozenFundsTransitionNAPI, TokenDirectPurchaseTransitionNAPI, TokenDistributionRecipientNAPI, TokenDistributionRulesNAPI, TokenEmergencyActionTransitionNAPI, TokenFreezeTransitionNAPI, TokenKeepsHistoryRulesNAPI, TokenMarketplaceRulesNAPI, TokenMintTransitionNAPI, TokenPaymentInfoNAPI, TokenPerpetualDistributionNAPI, TokenPreProgrammedDistributionNAPI, TokenPricingScheduleNAPI, TokenSetPriceForDirectPurchaseTransitionNAPI, TokenStatusNAPI, TokenTradeModeNAPI, TokenTransferTransitionNAPI, TokenTransitionNAPI, TokenUnFreezeTransitionNAPI, TotalSingleTokenBalanceNAPI, TransactionNAPI, TxInNAPI, TxOutNAPI, VerifiedBalanceTransferNAPI, VerifiedContractNAPI, VerifiedDocumentNAPI, VerifiedDocumentsNAPI, VerifiedEpochsInfoNAPI, VerifiedIdentifierByNonUniquePublicKeyHashNAPI, VerifiedIdentityBalanceRootHashNAPI, VerifiedIdentityByIdentifierNAPI, VerifiedIdentityByUniqueKeyHashNAPI, VerifiedIdentityContractNonceNAPI, VerifiedIdentityFullWithAddressInfosNAPI, VerifiedIdentityKeysByIdentifierNAPI, VerifiedIdentityNonceNAPI, VerifiedIdentityTokenInfoNAPI, VerifiedIdentityWithAddressInfosNAPI, VerifiedPlatformAddressesInfosNAPI, VerifiedPlatformAddressInfoNAPI, VerifiedStateTransitionResultNAPI, VerifiedTokenBalancesForIdentitiesNAPI, VerifiedTokenContractInfoNAPI, VerifiedTokenDirectPurchasePricesNAPI, VerifiedTokenGroupActionWithDocumentNAPI, VerifiedTokenGroupActionWithTokenBalanceNAPI, VerifiedTokenGroupActionWithTokenIdentityInfoNAPI, VerifiedTokenGroupActionWithTokenPricingScheduleNAPI, VerifiedTokenPricingScheduleNAPI, VerifiedTokensBalancesForIdentityNAPI, VerifiedTokenTotalSupplyNAPI, VerifiedTotalCreditsNAPI, VerifiedVoteStateNAPI, VoteNAPI, VotePollNAPI, WitnessNAPI, ActionGoalNAPI, AssetLockProofTypeNAPI, BatchTypeNAPI, GasFeesPaidByNAPI, GroupActionStatusNAPI, KeyTypeNAPI, NetworkNAPI, PlatformVersionNAPI, PoolingNAPI, PurposeNAPI, SecurityLevelNAPI, TokenDistributionTypeNAPI, TokenEmergencyActionNAPI, VoteStateResultTypeNAPI } = wasm.napiModule.exports;
|
package/dist/src/dpp/dpp.d.ts
CHANGED
|
@@ -21,8 +21,8 @@ export { StateTransitionWASM } from './structs/StateTransition.js';
|
|
|
21
21
|
export { PrivateEncryptedNoteWASM } from './structs/EncryptedNote/PrivateEncryptedNote.js';
|
|
22
22
|
export { SharedEncryptedNoteWASM } from './structs/EncryptedNote/SharedEncryptedNote.js';
|
|
23
23
|
export { GroupStateTransitionInfoWASM } from './structs/GroupStateTransitionInfo.js';
|
|
24
|
-
export { PlatformAddressWASM } from './structs/
|
|
25
|
-
export { AddressWitnessWASM } from './structs/
|
|
24
|
+
export { PlatformAddressWASM } from './structs/PlatformAddress/PlatformAddress.js';
|
|
25
|
+
export { AddressWitnessWASM } from './structs/PlatformAddress/AddressWitness.js';
|
|
26
26
|
export { IdentityCreateTransitionWASM } from './structs/IdentityTransitions/IdentityCreateTransition.js';
|
|
27
27
|
export { IdentityTopUpTransitionWASM } from './structs/IdentityTransitions/IdentityTopUpTransition.js';
|
|
28
28
|
export { IdentityUpdateTransitionWASM } from './structs/IdentityTransitions/IdentityUpdateTransition.js';
|
|
@@ -108,3 +108,4 @@ export { verifyTokenContractInfoProof } from './verify/Tokens/verifyTokenContrac
|
|
|
108
108
|
export { verifyTokenDirectPurchasePrices } from './verify/Tokens/verifyTokenDirectPurchasePrices.js';
|
|
109
109
|
export { verifyTokenTotalSupplyProof } from './verify/Tokens/verifyTokenTotalSupplyProof.js';
|
|
110
110
|
export { verifyTokensBalancesForIdentityProof } from './verify/Tokens/verifyTokensBalancesForIdentityProof.js';
|
|
111
|
+
export { verifyPlatformAddressInfo } from './verify/PlatformAddress/verifyPlatformAddressInfo.js';
|
package/dist/src/dpp/dpp.js
CHANGED
|
@@ -21,8 +21,8 @@ export { StateTransitionWASM } from './structs/StateTransition.js';
|
|
|
21
21
|
export { PrivateEncryptedNoteWASM } from './structs/EncryptedNote/PrivateEncryptedNote.js';
|
|
22
22
|
export { SharedEncryptedNoteWASM } from './structs/EncryptedNote/SharedEncryptedNote.js';
|
|
23
23
|
export { GroupStateTransitionInfoWASM } from './structs/GroupStateTransitionInfo.js';
|
|
24
|
-
export { PlatformAddressWASM } from './structs/
|
|
25
|
-
export { AddressWitnessWASM } from './structs/
|
|
24
|
+
export { PlatformAddressWASM } from './structs/PlatformAddress/PlatformAddress.js';
|
|
25
|
+
export { AddressWitnessWASM } from './structs/PlatformAddress/AddressWitness.js';
|
|
26
26
|
export { IdentityCreateTransitionWASM } from './structs/IdentityTransitions/IdentityCreateTransition.js';
|
|
27
27
|
export { IdentityTopUpTransitionWASM } from './structs/IdentityTransitions/IdentityTopUpTransition.js';
|
|
28
28
|
export { IdentityUpdateTransitionWASM } from './structs/IdentityTransitions/IdentityUpdateTransition.js';
|
|
@@ -108,3 +108,4 @@ export { verifyTokenContractInfoProof } from './verify/Tokens/verifyTokenContrac
|
|
|
108
108
|
export { verifyTokenDirectPurchasePrices } from './verify/Tokens/verifyTokenDirectPurchasePrices.js';
|
|
109
109
|
export { verifyTokenTotalSupplyProof } from './verify/Tokens/verifyTokenTotalSupplyProof.js';
|
|
110
110
|
export { verifyTokensBalancesForIdentityProof } from './verify/Tokens/verifyTokensBalancesForIdentityProof.js';
|
|
111
|
+
export { verifyPlatformAddressInfo } from './verify/PlatformAddress/verifyPlatformAddressInfo.js';
|
|
@@ -3,7 +3,7 @@ import { InputAddressWASM } from './entities/InputAddress.js';
|
|
|
3
3
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
4
4
|
import { PoolingLike } from '../../types.js';
|
|
5
5
|
import { CoreScriptWASM } from '../CoreScript.js';
|
|
6
|
-
import { AddressWitnessWASM } from '../
|
|
6
|
+
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
7
7
|
import { OutputAddressWASM } from './entities/OutputAddress.js';
|
|
8
8
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
9
9
|
export declare class AddressCreditWithdrawalTransitionWASM {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
2
2
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
3
3
|
import { CoreScriptWASM } from '../CoreScript.js';
|
|
4
|
-
import { AddressWitnessWASM } from '../
|
|
4
|
+
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
5
5
|
import { OutputAddressWASM } from './entities/OutputAddress.js';
|
|
6
6
|
import { dppProvider } from '../../provider.js';
|
|
7
7
|
import { valueToDynamicValue } from '../../utils.js';
|
|
@@ -2,7 +2,7 @@ import type { AddressFundingFromAssetLockTransitionNAPI } from '../../../../bina
|
|
|
2
2
|
import { AssetLockProofWASM } from '../AssetLockProof/AssetLockProof.js';
|
|
3
3
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
4
4
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
5
|
-
import { AddressWitnessWASM } from '../
|
|
5
|
+
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
6
6
|
import { OutputAddressNullableCreditsWASM } from './entities/OutputAddressNullableCredits.js';
|
|
7
7
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
8
8
|
export declare class AddressFundingFromAssetLockTransitionWASM {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AssetLockProofWASM } from '../AssetLockProof/AssetLockProof.js';
|
|
2
2
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
3
3
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
4
|
-
import { AddressWitnessWASM } from '../
|
|
4
|
+
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
5
5
|
import { OutputAddressNullableCreditsWASM } from './entities/OutputAddressNullableCredits.js';
|
|
6
6
|
import { dppProvider } from '../../provider.js';
|
|
7
7
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AddressFundsTransferTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
3
3
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
4
|
-
import { AddressWitnessWASM } from '../
|
|
4
|
+
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
5
5
|
import { OutputAddressWASM } from './entities/OutputAddress.js';
|
|
6
6
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
7
7
|
export declare class AddressFundsTransferTransitionWASM {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
2
2
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
3
|
-
import { AddressWitnessWASM } from '../
|
|
3
|
+
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
4
4
|
import { OutputAddressWASM } from './entities/OutputAddress.js';
|
|
5
5
|
import { dppProvider } from '../../provider.js';
|
|
6
6
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
@@ -2,7 +2,7 @@ import type { IdentityCreateFromAddressesTransitionNAPI } from '../../../../bina
|
|
|
2
2
|
import { IdentityPublicKeyInCreationWASM } from '../IdentityPublicKeyInCreation.js';
|
|
3
3
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
4
4
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
5
|
-
import { AddressWitnessWASM } from '../
|
|
5
|
+
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
6
6
|
import { OutputAddressWASM } from './entities/OutputAddress.js';
|
|
7
7
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
8
8
|
export declare class IdentityCreateFromAddressesTransitionWASM {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IdentityPublicKeyInCreationWASM } from '../IdentityPublicKeyInCreation.js';
|
|
2
2
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
3
3
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
4
|
-
import { AddressWitnessWASM } from '../
|
|
4
|
+
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
5
5
|
import { OutputAddressWASM } from './entities/OutputAddress.js';
|
|
6
6
|
import { dppProvider } from '../../provider.js';
|
|
7
7
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
@@ -2,7 +2,7 @@ import type { IdentityTopUpFromAddressesTransitionNAPI } from '../../../../binar
|
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
4
4
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
5
|
-
import { AddressWitnessWASM } from '../
|
|
5
|
+
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
6
6
|
import { OutputAddressWASM } from './entities/OutputAddress.js';
|
|
7
7
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
8
8
|
export declare class IdentityTopUpFromAddressesTransitionWASM {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { dppProvider } from '../../provider.js';
|
|
2
2
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
3
3
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
4
|
-
import { AddressWitnessWASM } from '../
|
|
4
|
+
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
5
5
|
import { OutputAddressWASM } from './entities/OutputAddress.js';
|
|
6
6
|
import { prepareIdentifierValue } from '../../utils.js';
|
|
7
7
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { InputAddressNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
-
import { PlatformAddressWASM } from '../../
|
|
2
|
+
import { PlatformAddressWASM } from '../../PlatformAddress/PlatformAddress.js';
|
|
3
|
+
import { PlatformAddressLike } from '../../../types.js';
|
|
3
4
|
export declare class InputAddressWASM {
|
|
4
5
|
/** @private **/
|
|
5
6
|
_rawInputAddress: InputAddressNAPI;
|
|
6
|
-
constructor(address:
|
|
7
|
+
constructor(address: PlatformAddressLike, nonce: number, credits: bigint);
|
|
7
8
|
get address(): PlatformAddressWASM;
|
|
8
|
-
set address(value:
|
|
9
|
+
set address(value: PlatformAddressLike);
|
|
9
10
|
get nonce(): number;
|
|
10
11
|
set nonce(value: number);
|
|
11
12
|
get credits(): bigint;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { PlatformAddressWASM } from '../../
|
|
1
|
+
import { PlatformAddressWASM } from '../../PlatformAddress/PlatformAddress.js';
|
|
2
2
|
import { dppProvider } from '../../../provider.js';
|
|
3
|
+
import { preparePlatformAddressValue } from '../../../utils.js';
|
|
3
4
|
export class InputAddressWASM {
|
|
4
5
|
/** @private **/
|
|
5
6
|
_rawInputAddress;
|
|
6
7
|
constructor(address, nonce, credits) {
|
|
7
|
-
this._rawInputAddress = new dppProvider.dpp.InputAddressNAPI(address
|
|
8
|
+
this._rawInputAddress = new dppProvider.dpp.InputAddressNAPI(preparePlatformAddressValue(address), nonce, credits.toString());
|
|
8
9
|
}
|
|
9
10
|
get address() {
|
|
10
11
|
return PlatformAddressWASM.createFromRawInstance(this._rawInputAddress.address);
|
|
11
12
|
}
|
|
12
13
|
set address(value) {
|
|
13
|
-
this._rawInputAddress.address = value
|
|
14
|
+
this._rawInputAddress.address = preparePlatformAddressValue(value);
|
|
14
15
|
}
|
|
15
16
|
get nonce() {
|
|
16
17
|
return this._rawInputAddress.nonce;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { OutputAddressNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
-
import { PlatformAddressWASM } from '../../
|
|
2
|
+
import { PlatformAddressWASM } from '../../PlatformAddress/PlatformAddress.js';
|
|
3
|
+
import { PlatformAddressLike } from '../../../types.js';
|
|
3
4
|
export declare class OutputAddressWASM {
|
|
4
5
|
/** @private **/
|
|
5
6
|
_rawOutputAddress: OutputAddressNAPI;
|
|
6
|
-
constructor(address:
|
|
7
|
+
constructor(address: PlatformAddressLike, credits: bigint);
|
|
7
8
|
get address(): PlatformAddressWASM;
|
|
8
|
-
set address(address:
|
|
9
|
+
set address(address: PlatformAddressLike);
|
|
9
10
|
get credits(): bigint;
|
|
10
11
|
set credits(credits: bigint);
|
|
11
12
|
static createFromRawInstance(rawInstance: OutputAddressNAPI): OutputAddressWASM;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { dppProvider } from '../../../provider.js';
|
|
2
|
-
import { PlatformAddressWASM } from '../../
|
|
2
|
+
import { PlatformAddressWASM } from '../../PlatformAddress/PlatformAddress.js';
|
|
3
|
+
import { preparePlatformAddressValue } from '../../../utils.js';
|
|
3
4
|
export class OutputAddressWASM {
|
|
4
5
|
/** @private **/
|
|
5
6
|
_rawOutputAddress;
|
|
6
7
|
constructor(address, credits) {
|
|
7
|
-
this._rawOutputAddress = new dppProvider.dpp.OutputAddressNAPI(address
|
|
8
|
+
this._rawOutputAddress = new dppProvider.dpp.OutputAddressNAPI(preparePlatformAddressValue(address), credits.toString());
|
|
8
9
|
}
|
|
9
10
|
get address() {
|
|
10
11
|
return PlatformAddressWASM.createFromRawInstance(this._rawOutputAddress.address);
|
|
11
12
|
}
|
|
12
13
|
set address(address) {
|
|
13
|
-
this._rawOutputAddress.address = address
|
|
14
|
+
this._rawOutputAddress.address = preparePlatformAddressValue(address);
|
|
14
15
|
}
|
|
15
16
|
get credits() {
|
|
16
17
|
return BigInt(this._rawOutputAddress.credits);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { OutputAddressNullableCreditsNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
-
import { PlatformAddressWASM } from '../../
|
|
2
|
+
import { PlatformAddressWASM } from '../../PlatformAddress/PlatformAddress.js';
|
|
3
|
+
import { PlatformAddressLike } from '../../../types.js';
|
|
3
4
|
export declare class OutputAddressNullableCreditsWASM {
|
|
4
5
|
/** @private **/
|
|
5
6
|
_rawOutputAddressNullableCredits: OutputAddressNullableCreditsNAPI;
|
|
6
|
-
constructor(address:
|
|
7
|
+
constructor(address: PlatformAddressLike, credits?: bigint);
|
|
7
8
|
get address(): PlatformAddressWASM;
|
|
8
|
-
set address(address:
|
|
9
|
+
set address(address: PlatformAddressLike);
|
|
9
10
|
get credits(): BigInt | undefined;
|
|
10
11
|
set credits(value: BigInt | undefined);
|
|
11
12
|
static createFromRawInstance(rawInstance: OutputAddressNullableCreditsNAPI): OutputAddressNullableCreditsWASM;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { PlatformAddressWASM } from '../../
|
|
1
|
+
import { PlatformAddressWASM } from '../../PlatformAddress/PlatformAddress.js';
|
|
2
2
|
import { dppProvider } from '../../../provider.js';
|
|
3
|
+
import { preparePlatformAddressValue } from '../../../utils.js';
|
|
3
4
|
export class OutputAddressNullableCreditsWASM {
|
|
4
5
|
/** @private **/
|
|
5
6
|
_rawOutputAddressNullableCredits;
|
|
6
7
|
constructor(address, credits) {
|
|
7
|
-
this._rawOutputAddressNullableCredits = new dppProvider.dpp.OutputAddressNullableCreditsNAPI(address
|
|
8
|
+
this._rawOutputAddressNullableCredits = new dppProvider.dpp.OutputAddressNullableCreditsNAPI(preparePlatformAddressValue(address), credits?.toString());
|
|
8
9
|
}
|
|
9
10
|
get address() {
|
|
10
11
|
return PlatformAddressWASM.createFromRawInstance(this._rawOutputAddressNullableCredits.address);
|
|
11
12
|
}
|
|
12
13
|
set address(address) {
|
|
13
|
-
this._rawOutputAddressNullableCredits.address = address
|
|
14
|
+
this._rawOutputAddressNullableCredits.address = preparePlatformAddressValue(address);
|
|
14
15
|
}
|
|
15
16
|
get credits() {
|
|
16
17
|
const credits = this._rawOutputAddressNullableCredits.credits;
|
|
@@ -4,7 +4,7 @@ import { IdentifierWASM } from '../Identifier.js';
|
|
|
4
4
|
export class ChainAssetLockProofWASM {
|
|
5
5
|
_rawLockProof;
|
|
6
6
|
constructor(coreChainLockedHeight, outPoint) {
|
|
7
|
-
this._rawLockProof = new dppProvider.dpp.ChainAssetLockProofNAPI(coreChainLockedHeight, outPoint);
|
|
7
|
+
this._rawLockProof = new dppProvider.dpp.ChainAssetLockProofNAPI(coreChainLockedHeight, outPoint._rawOutPoint);
|
|
8
8
|
}
|
|
9
9
|
set coreChainLockedHeight(height) {
|
|
10
10
|
this._rawLockProof.coreChainLockedHeight = height;
|
|
@@ -4,8 +4,8 @@ export declare class AddressWitnessWASM {
|
|
|
4
4
|
/** @private **/
|
|
5
5
|
_rawWitness: AddressWitnessNAPI;
|
|
6
6
|
private constructor();
|
|
7
|
-
P2PKH(signature: Uint8Array): AddressWitnessWASM;
|
|
8
|
-
P2SH(signatures: Uint8Array[], redeemScript: Uint8Array): AddressWitnessWASM;
|
|
7
|
+
static P2PKH(signature: Uint8Array): AddressWitnessWASM;
|
|
8
|
+
static P2SH(signatures: Uint8Array[], redeemScript: Uint8Array): AddressWitnessWASM;
|
|
9
9
|
getType(): string;
|
|
10
10
|
getValue(): AddressWitnessP2PKH | AddressWitnessP2SH;
|
|
11
11
|
static createFromRawInstance(rawInstance: AddressWitnessNAPI): AddressWitnessWASM;
|
|
@@ -5,10 +5,10 @@ export class AddressWitnessWASM {
|
|
|
5
5
|
constructor(witness) {
|
|
6
6
|
this._rawWitness = witness;
|
|
7
7
|
}
|
|
8
|
-
P2PKH(signature) {
|
|
8
|
+
static P2PKH(signature) {
|
|
9
9
|
return AddressWitnessWASM.createFromRawInstance(dppProvider.dpp.AddressWitnessNAPI.P2PKH(signature));
|
|
10
10
|
}
|
|
11
|
-
P2SH(signatures, redeemScript) {
|
|
11
|
+
static P2SH(signatures, redeemScript) {
|
|
12
12
|
return AddressWitnessWASM.createFromRawInstance(dppProvider.dpp.AddressWitnessNAPI.P2SH(signatures, redeemScript));
|
|
13
13
|
}
|
|
14
14
|
getType() {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type { PlatformAddressNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
-
import { NetworkLike } from '../../types.js';
|
|
2
|
+
import { NetworkLike, PlatformAddressLike } from '../../types.js';
|
|
3
3
|
export declare class PlatformAddressWASM {
|
|
4
4
|
/** @private **/
|
|
5
5
|
_rawPlatformAddress: PlatformAddressNAPI;
|
|
6
|
-
constructor(address:
|
|
6
|
+
constructor(address: PlatformAddressLike);
|
|
7
7
|
bytes(): Uint8Array;
|
|
8
8
|
toAddress(network: NetworkLike): string;
|
|
9
9
|
toBech32m(network: NetworkLike): string;
|
|
10
10
|
isP2PKH(): boolean;
|
|
11
11
|
isP2SH(): boolean;
|
|
12
12
|
hash(): Uint8Array;
|
|
13
|
+
static fromBech32m(bech32m: string): PlatformAddressWASM;
|
|
14
|
+
static fromBytes(bytes: Uint8Array): PlatformAddressWASM;
|
|
13
15
|
static createFromRawInstance(rawInstance: PlatformAddressNAPI): PlatformAddressWASM;
|
|
14
16
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { dppProvider } from '../../provider.js';
|
|
2
|
-
import { valueToDynamicValue } from '../../utils.js';
|
|
2
|
+
import { preparePlatformAddressValue, valueToDynamicValue } from '../../utils.js';
|
|
3
3
|
export class PlatformAddressWASM {
|
|
4
4
|
/** @private **/
|
|
5
5
|
_rawPlatformAddress;
|
|
6
6
|
constructor(address) {
|
|
7
|
-
this._rawPlatformAddress = new dppProvider.dpp.PlatformAddressNAPI(address);
|
|
7
|
+
this._rawPlatformAddress = new dppProvider.dpp.PlatformAddressNAPI(preparePlatformAddressValue(address));
|
|
8
8
|
}
|
|
9
9
|
bytes() {
|
|
10
10
|
return this._rawPlatformAddress.bytes();
|
|
@@ -24,6 +24,12 @@ export class PlatformAddressWASM {
|
|
|
24
24
|
hash() {
|
|
25
25
|
return this._rawPlatformAddress.hash();
|
|
26
26
|
}
|
|
27
|
+
static fromBech32m(bech32m) {
|
|
28
|
+
return PlatformAddressWASM.createFromRawInstance(dppProvider.dpp.PlatformAddressNAPI.fromBech32m(bech32m));
|
|
29
|
+
}
|
|
30
|
+
static fromBytes(bytes) {
|
|
31
|
+
return PlatformAddressWASM.createFromRawInstance(dppProvider.dpp.PlatformAddressNAPI.fromBytes(bytes));
|
|
32
|
+
}
|
|
27
33
|
static createFromRawInstance(rawInstance) {
|
|
28
34
|
const instance = Object.create(PlatformAddressWASM.prototype);
|
|
29
35
|
instance._rawPlatformAddress = rawInstance;
|
|
@@ -28,6 +28,7 @@ export declare class StateTransitionWASM {
|
|
|
28
28
|
setOwnerId(ownerId: IdentifierLike): void;
|
|
29
29
|
setIdentityContractNonce(nonce: bigint): void;
|
|
30
30
|
setIdentityNonce(nonce: bigint): void;
|
|
31
|
+
getSignableBytes(): Uint8Array;
|
|
31
32
|
bytes(): Uint8Array;
|
|
32
33
|
hex(): string;
|
|
33
34
|
base64(): string;
|
|
@@ -76,6 +76,9 @@ export class StateTransitionWASM {
|
|
|
76
76
|
setIdentityNonce(nonce) {
|
|
77
77
|
this._rawStateTransition.setIdentityNonce(nonce.toString());
|
|
78
78
|
}
|
|
79
|
+
getSignableBytes() {
|
|
80
|
+
return this._rawStateTransition.getSignableBytes();
|
|
81
|
+
}
|
|
79
82
|
bytes() {
|
|
80
83
|
return this._rawStateTransition.bytes();
|
|
81
84
|
}
|
package/dist/src/dpp/types.d.ts
CHANGED
|
@@ -28,9 +28,10 @@ import { PartialIdentityWASM } from './structs/PartialIdentity.js';
|
|
|
28
28
|
import { DocumentWASM } from './structs/Document.js';
|
|
29
29
|
import { VoteWASM } from './structs/MasternodeVote/Vote.js';
|
|
30
30
|
import { TokenPricingScheduleWASM } from './structs/Batch/TokenPricingSchedule.js';
|
|
31
|
-
import { PlatformAddressWASM } from './structs/
|
|
31
|
+
import { PlatformAddressWASM } from './structs/PlatformAddress/PlatformAddress.js';
|
|
32
32
|
export type DashPlatformProtocol = typeof protocol;
|
|
33
33
|
export type IdentifierLike = string | Uint8Array | protocol.IdentifierNAPI | IdentifierWASM;
|
|
34
|
+
export type PlatformAddressLike = string | Uint8Array | protocol.PlatformAddressNAPI | PlatformAddressWASM;
|
|
34
35
|
export type KeyTypeLike = KeyType | keyof typeof KeyType | Lowercase<keyof typeof KeyType>;
|
|
35
36
|
export type NetworkLike = NetworkWASM | keyof typeof NetworkWASM | Lowercase<keyof typeof NetworkWASM>;
|
|
36
37
|
export type SecurityLevelLike = SecurityLevel | keyof typeof SecurityLevel | Lowercase<keyof typeof SecurityLevel>;
|
|
@@ -43,7 +44,6 @@ export type TokenEmergencyActionLike = TokenEmergencyActionWASM | keyof typeof T
|
|
|
43
44
|
export type AssetLockProofTypeLike = AssetLockProofType | keyof typeof AssetLockProofType | Lowercase<keyof typeof AssetLockProofType>;
|
|
44
45
|
export type PoolingLike = PoolingWASM | keyof typeof PoolingWASM | Lowercase<keyof typeof PoolingWASM>;
|
|
45
46
|
export type VoteStateResultTypeLike = VoteStateResultType | keyof typeof VoteStateResultType | Lowercase<keyof typeof VoteStateResultType>;
|
|
46
|
-
export type EnumLike = KeyTypeLike | NetworkLike | SecurityLevelLike | PlatformVersionLike | PurposeLike;
|
|
47
47
|
export type AddressWitnessP2PKH = protocol.AddressWitnessP2pkhNAPI;
|
|
48
48
|
export type AddressWitnessP2SH = protocol.AddressWitnessP2shNAPI;
|
|
49
49
|
export type TokenConfigurationLocalizationJson = protocol.TokenConfigurationLocalizationJsonNAPI;
|
|
@@ -182,21 +182,21 @@ export interface VerifiedTokenGroupActionWithTokenPricingSchedule {
|
|
|
182
182
|
groupActionStatus: string;
|
|
183
183
|
pricingSchedule?: TokenPricingScheduleWASM;
|
|
184
184
|
}
|
|
185
|
-
export interface
|
|
185
|
+
export interface VerifiedPlatformAddressInfo {
|
|
186
|
+
address?: PlatformAddressWASM;
|
|
186
187
|
nonce?: number;
|
|
187
|
-
|
|
188
|
-
credits?: bigint;
|
|
188
|
+
balance?: bigint;
|
|
189
189
|
}
|
|
190
190
|
export interface VerifiedIdentityFullWithAddressInfos {
|
|
191
191
|
identity: IdentityWASM;
|
|
192
|
-
infos:
|
|
192
|
+
infos: VerifiedPlatformAddressInfo[];
|
|
193
193
|
}
|
|
194
194
|
export interface VerifiedIdentityWithAddressInfos {
|
|
195
195
|
identity: PartialIdentityWASM;
|
|
196
|
-
infos:
|
|
196
|
+
infos: VerifiedPlatformAddressInfo[];
|
|
197
197
|
}
|
|
198
|
-
export type VerifiedStateTransitionResultVariants = DataContractWASM | IdentityWASM | IdentifierWASM | VerifiedIdentityBalance | VerifiedIdentityTokenInfo | VerifiedTokenPricingSchedule | TokenStatus | VerifiedIdentityBalance[] | PartialIdentityWASM | VerifiedBalanceTransfer | VerifiedDocument[] | DocumentWASM | VerifiedTokenGroupActionWithDocument | VerifiedTokenGroupActionWithTokenBalance | VerifiedTokenGroupActionWithTokenIdentityInfo | VerifiedTokenGroupActionWithTokenPricingSchedule | VoteWASM |
|
|
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.
|
|
198
|
+
export type VerifiedStateTransitionResultVariants = DataContractWASM | IdentityWASM | IdentifierWASM | VerifiedIdentityBalance | VerifiedIdentityTokenInfo | VerifiedTokenPricingSchedule | TokenStatus | VerifiedIdentityBalance[] | PartialIdentityWASM | VerifiedBalanceTransfer | VerifiedDocument[] | DocumentWASM | VerifiedTokenGroupActionWithDocument | VerifiedTokenGroupActionWithTokenBalance | VerifiedTokenGroupActionWithTokenIdentityInfo | VerifiedTokenGroupActionWithTokenPricingSchedule | VoteWASM | VerifiedPlatformAddressInfo[] | VerifiedIdentityFullWithAddressInfos | VerifiedIdentityWithAddressInfos;
|
|
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.PlatformAddressInfoNAPI[] | protocol.VerifiedIdentityFullWithAddressInfosNAPI | protocol.VerifiedIdentityWithAddressInfosNAPI;
|
|
200
200
|
export interface VerifiedStateTransitionResult {
|
|
201
201
|
rootHash: Uint8Array;
|
|
202
202
|
result: VerifiedStateTransitionResultVariants;
|
|
@@ -275,3 +275,10 @@ export interface VerifiedTokensBalancesForIdentity {
|
|
|
275
275
|
rootHash: Uint8Array;
|
|
276
276
|
balances: IdentityTokenBalanceOptional[];
|
|
277
277
|
}
|
|
278
|
+
export type VerifiedPlatformAddressInfoWithRootHash = VerifiedPlatformAddressInfo & {
|
|
279
|
+
rootHash: Uint8Array;
|
|
280
|
+
};
|
|
281
|
+
export interface VerifiedPlatformAddressesInfosWithRootHash {
|
|
282
|
+
rootHash: Uint8Array;
|
|
283
|
+
infos: VerifiedPlatformAddressInfo[];
|
|
284
|
+
}
|
package/dist/src/dpp/utils.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { DynamicValue, IdentifierLikeNAPI } from '../../binaries/bindingsTypes.js';
|
|
2
|
-
import { IdentifierLike } from './types.js';
|
|
1
|
+
import type { DynamicValue, IdentifierLikeNAPI, PlatformAddressLikeNAPI } from '../../binaries/bindingsTypes.js';
|
|
2
|
+
import { IdentifierLike, PlatformAddressLike } from './types.js';
|
|
3
3
|
export declare function valueToDynamicValue(value: any): DynamicValue;
|
|
4
4
|
export declare function valueFromDynamicValue(dynamicValue: DynamicValue, jsonLike?: boolean): any;
|
|
5
5
|
export declare function prepareIdentifierValue(identifier: IdentifierLike): IdentifierLikeNAPI;
|
|
6
|
+
export declare function preparePlatformAddressValue(address: PlatformAddressLike): PlatformAddressLikeNAPI;
|
package/dist/src/dpp/utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { dppProvider } from './provider.js';
|
|
2
2
|
import { UINT32MAX } from './constants.js';
|
|
3
3
|
import { IdentifierWASM } from './structs/Identifier.js';
|
|
4
|
+
import { PlatformAddressWASM } from './structs/PlatformAddress/PlatformAddress.js';
|
|
4
5
|
export function valueToDynamicValue(value) {
|
|
5
6
|
if (typeof value === 'bigint' || (value > UINT32MAX && typeof value !== 'string')) {
|
|
6
7
|
return dppProvider.dpp.DynamicValue.fromBigIntString(BigInt(value.toString()).toString());
|
|
@@ -82,3 +83,14 @@ export function prepareIdentifierValue(identifier) {
|
|
|
82
83
|
return new dppProvider.dpp.DynamicValue(identifier);
|
|
83
84
|
}
|
|
84
85
|
}
|
|
86
|
+
export function preparePlatformAddressValue(address) {
|
|
87
|
+
if (address instanceof PlatformAddressWASM) {
|
|
88
|
+
return address._rawPlatformAddress;
|
|
89
|
+
}
|
|
90
|
+
else if (address instanceof dppProvider.dpp.PlatformAddressNAPI) {
|
|
91
|
+
return address;
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
return new dppProvider.dpp.DynamicValue(address);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { PlatformAddressLike, PlatformVersionLike, VerifiedPlatformAddressInfoWithRootHash } from '../../types.js';
|
|
2
|
+
export declare function verifyPlatformAddressInfo(proof: Uint8Array, platformAddress: PlatformAddressLike, verifySubsetOfProof: boolean, platformVersion: PlatformVersionLike): VerifiedPlatformAddressInfoWithRootHash;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
import { preparePlatformAddressValue, valueToDynamicValue } from '../../utils.js';
|
|
3
|
+
import { PlatformAddressWASM } from '../../structs/PlatformAddress/PlatformAddress.js';
|
|
4
|
+
export function verifyPlatformAddressInfo(proof, platformAddress, verifySubsetOfProof, platformVersion) {
|
|
5
|
+
const result = dppProvider.dpp.verifyAddressInfo(proof, preparePlatformAddressValue(platformAddress), verifySubsetOfProof, valueToDynamicValue(platformVersion));
|
|
6
|
+
return {
|
|
7
|
+
rootHash: result.rootHash,
|
|
8
|
+
address: result.address != null ? PlatformAddressWASM.createFromRawInstance(result.address) : undefined,
|
|
9
|
+
balance: result.balance != null ? BigInt(result.balance) : undefined,
|
|
10
|
+
nonce: result.nonce
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { PlatformAddressLike, PlatformVersionLike, VerifiedPlatformAddressesInfosWithRootHash } from '../../types.js';
|
|
2
|
+
export declare function verifyPlatformAddressesInfos(proof: Uint8Array, platformAddresses: PlatformAddressLike[], verifySubsetOfProof: boolean, platformVersion: PlatformVersionLike): VerifiedPlatformAddressesInfosWithRootHash;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
import { preparePlatformAddressValue, valueToDynamicValue } from '../../utils.js';
|
|
3
|
+
import { PlatformAddressWASM } from '../../structs/PlatformAddress/PlatformAddress.js';
|
|
4
|
+
export function verifyPlatformAddressesInfos(proof, platformAddresses, verifySubsetOfProof, platformVersion) {
|
|
5
|
+
const result = dppProvider.dpp.verifyAddressesInfos(proof, platformAddresses.map(preparePlatformAddressValue), verifySubsetOfProof, valueToDynamicValue(platformVersion));
|
|
6
|
+
return {
|
|
7
|
+
rootHash: result.rootHash,
|
|
8
|
+
infos: result.infos.map(({ nonce, credits, address }) => ({
|
|
9
|
+
nonce,
|
|
10
|
+
balance: credits != null ? BigInt(credits) : undefined,
|
|
11
|
+
address: PlatformAddressWASM.createFromRawInstance(address)
|
|
12
|
+
}))
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -5,7 +5,7 @@ import { TokenPricingScheduleWASM } from '../../structs/Batch/TokenPricingSchedu
|
|
|
5
5
|
import { PartialIdentityWASM } from '../../structs/PartialIdentity.js';
|
|
6
6
|
import { VoteWASM } from '../../structs/MasternodeVote/Vote.js';
|
|
7
7
|
import { DocumentWASM } from '../../structs/Document.js';
|
|
8
|
-
import { PlatformAddressWASM } from '../../structs/
|
|
8
|
+
import { PlatformAddressWASM } from '../../structs/PlatformAddress/PlatformAddress.js';
|
|
9
9
|
import { dppProvider } from '../../provider.js';
|
|
10
10
|
const converters = () => {
|
|
11
11
|
return new Map([
|
|
@@ -62,7 +62,7 @@ const converters = () => {
|
|
|
62
62
|
infos: v.infos.map(info => ({
|
|
63
63
|
nonce: info.nonce,
|
|
64
64
|
address: PlatformAddressWASM.createFromRawInstance(info.address),
|
|
65
|
-
|
|
65
|
+
balance: info.credits != null ? BigInt(info.credits) : undefined
|
|
66
66
|
}))
|
|
67
67
|
})],
|
|
68
68
|
[dppProvider.dpp.VerifiedIdentityWithAddressInfosNAPI, (v) => ({
|
|
@@ -70,7 +70,7 @@ const converters = () => {
|
|
|
70
70
|
infos: v.infos.map(info => ({
|
|
71
71
|
nonce: info.nonce,
|
|
72
72
|
address: PlatformAddressWASM.createFromRawInstance(info.address),
|
|
73
|
-
|
|
73
|
+
balance: info.credits != null ? BigInt(info.credits) : undefined
|
|
74
74
|
}))
|
|
75
75
|
})]
|
|
76
76
|
]);
|
|
@@ -93,11 +93,11 @@ function convertArray(result) {
|
|
|
93
93
|
: undefined
|
|
94
94
|
}));
|
|
95
95
|
}
|
|
96
|
-
if (first instanceof dppProvider.dpp.
|
|
96
|
+
if (first instanceof dppProvider.dpp.PlatformAddressInfoNAPI) {
|
|
97
97
|
return result.map(item => ({
|
|
98
98
|
nonce: item.nonce,
|
|
99
99
|
address: PlatformAddressWASM.createFromRawInstance(item.address),
|
|
100
|
-
|
|
100
|
+
balance: item.credits != null ? BigInt(item.credits) : undefined
|
|
101
101
|
}));
|
|
102
102
|
}
|
|
103
103
|
throw new Error('Unknown array type');
|