pshenmic-dpp 2.0.0-dev.6 → 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.
- package/dist/binaries/bindingsTypes.d.ts +17 -7
- package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
- package/dist/binaries/pshenmic_dpp.d.ts +2 -0
- package/dist/binaries/pshenmic_dpp.js +1 -1
- package/dist/binaries/wasm/wasmBytes.js +1 -1
- package/dist/binaries/wasm.d.ts +2 -0
- 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/{Address → PlatformAddress}/PlatformAddress.d.ts +4 -2
- package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.js +8 -2
- package/dist/src/dpp/types.d.ts +11 -8
- 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/StateTransition/utils.js +4 -4
- package/package.json +1 -1
- /package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.d.ts +0 -0
- /package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.js +0 -0
package/dist/binaries/wasm.d.ts
CHANGED
|
@@ -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;
|
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, 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;
|
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;
|
|
@@ -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;
|
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,20 +182,20 @@ 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 |
|
|
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
|
+
};
|
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
|
+
}
|
|
@@ -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
|
]);
|
|
@@ -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
|
-
|
|
100
|
+
balance: item.credits != null ? BigInt(item.credits) : undefined
|
|
101
101
|
}));
|
|
102
102
|
}
|
|
103
103
|
throw new Error('Unknown array type');
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|