pshenmic-dpp 2.0.0-dev.5 → 2.0.0-dev.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/binaries/bindingsTypes.d.ts +17 -7
  2. package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
  3. package/dist/binaries/pshenmic_dpp.d.ts +2 -0
  4. package/dist/binaries/pshenmic_dpp.js +1 -1
  5. package/dist/binaries/wasm/wasmBytes.js +1 -1
  6. package/dist/binaries/wasm.d.ts +2 -0
  7. package/dist/binaries/wasm.js +1 -1
  8. package/dist/src/dpp/dpp.d.ts +3 -2
  9. package/dist/src/dpp/dpp.js +3 -2
  10. package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +1 -1
  11. package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +1 -1
  12. package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +1 -1
  13. package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +1 -1
  14. package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +1 -1
  15. package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +1 -1
  16. package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +1 -1
  17. package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +1 -1
  18. package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +1 -1
  19. package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +1 -1
  20. package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.d.ts +4 -3
  21. package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +4 -3
  22. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +4 -3
  23. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +4 -3
  24. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +4 -3
  25. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +4 -3
  26. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.d.ts +1 -1
  27. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.js +1 -1
  28. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.d.ts +1 -1
  29. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.js +1 -1
  30. package/dist/src/dpp/structs/DataContract.d.ts +4 -4
  31. package/dist/src/dpp/structs/DataContract.js +1 -1
  32. package/dist/src/dpp/structs/Document.d.ts +1 -1
  33. package/dist/src/dpp/structs/Document.js +1 -1
  34. package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.d.ts +4 -2
  35. package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.js +8 -2
  36. package/dist/src/dpp/types.d.ts +11 -8
  37. package/dist/src/dpp/utils.d.ts +4 -3
  38. package/dist/src/dpp/utils.js +23 -5
  39. package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.d.ts +2 -0
  40. package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.js +12 -0
  41. package/dist/src/dpp/verify/StateTransition/utils.js +4 -4
  42. package/package.json +1 -1
  43. package/tests/unit/DynamicValue.spec.ts +12 -0
  44. /package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.d.ts +0 -0
  45. /package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.js +0 -0
@@ -1,3 +1,4 @@
1
+ export const verifyAddressInfo: any;
1
2
  export const verifyContractProof: any;
2
3
  export const verifyDocumentsProof: any;
3
4
  export const verifyEpochsInfoProof: any;
@@ -119,6 +120,7 @@ export const TotalSingleTokenBalanceNAPI: any;
119
120
  export const TransactionNAPI: any;
120
121
  export const TxInNAPI: any;
121
122
  export const TxOutNAPI: any;
123
+ export const VerifiedAddressInfoNAPI: any;
122
124
  export const VerifiedAddressInfosNAPI: any;
123
125
  export const VerifiedBalanceTransferNAPI: any;
124
126
  export const VerifiedContractNAPI: any;
@@ -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, VerifiedAddressInfosNAPI, VerifiedBalanceTransferNAPI, VerifiedContractNAPI, VerifiedDocumentNAPI, VerifiedDocumentsNAPI, VerifiedEpochsInfoNAPI, VerifiedIdentifierByNonUniquePublicKeyHashNAPI, VerifiedIdentityBalanceRootHashNAPI, VerifiedIdentityByIdentifierNAPI, VerifiedIdentityByUniqueKeyHashNAPI, VerifiedIdentityContractNonceNAPI, VerifiedIdentityFullWithAddressInfosNAPI, VerifiedIdentityKeysByIdentifierNAPI, VerifiedIdentityNonceNAPI, VerifiedIdentityTokenInfoNAPI, VerifiedIdentityWithAddressInfosNAPI, 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;
44
+ export const { 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, 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, VerifiedAddressInfoNAPI, VerifiedAddressInfosNAPI, VerifiedBalanceTransferNAPI, VerifiedContractNAPI, VerifiedDocumentNAPI, VerifiedDocumentsNAPI, VerifiedEpochsInfoNAPI, VerifiedIdentifierByNonUniquePublicKeyHashNAPI, VerifiedIdentityBalanceRootHashNAPI, VerifiedIdentityByIdentifierNAPI, VerifiedIdentityByUniqueKeyHashNAPI, VerifiedIdentityContractNonceNAPI, VerifiedIdentityFullWithAddressInfosNAPI, VerifiedIdentityKeysByIdentifierNAPI, VerifiedIdentityNonceNAPI, VerifiedIdentityTokenInfoNAPI, VerifiedIdentityWithAddressInfosNAPI, 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;
@@ -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/Address/PlatformAddress.js';
25
- export { AddressWitnessWASM } from './structs/Address/AddressWitness.js';
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';
@@ -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/Address/PlatformAddress.js';
25
- export { AddressWitnessWASM } from './structs/Address/AddressWitness.js';
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 '../Address/AddressWitness.js';
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 '../Address/AddressWitness.js';
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 '../Address/AddressWitness.js';
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 '../Address/AddressWitness.js';
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 '../Address/AddressWitness.js';
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 '../Address/AddressWitness.js';
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 '../Address/AddressWitness.js';
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 '../Address/AddressWitness.js';
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 '../Address/AddressWitness.js';
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 '../Address/AddressWitness.js';
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 '../../Address/PlatformAddress.js';
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: PlatformAddressWASM, nonce: number, credits: bigint);
7
+ constructor(address: PlatformAddressLike, nonce: number, credits: bigint);
7
8
  get address(): PlatformAddressWASM;
8
- set address(value: PlatformAddressWASM);
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 '../../Address/PlatformAddress.js';
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._rawPlatformAddress, nonce, credits.toString());
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._rawPlatformAddress;
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 '../../Address/PlatformAddress.js';
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: PlatformAddressWASM, credits: bigint);
7
+ constructor(address: PlatformAddressLike, credits: bigint);
7
8
  get address(): PlatformAddressWASM;
8
- set address(address: PlatformAddressWASM);
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 '../../Address/PlatformAddress.js';
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._rawPlatformAddress, credits.toString());
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._rawPlatformAddress;
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 '../../Address/PlatformAddress.js';
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: PlatformAddressWASM, credits?: bigint);
7
+ constructor(address: PlatformAddressLike, credits?: bigint);
7
8
  get address(): PlatformAddressWASM;
8
- set address(address: PlatformAddressWASM);
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 '../../Address/PlatformAddress.js';
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._rawPlatformAddress, credits?.toString());
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._rawPlatformAddress;
14
+ this._rawOutputAddressNullableCredits.address = preparePlatformAddressValue(address);
14
15
  }
15
16
  get credits() {
16
17
  const credits = this._rawOutputAddressNullableCredits.credits;
@@ -8,7 +8,7 @@ export declare class DocumentCreateTransitionWASM {
8
8
  /** @private **/
9
9
  _rawDocumentCreateTransition: DocumentCreateTransitionNAPI;
10
10
  constructor(document: DocumentWASM, identityContractNonce: bigint, prefundedVotingBalance?: PrefundedVotingBalanceWASM, tokenPaymentInfo?: TokenPaymentInfoWASM);
11
- get data(): object;
11
+ get data(): any;
12
12
  set data(value: object);
13
13
  get base(): DocumentBaseTransitionWASM;
14
14
  set base(value: DocumentBaseTransitionWASM);
@@ -10,7 +10,7 @@ export class DocumentCreateTransitionWASM {
10
10
  this._rawDocumentCreateTransition = new dppProvider.dpp.DocumentCreateTransitionNAPI(document._rawDocument, identityContractNonce.toString(), prefundedVotingBalance?._rawPrefundedVotingBalance, tokenPaymentInfo?._rawTokenPaymentInfo);
11
11
  }
12
12
  get data() {
13
- return valueFromDynamicValue(this._rawDocumentCreateTransition.data);
13
+ return valueFromDynamicValue(this._rawDocumentCreateTransition.data, true);
14
14
  }
15
15
  set data(value) {
16
16
  this._rawDocumentCreateTransition.data = valueToDynamicValue(value);
@@ -7,7 +7,7 @@ export declare class DocumentReplaceTransitionWASM {
7
7
  /** @private **/
8
8
  _rawDocumentReplaceTransition: DocumentReplaceTransitionNAPI;
9
9
  constructor(document: DocumentWASM, identityContractNonce: bigint, tokenPaymentInfo?: TokenPaymentInfoWASM);
10
- get data(): object;
10
+ get data(): any;
11
11
  set data(value: object);
12
12
  get base(): DocumentBaseTransitionWASM;
13
13
  set base(value: DocumentBaseTransitionWASM);
@@ -9,7 +9,7 @@ export class DocumentReplaceTransitionWASM {
9
9
  this._rawDocumentReplaceTransition = new dppProvider.dpp.DocumentReplaceTransitionNAPI(document._rawDocument, identityContractNonce.toString(), tokenPaymentInfo?._rawTokenPaymentInfo);
10
10
  }
11
11
  get data() {
12
- return valueFromDynamicValue(this._rawDocumentReplaceTransition.data);
12
+ return valueFromDynamicValue(this._rawDocumentReplaceTransition.data, true);
13
13
  }
14
14
  set data(value) {
15
15
  this._rawDocumentReplaceTransition.data = valueToDynamicValue(value);
@@ -21,14 +21,14 @@ export declare class DataContractWASM {
21
21
  set description(value: string | undefined);
22
22
  get keywords(): string[];
23
23
  set keywords(value: string[]);
24
- getSchemas(): object;
25
- getConfig(): object;
24
+ getSchemas(): any;
25
+ getConfig(): any;
26
26
  setConfig(value: object, platformVersion?: PlatformVersionLike): void;
27
27
  bytes(platformVersion: PlatformVersionLike): Uint8Array;
28
28
  hex(platformVersion: PlatformVersionLike): string;
29
29
  base64(platformVersion: PlatformVersionLike): string;
30
- toJSON(platformVersion: PlatformVersionLike): object;
31
- toValue(platformVersion: PlatformVersionLike): object;
30
+ toJSON(platformVersion: PlatformVersionLike): any;
31
+ toValue(platformVersion: PlatformVersionLike): any;
32
32
  static fromValue(value: object, fullValidation: boolean, platformVersion?: PlatformVersionLike): DataContractWASM;
33
33
  static fromBytes(bytes: Uint8Array, fullValidation: boolean, platformVersion?: PlatformVersionLike): DataContractWASM;
34
34
  static fromHex(hex: string, fullValidation: boolean, platformVersion?: PlatformVersionLike): DataContractWASM;
@@ -79,7 +79,7 @@ export class DataContractWASM {
79
79
  this._rawDataContract.keywords = value;
80
80
  }
81
81
  getSchemas() {
82
- return valueFromDynamicValue(this._rawDataContract.getSchemas());
82
+ return valueFromDynamicValue(this._rawDataContract.getSchemas(), true);
83
83
  }
84
84
  getConfig() {
85
85
  return valueFromDynamicValue(this._rawDataContract.getConfig());
@@ -14,7 +14,7 @@ export declare class DocumentWASM {
14
14
  set dataContractId(value: IdentifierLike);
15
15
  get ownerId(): IdentifierWASM;
16
16
  set ownerId(value: IdentifierLike);
17
- get properties(): object;
17
+ get properties(): any;
18
18
  set properties(value: object);
19
19
  get revision(): bigint | undefined;
20
20
  set revision(value: bigint | undefined);
@@ -32,7 +32,7 @@ export class DocumentWASM {
32
32
  this._rawDocument.ownerId = prepareIdentifierValue(value);
33
33
  }
34
34
  get properties() {
35
- return valueFromDynamicValue(this._rawDocument.properties);
35
+ return valueFromDynamicValue(this._rawDocument.properties, true);
36
36
  }
37
37
  set properties(value) {
38
38
  this._rawDocument.properties = valueToDynamicValue(value);
@@ -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: Uint8Array);
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,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/Address/PlatformAddress.js';
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,20 +182,20 @@ export interface VerifiedTokenGroupActionWithTokenPricingSchedule {
182
182
  groupActionStatus: string;
183
183
  pricingSchedule?: TokenPricingScheduleWASM;
184
184
  }
185
- export interface VerifiedAddressInfo {
185
+ export interface VerifiedPlatformAddressInfo {
186
+ address?: PlatformAddressWASM;
186
187
  nonce?: number;
187
- address: PlatformAddressWASM;
188
- credits?: bigint;
188
+ balance?: bigint;
189
189
  }
190
190
  export interface VerifiedIdentityFullWithAddressInfos {
191
191
  identity: IdentityWASM;
192
- infos: VerifiedAddressInfo[];
192
+ infos: VerifiedPlatformAddressInfo[];
193
193
  }
194
194
  export interface VerifiedIdentityWithAddressInfos {
195
195
  identity: PartialIdentityWASM;
196
- infos: VerifiedAddressInfo[];
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 | VerifiedAddressInfo[] | VerifiedIdentityFullWithAddressInfos | VerifiedIdentityWithAddressInfos;
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
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;
200
200
  export interface VerifiedStateTransitionResult {
201
201
  rootHash: Uint8Array;
@@ -275,3 +275,6 @@ export interface VerifiedTokensBalancesForIdentity {
275
275
  rootHash: Uint8Array;
276
276
  balances: IdentityTokenBalanceOptional[];
277
277
  }
278
+ export type VerifiedPlatformAddressInfoWithRootHash = VerifiedPlatformAddressInfo & {
279
+ rootHash: Uint8Array;
280
+ };
@@ -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
- export declare function valueFromDynamicValue(dynamicValue: DynamicValue): any;
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;
@@ -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());
@@ -43,21 +44,27 @@ export function valueToDynamicValue(value) {
43
44
  return new dppProvider.dpp.DynamicValue(value);
44
45
  }
45
46
  }
46
- export function valueFromDynamicValue(dynamicValue) {
47
+ export function valueFromDynamicValue(dynamicValue, jsonLike = false) {
47
48
  if (dynamicValue.value instanceof dppProvider.dpp.DynamicValue) {
48
- return valueToDynamicValue(dynamicValue.value);
49
+ return valueFromDynamicValue(dynamicValue.value, jsonLike);
49
50
  }
50
51
  else if (dynamicValue.isBigInt()) {
51
- return BigInt(dynamicValue.value);
52
+ const num = BigInt(dynamicValue.value);
53
+ if (jsonLike && num < BigInt(Number.MAX_SAFE_INTEGER) && num > BigInt(Number.MIN_SAFE_INTEGER)) {
54
+ return Number(dynamicValue.value);
55
+ }
56
+ else {
57
+ return num;
58
+ }
52
59
  }
53
60
  else if (Array.isArray(dynamicValue.value)) {
54
- return dynamicValue.value.map(valueFromDynamicValue);
61
+ return dynamicValue.value.map(v => valueFromDynamicValue(v, jsonLike));
55
62
  }
56
63
  else if (typeof dynamicValue.value === 'object' && !(dynamicValue.value instanceof Uint8Array) && dynamicValue.value !== null) {
57
64
  const obj = {};
58
65
  const keys = Object.keys(dynamicValue.value);
59
66
  for (const key of keys) {
60
- obj[key] = valueFromDynamicValue(dynamicValue.value[key]);
67
+ obj[key] = valueFromDynamicValue(dynamicValue.value[key], jsonLike);
61
68
  }
62
69
  return obj;
63
70
  }
@@ -76,3 +83,14 @@ export function prepareIdentifierValue(identifier) {
76
83
  return new dppProvider.dpp.DynamicValue(identifier);
77
84
  }
78
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
+ }
@@ -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/Address/PlatformAddress.js';
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
- credits: info.credits != null ? BigInt(info.credits) : undefined
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
- credits: info.credits != null ? BigInt(info.credits) : undefined
73
+ balance: info.credits != null ? BigInt(info.credits) : undefined
74
74
  }))
75
75
  })]
76
76
  ]);
@@ -97,7 +97,7 @@ function convertArray(result) {
97
97
  return result.map(item => ({
98
98
  nonce: item.nonce,
99
99
  address: PlatformAddressWASM.createFromRawInstance(item.address),
100
- credits: item.credits != null ? BigInt(item.credits) : undefined
100
+ balance: item.credits != null ? BigInt(item.credits) : undefined
101
101
  }));
102
102
  }
103
103
  throw new Error('Unknown array type');