pshenmic-dpp 2.0.0-dev.27 → 2.0.0-dev.28

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 (30) hide show
  1. package/dist/binaries/bindingsTypes.d.ts +229 -0
  2. package/dist/binaries/native/aarch64-apple-darwin/pshenmic_dpp.node +0 -0
  3. package/dist/binaries/native/aarch64-pc-windows-msvc/pshenmic_dpp.node +0 -0
  4. package/dist/binaries/native/aarch64-unknown-linux-gnu/pshenmic_dpp.node +0 -0
  5. package/dist/binaries/native/aarch64-unknown-linux-musl/pshenmic_dpp.node +0 -0
  6. package/dist/binaries/native/x86_64-apple-darwin/pshenmic_dpp.node +0 -0
  7. package/dist/binaries/native/x86_64-pc-windows-msvc/pshenmic_dpp.node +0 -0
  8. package/dist/binaries/native/x86_64-unknown-linux-gnu/pshenmic_dpp.node +0 -0
  9. package/dist/binaries/native/x86_64-unknown-linux-musl/pshenmic_dpp.node +0 -0
  10. package/dist/binaries/pshenmic_dpp.android.node/arm64-v8a/libpshenmic_dpp.so +0 -0
  11. package/dist/binaries/pshenmic_dpp.apple.node/ios-arm64-simulator/libpshenmic_dpp.framework/libpshenmic_dpp +0 -0
  12. package/dist/binaries/pshenmic_dpp.d.ts +17 -0
  13. package/dist/binaries/pshenmic_dpp.js +1 -1
  14. package/dist/binaries/wasm/wasmBytes.cjs +1 -1
  15. package/dist/binaries/wasm.d.ts +17 -0
  16. package/dist/binaries/wasm.js +1 -1
  17. package/dist/src/dpp/dpp.d.ts +4 -0
  18. package/dist/src/dpp/dpp.js +4 -0
  19. package/dist/src/dpp/types.d.ts +82 -0
  20. package/dist/src/dpp/verify/AddressFunds/utils.d.ts +5 -0
  21. package/dist/src/dpp/verify/AddressFunds/utils.js +28 -0
  22. package/dist/src/dpp/verify/AddressFunds/verifyAddressesBranchState.d.ts +12 -0
  23. package/dist/src/dpp/verify/AddressFunds/verifyAddressesBranchState.js +29 -0
  24. package/dist/src/dpp/verify/AddressFunds/verifyAddressesTrunkState.d.ts +9 -0
  25. package/dist/src/dpp/verify/AddressFunds/verifyAddressesTrunkState.js +30 -0
  26. package/dist/src/dpp/verify/AddressFunds/verifyRecentAddressBalanceChanges.d.ts +9 -0
  27. package/dist/src/dpp/verify/AddressFunds/verifyRecentAddressBalanceChanges.js +24 -0
  28. package/dist/src/dpp/verify/AddressFunds/verifyRecentCompactedAddressBalanceChanges.d.ts +10 -0
  29. package/dist/src/dpp/verify/AddressFunds/verifyRecentCompactedAddressBalanceChanges.js +30 -0
  30. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  export const orchardOvkFromSeed: any;
2
2
  export const recoverNotes: any;
3
+ export const verifyAddressesBranchState: any;
3
4
  export const verifyAddressesInfos: any;
5
+ export const verifyAddressesTrunkState: any;
4
6
  export const verifyAddressInfo: any;
5
7
  export const verifyContractProof: any;
6
8
  export const verifyDocumentsProof: any;
@@ -14,6 +16,8 @@ export const verifyIdentityContractNonceProof: any;
14
16
  export const verifyIdentityKeysByIdentifierProof: any;
15
17
  export const verifyIdentityNonceProof: any;
16
18
  export const verifyMostRecentShieldedAnchorProof: any;
19
+ export const verifyRecentAddressBalanceChanges: any;
20
+ export const verifyRecentCompactedAddressBalanceChanges: any;
17
21
  export const verifyShieldedAnchorsProof: any;
18
22
  export const verifyShieldedEncryptedNotesProof: any;
19
23
  export const verifyShieldedNotesCountProof: any;
@@ -29,6 +33,7 @@ export const verifyTokenTotalSupplyProof: any;
29
33
  export const verifyTotalCreditsProof: any;
30
34
  export const verifyVotePollVoteStateProof: any;
31
35
  export const ActionTakerNAPI: any;
36
+ export const AddressBalanceChangeNAPI: any;
32
37
  export const AddressCreditWithdrawalTransitionNAPI: any;
33
38
  export const AddressFundingFromAssetLockTransitionNAPI: any;
34
39
  export const AddressFundsFeeStrategyStepNAPI: any;
@@ -39,11 +44,15 @@ export const AssetLockValueNAPI: any;
39
44
  export const AuthorizedActionTakersNAPI: any;
40
45
  export const BatchedTransitionNAPI: any;
41
46
  export const BatchTransitionNAPI: any;
47
+ export const BlockAddressBalanceChangesNAPI: any;
42
48
  export const BlockBasedDistributionNAPI: any;
49
+ export const BlockHeightCreditNAPI: any;
43
50
  export const BlockInfoNAPI: any;
44
51
  export const ChainAssetLockProofNAPI: any;
45
52
  export const ChangeControlRulesNAPI: any;
46
53
  export const CommitmentTreeNAPI: any;
54
+ export const CompactedAddressBalanceChangeNAPI: any;
55
+ export const CompactedBlockAddressBalanceChangesNAPI: any;
47
56
  export const ConsensusErrorNAPI: any;
48
57
  export const ContenderWithSerializedDocumentNAPI: any;
49
58
  export const ContestedDocumentVotePollQueryExecutionResultNAPI: any;
@@ -68,6 +77,10 @@ export const ExtendedEpochInfoNAPI: any;
68
77
  export const FinalizedEpochInfoNAPI: any;
69
78
  export const GroupNAPI: any;
70
79
  export const GroupStateTransitionInfoNAPI: any;
80
+ export const GroveAncestorNAPI: any;
81
+ export const GroveElementEntryNAPI: any;
82
+ export const GroveElementNAPI: any;
83
+ export const GroveLeafInfoNAPI: any;
71
84
  export const IdentifierNAPI: any;
72
85
  export const IdentityCreateFromAddressesTransitionNAPI: any;
73
86
  export const IdentityCreateFromShieldedPoolResultNAPI: any;
@@ -152,6 +165,8 @@ export const TransactionNAPI: any;
152
165
  export const TxInNAPI: any;
153
166
  export const TxOutNAPI: any;
154
167
  export const UnshieldTransitionNAPI: any;
168
+ export const VerifiedAddressesBranchStateNAPI: any;
169
+ export const VerifiedAddressesTrunkStateNAPI: any;
155
170
  export const VerifiedBalanceTransferNAPI: any;
156
171
  export const VerifiedContractNAPI: any;
157
172
  export const VerifiedDocumentNAPI: any;
@@ -171,6 +186,8 @@ export const VerifiedIdentityWithAddressInfosNAPI: any;
171
186
  export const VerifiedMostRecentShieldedAnchorNAPI: any;
172
187
  export const VerifiedPlatformAddressesInfosNAPI: any;
173
188
  export const VerifiedPlatformAddressInfoNAPI: any;
189
+ export const VerifiedRecentAddressBalanceChangesNAPI: any;
190
+ export const VerifiedRecentCompactedAddressBalanceChangesNAPI: any;
174
191
  export const VerifiedShieldedAnchorsNAPI: any;
175
192
  export const VerifiedShieldedEncryptedNoteNAPI: any;
176
193
  export const VerifiedShieldedEncryptedNotesNAPI: any;
@@ -1,2 +1,2 @@
1
1
  import * as protocol from "./wasmCreation.cjs";
2
- export const { orchardOvkFromSeed, recoverNotes, verifyAddressesInfos, verifyAddressInfo, verifyContractProof, verifyDocumentsProof, verifyEpochsInfoProof, verifyFinalizedEpochInfosProof, verifyIdentifierByNonUniquePublicKeyHashProof, verifyIdentityBalanceProof, verifyIdentityByIdentifierProof, verifyIdentityByUniqueKeyHashProof, verifyIdentityContractNonceProof, verifyIdentityKeysByIdentifierProof, verifyIdentityNonceProof, verifyMostRecentShieldedAnchorProof, verifyShieldedAnchorsProof, verifyShieldedEncryptedNotesProof, verifyShieldedNotesCountProof, verifyShieldedNullifiersProof, verifyShieldedPoolStateProof, verifySignatureDigest, verifyStateTransitionResult, verifyTokenBalancesForIdentitiesProof, verifyTokenContractInfoProof, verifyTokenDirectPurchasePrices, verifyTokensBalancesForIdentityProof, verifyTokenTotalSupplyProof, verifyTotalCreditsProof, verifyVotePollVoteStateProof, ActionTakerNAPI, AddressCreditWithdrawalTransitionNAPI, AddressFundingFromAssetLockTransitionNAPI, AddressFundsFeeStrategyStepNAPI, AddressFundsTransferTransitionNAPI, AddressWitnessNAPI, AssetLockProofNAPI, AssetLockValueNAPI, AuthorizedActionTakersNAPI, BatchedTransitionNAPI, BatchTransitionNAPI, BlockBasedDistributionNAPI, BlockInfoNAPI, ChainAssetLockProofNAPI, ChangeControlRulesNAPI, CommitmentTreeNAPI, ConsensusErrorNAPI, ContenderWithSerializedDocumentNAPI, ContestedDocumentVotePollQueryExecutionResultNAPI, ContractBoundsNAPI, CoreScriptNAPI, DataContractCreateTransitionNAPI, DataContractNAPI, DataContractUpdateTransitionNAPI, DistributionFunctionNAPI, DocumentBaseTransitionNAPI, DocumentCreateTransitionNAPI, DocumentDeleteTransitionNAPI, DocumentNAPI, DocumentPurchaseTransitionNAPI, DocumentReplaceTransitionNAPI, DocumentTransferTransitionNAPI, DocumentTransitionNAPI, DocumentUpdatePriceTransitionNAPI, DynamicValue, EpochBasedDistributionNAPI, ExtendedEpochInfoNAPI, FinalizedEpochInfoNAPI, GroupNAPI, GroupStateTransitionInfoNAPI, IdentifierNAPI, IdentityCreateFromAddressesTransitionNAPI, IdentityCreateFromShieldedPoolResultNAPI, IdentityCreateFromShieldedPoolTransitionNAPI, IdentityCreateTransitionNAPI, IdentityCreditTransferNAPI, IdentityCreditTransferToAddressesTransitionNAPI, IdentityCreditWithdrawalTransitionNAPI, IdentityNAPI, IdentityPublicKeyInCreationNAPI, IdentityPublicKeyNAPI, IdentityTokenBalanceNAPI, IdentityTokenBalanceOptionalNAPI, IdentityTokenInfoNAPI, IdentityTopUpFromAddressesTransitionNAPI, IdentityTopUpTransitionNAPI, IdentityUpdateTransitionNAPI, InputAddressNAPI, InstantAssetLockProofNAPI, InstantLockNAPI, MasternodeVoteTransitionNAPI, MerklePathNAPI, NoteNAPI, OrchardAddressNAPI, OrchardProverNAPI, OutPointNAPI, OutputAddressNAPI, OutputAddressNullableCreditsNAPI, PartialIdentityNAPI, PlatformAddressInfoNAPI, PlatformAddressNAPI, PrefundedVotingBalanceNAPI, PrivateEncryptedNoteNAPI, PrivateKeyNAPI, PublicKeyNAPI, RecoveredNoteNAPI, ResourceVoteChoiceNAPI, RewardDistributionTypeNAPI, SerializedActionNAPI, SharedEncryptedNoteNAPI, ShieldedBuilderNAPI, ShieldedMemoNAPI, ShieldedTransferTransitionNAPI, ShieldedWithdrawalResultNAPI, ShieldedWithdrawalTransitionNAPI, ShieldFromAssetLockTransitionNAPI, ShieldTransitionNAPI, SpendableNoteNAPI, StateTransitionNAPI, StoredAssetLockInfoNAPI, 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, UnshieldTransitionNAPI, VerifiedBalanceTransferNAPI, VerifiedContractNAPI, VerifiedDocumentNAPI, VerifiedDocumentsNAPI, VerifiedEpochsInfoNAPI, VerifiedFinlizedEpochInfosNAPI, VerifiedIdentifierByNonUniquePublicKeyHashNAPI, VerifiedIdentityBalanceRootHashNAPI, VerifiedIdentityByIdentifierNAPI, VerifiedIdentityByUniqueKeyHashNAPI, VerifiedIdentityContractNonceNAPI, VerifiedIdentityFullWithAddressInfosNAPI, VerifiedIdentityKeysByIdentifierNAPI, VerifiedIdentityNonceNAPI, VerifiedIdentityTokenInfoNAPI, VerifiedIdentityWithAddressInfosNAPI, VerifiedMostRecentShieldedAnchorNAPI, VerifiedPlatformAddressesInfosNAPI, VerifiedPlatformAddressInfoNAPI, VerifiedShieldedAnchorsNAPI, VerifiedShieldedEncryptedNoteNAPI, VerifiedShieldedEncryptedNotesNAPI, VerifiedShieldedNotesCountNAPI, VerifiedShieldedNullifierNAPI, VerifiedShieldedNullifiersNAPI, VerifiedShieldedPoolStateNAPI, 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 } = protocol.default;
2
+ export const { orchardOvkFromSeed, recoverNotes, verifyAddressesBranchState, verifyAddressesInfos, verifyAddressesTrunkState, verifyAddressInfo, verifyContractProof, verifyDocumentsProof, verifyEpochsInfoProof, verifyFinalizedEpochInfosProof, verifyIdentifierByNonUniquePublicKeyHashProof, verifyIdentityBalanceProof, verifyIdentityByIdentifierProof, verifyIdentityByUniqueKeyHashProof, verifyIdentityContractNonceProof, verifyIdentityKeysByIdentifierProof, verifyIdentityNonceProof, verifyMostRecentShieldedAnchorProof, verifyRecentAddressBalanceChanges, verifyRecentCompactedAddressBalanceChanges, verifyShieldedAnchorsProof, verifyShieldedEncryptedNotesProof, verifyShieldedNotesCountProof, verifyShieldedNullifiersProof, verifyShieldedPoolStateProof, verifySignatureDigest, verifyStateTransitionResult, verifyTokenBalancesForIdentitiesProof, verifyTokenContractInfoProof, verifyTokenDirectPurchasePrices, verifyTokensBalancesForIdentityProof, verifyTokenTotalSupplyProof, verifyTotalCreditsProof, verifyVotePollVoteStateProof, ActionTakerNAPI, AddressBalanceChangeNAPI, AddressCreditWithdrawalTransitionNAPI, AddressFundingFromAssetLockTransitionNAPI, AddressFundsFeeStrategyStepNAPI, AddressFundsTransferTransitionNAPI, AddressWitnessNAPI, AssetLockProofNAPI, AssetLockValueNAPI, AuthorizedActionTakersNAPI, BatchedTransitionNAPI, BatchTransitionNAPI, BlockAddressBalanceChangesNAPI, BlockBasedDistributionNAPI, BlockHeightCreditNAPI, BlockInfoNAPI, ChainAssetLockProofNAPI, ChangeControlRulesNAPI, CommitmentTreeNAPI, CompactedAddressBalanceChangeNAPI, CompactedBlockAddressBalanceChangesNAPI, ConsensusErrorNAPI, ContenderWithSerializedDocumentNAPI, ContestedDocumentVotePollQueryExecutionResultNAPI, ContractBoundsNAPI, CoreScriptNAPI, DataContractCreateTransitionNAPI, DataContractNAPI, DataContractUpdateTransitionNAPI, DistributionFunctionNAPI, DocumentBaseTransitionNAPI, DocumentCreateTransitionNAPI, DocumentDeleteTransitionNAPI, DocumentNAPI, DocumentPurchaseTransitionNAPI, DocumentReplaceTransitionNAPI, DocumentTransferTransitionNAPI, DocumentTransitionNAPI, DocumentUpdatePriceTransitionNAPI, DynamicValue, EpochBasedDistributionNAPI, ExtendedEpochInfoNAPI, FinalizedEpochInfoNAPI, GroupNAPI, GroupStateTransitionInfoNAPI, GroveAncestorNAPI, GroveElementEntryNAPI, GroveElementNAPI, GroveLeafInfoNAPI, IdentifierNAPI, IdentityCreateFromAddressesTransitionNAPI, IdentityCreateFromShieldedPoolResultNAPI, IdentityCreateFromShieldedPoolTransitionNAPI, IdentityCreateTransitionNAPI, IdentityCreditTransferNAPI, IdentityCreditTransferToAddressesTransitionNAPI, IdentityCreditWithdrawalTransitionNAPI, IdentityNAPI, IdentityPublicKeyInCreationNAPI, IdentityPublicKeyNAPI, IdentityTokenBalanceNAPI, IdentityTokenBalanceOptionalNAPI, IdentityTokenInfoNAPI, IdentityTopUpFromAddressesTransitionNAPI, IdentityTopUpTransitionNAPI, IdentityUpdateTransitionNAPI, InputAddressNAPI, InstantAssetLockProofNAPI, InstantLockNAPI, MasternodeVoteTransitionNAPI, MerklePathNAPI, NoteNAPI, OrchardAddressNAPI, OrchardProverNAPI, OutPointNAPI, OutputAddressNAPI, OutputAddressNullableCreditsNAPI, PartialIdentityNAPI, PlatformAddressInfoNAPI, PlatformAddressNAPI, PrefundedVotingBalanceNAPI, PrivateEncryptedNoteNAPI, PrivateKeyNAPI, PublicKeyNAPI, RecoveredNoteNAPI, ResourceVoteChoiceNAPI, RewardDistributionTypeNAPI, SerializedActionNAPI, SharedEncryptedNoteNAPI, ShieldedBuilderNAPI, ShieldedMemoNAPI, ShieldedTransferTransitionNAPI, ShieldedWithdrawalResultNAPI, ShieldedWithdrawalTransitionNAPI, ShieldFromAssetLockTransitionNAPI, ShieldTransitionNAPI, SpendableNoteNAPI, StateTransitionNAPI, StoredAssetLockInfoNAPI, 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, UnshieldTransitionNAPI, VerifiedAddressesBranchStateNAPI, VerifiedAddressesTrunkStateNAPI, VerifiedBalanceTransferNAPI, VerifiedContractNAPI, VerifiedDocumentNAPI, VerifiedDocumentsNAPI, VerifiedEpochsInfoNAPI, VerifiedFinlizedEpochInfosNAPI, VerifiedIdentifierByNonUniquePublicKeyHashNAPI, VerifiedIdentityBalanceRootHashNAPI, VerifiedIdentityByIdentifierNAPI, VerifiedIdentityByUniqueKeyHashNAPI, VerifiedIdentityContractNonceNAPI, VerifiedIdentityFullWithAddressInfosNAPI, VerifiedIdentityKeysByIdentifierNAPI, VerifiedIdentityNonceNAPI, VerifiedIdentityTokenInfoNAPI, VerifiedIdentityWithAddressInfosNAPI, VerifiedMostRecentShieldedAnchorNAPI, VerifiedPlatformAddressesInfosNAPI, VerifiedPlatformAddressInfoNAPI, VerifiedRecentAddressBalanceChangesNAPI, VerifiedRecentCompactedAddressBalanceChangesNAPI, VerifiedShieldedAnchorsNAPI, VerifiedShieldedEncryptedNoteNAPI, VerifiedShieldedEncryptedNotesNAPI, VerifiedShieldedNotesCountNAPI, VerifiedShieldedNullifierNAPI, VerifiedShieldedNullifiersNAPI, VerifiedShieldedPoolStateNAPI, 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 } = protocol.default;
@@ -111,6 +111,10 @@ export { verifyIdentityByUniqueKeyHashProof } from './verify/Identity/verifyIden
111
111
  export { verifyIdentityContractNonceProof } from './verify/Identity/verifyIdentityContractNonceProof.js';
112
112
  export { verifyIdentityKeysByIdentifierProof } from './verify/Identity/verifyIdentityKeysByIdentifierProof.js';
113
113
  export { verifyIdentityNonceProof } from './verify/Identity/verifyIdentityNonceProof.js';
114
+ export { verifyAddressesTrunkState } from './verify/AddressFunds/verifyAddressesTrunkState.js';
115
+ export { verifyAddressesBranchState } from './verify/AddressFunds/verifyAddressesBranchState.js';
116
+ export { verifyRecentAddressBalanceChanges } from './verify/AddressFunds/verifyRecentAddressBalanceChanges.js';
117
+ export { verifyRecentCompactedAddressBalanceChanges } from './verify/AddressFunds/verifyRecentCompactedAddressBalanceChanges.js';
114
118
  export { verifyTokenBalancesForIdentitiesProof } from './verify/Tokens/verifyTokenBalancesForIdentitiesProof.js';
115
119
  export { verifyTokenContractInfoProof } from './verify/Tokens/verifyTokenContractInfoProof.js';
116
120
  export { verifyTokenDirectPurchasePrices } from './verify/Tokens/verifyTokenDirectPurchasePrices.js';
@@ -111,6 +111,10 @@ export { verifyIdentityByUniqueKeyHashProof } from './verify/Identity/verifyIden
111
111
  export { verifyIdentityContractNonceProof } from './verify/Identity/verifyIdentityContractNonceProof.js';
112
112
  export { verifyIdentityKeysByIdentifierProof } from './verify/Identity/verifyIdentityKeysByIdentifierProof.js';
113
113
  export { verifyIdentityNonceProof } from './verify/Identity/verifyIdentityNonceProof.js';
114
+ export { verifyAddressesTrunkState } from './verify/AddressFunds/verifyAddressesTrunkState.js';
115
+ export { verifyAddressesBranchState } from './verify/AddressFunds/verifyAddressesBranchState.js';
116
+ export { verifyRecentAddressBalanceChanges } from './verify/AddressFunds/verifyRecentAddressBalanceChanges.js';
117
+ export { verifyRecentCompactedAddressBalanceChanges } from './verify/AddressFunds/verifyRecentCompactedAddressBalanceChanges.js';
114
118
  export { verifyTokenBalancesForIdentitiesProof } from './verify/Tokens/verifyTokenBalancesForIdentitiesProof.js';
115
119
  export { verifyTokenContractInfoProof } from './verify/Tokens/verifyTokenContractInfoProof.js';
116
120
  export { verifyTokenDirectPurchasePrices } from './verify/Tokens/verifyTokenDirectPurchasePrices.js';
@@ -373,3 +373,85 @@ export interface VerifiedShieldedNullifiers {
373
373
  rootHash: Uint8Array;
374
374
  nullifiers: VerifiedShieldedNullifier[];
375
375
  }
376
+ export type AddressBalanceOperation = 'setCredits' | 'addToCredits';
377
+ export interface AddressBalanceChange {
378
+ address: PlatformAddressWASM;
379
+ /** `setCredits` means `credits` is the new balance, `addToCredits` means it is the delta. */
380
+ operation: AddressBalanceOperation;
381
+ credits: bigint;
382
+ }
383
+ export interface BlockAddressBalanceChanges {
384
+ blockHeight: bigint;
385
+ changes: AddressBalanceChange[];
386
+ }
387
+ export interface VerifiedRecentAddressBalanceChanges {
388
+ rootHash: Uint8Array;
389
+ blocks: BlockAddressBalanceChanges[];
390
+ }
391
+ export type CompactedAddressBalanceOperation = 'setCredits' | 'addToCreditsOperations';
392
+ export interface BlockHeightCredit {
393
+ blockHeight: bigint;
394
+ credits: bigint;
395
+ }
396
+ export interface CompactedAddressBalanceChange {
397
+ address: PlatformAddressWASM;
398
+ operation: CompactedAddressBalanceOperation;
399
+ /** Populated when `operation` is `setCredits`. */
400
+ setCredits?: bigint;
401
+ /** Populated when `operation` is `addToCreditsOperations`, otherwise empty. */
402
+ addToCreditsOperations: BlockHeightCredit[];
403
+ }
404
+ export interface CompactedBlockAddressBalanceChanges {
405
+ startBlockHeight: bigint;
406
+ endBlockHeight: bigint;
407
+ changes: CompactedAddressBalanceChange[];
408
+ }
409
+ export interface VerifiedRecentCompactedAddressBalanceChanges {
410
+ rootHash: Uint8Array;
411
+ ranges: CompactedBlockAddressBalanceChanges[];
412
+ }
413
+ export type GroveElementType = 'Item' | 'ItemWithSumItem' | 'SumItem' | 'Reference' | 'ReferenceWithSumItem' | 'Tree' | 'SumTree' | 'BigSumTree' | 'ProvableSumTree' | 'CountTree' | 'ProvableCountTree' | 'CountSumTree' | 'ProvableCountSumTree' | 'ProvableCountProvableSumTree' | 'CommitmentTree' | 'MmrTree' | 'BulkAppendTree' | 'DenseAppendOnlyFixedSizeTree';
414
+ export type GroveElementWrapper = 'NonCounted' | 'NotSummed' | 'NotCountedOrSummed';
415
+ export interface GroveElement {
416
+ type: GroveElementType;
417
+ /** Set when the element opts out of its parent's aggregates; `type` still describes the wrapped element. */
418
+ wrapper?: GroveElementWrapper;
419
+ /** An item's payload, or a subtree's root key. Absent for empty subtrees. */
420
+ value?: Uint8Array;
421
+ sum?: bigint;
422
+ count?: bigint;
423
+ }
424
+ export interface GroveElementEntry {
425
+ key: Uint8Array;
426
+ element: GroveElement;
427
+ }
428
+ export interface GroveLeafInfo {
429
+ key: Uint8Array;
430
+ /** Pass as `expectedRootHash` when verifying this key's branch proof. */
431
+ hash: Uint8Array;
432
+ count?: bigint;
433
+ }
434
+ export interface GroveAncestor {
435
+ levelsUp: number;
436
+ count: bigint;
437
+ key: Uint8Array;
438
+ hash: Uint8Array;
439
+ }
440
+ export interface VerifiedAddressesTrunkState {
441
+ rootHash: Uint8Array;
442
+ elements: GroveElementEntry[];
443
+ /** Subtrees the trunk stops at. Empty when the whole tree fit in the trunk. */
444
+ leafKeys: GroveLeafInfo[];
445
+ chunkDepths: number[];
446
+ maxTreeDepth: number;
447
+ /** Which truncated subtree would hold `key`, or undefined if it is already in `elements`. */
448
+ traceKeyToLeaf: (key: Uint8Array) => GroveLeafInfo | undefined;
449
+ getAncestor: (leafKey: Uint8Array, minPrivacyTreeCount: bigint) => GroveAncestor | undefined;
450
+ }
451
+ export interface VerifiedAddressesBranchState {
452
+ elements: GroveElementEntry[];
453
+ leafKeys: GroveLeafInfo[];
454
+ branchRootHash: Uint8Array;
455
+ traceKeyToLeaf: (key: Uint8Array) => GroveLeafInfo | undefined;
456
+ getAncestor: (leafKey: Uint8Array, minPrivacyTreeCount: bigint) => GroveAncestor | undefined;
457
+ }
@@ -0,0 +1,5 @@
1
+ import type * as protocol from '../../../../binaries/bindingsTypes.js';
2
+ import { GroveAncestor, GroveElementEntry, GroveLeafInfo } from '../../types.js';
3
+ export declare function mapGroveElementEntry(entry: protocol.GroveElementEntryNAPI): GroveElementEntry;
4
+ export declare function mapGroveLeafInfo(info: protocol.GroveLeafInfoNAPI): GroveLeafInfo;
5
+ export declare function mapGroveAncestor(ancestor: protocol.GroveAncestorNAPI): GroveAncestor;
@@ -0,0 +1,28 @@
1
+ export function mapGroveElementEntry(entry) {
2
+ const { element } = entry;
3
+ return {
4
+ key: entry.key,
5
+ element: {
6
+ type: element.type,
7
+ wrapper: element.wrapper != null ? element.wrapper : undefined,
8
+ value: element.value ?? undefined,
9
+ sum: element.sum != null ? BigInt(element.sum) : undefined,
10
+ count: element.count != null ? BigInt(element.count) : undefined
11
+ }
12
+ };
13
+ }
14
+ export function mapGroveLeafInfo(info) {
15
+ return {
16
+ key: info.key,
17
+ hash: info.hash,
18
+ count: info.count != null ? BigInt(info.count) : undefined
19
+ };
20
+ }
21
+ export function mapGroveAncestor(ancestor) {
22
+ return {
23
+ levelsUp: ancestor.levelsUp,
24
+ count: BigInt(ancestor.count),
25
+ key: ancestor.key,
26
+ hash: ancestor.hash
27
+ };
28
+ }
@@ -0,0 +1,12 @@
1
+ import { PlatformVersionLike, VerifiedAddressesBranchState } from '../../types.js';
2
+ /**
3
+ * Verifies a branch chunk proof for the address funds tree.
4
+ *
5
+ * `expectedRootHash` must be the `hash` the parent trunk or branch reported for
6
+ * `key`; it is what anchors this subtree to the proven root, so the result
7
+ * carries no root hash of its own.
8
+ *
9
+ * `depth` is validated against an allowed range, so take it from the parent
10
+ * trunk's `chunkDepths` rather than picking a value.
11
+ */
12
+ export declare function verifyAddressesBranchState(proof: Uint8Array, key: Uint8Array, depth: number, expectedRootHash: Uint8Array, platformVersion: PlatformVersionLike): VerifiedAddressesBranchState;
@@ -0,0 +1,29 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { valueToDynamicValue } from '../../utils.js';
3
+ import { mapGroveAncestor, mapGroveElementEntry, mapGroveLeafInfo } from './utils.js';
4
+ /**
5
+ * Verifies a branch chunk proof for the address funds tree.
6
+ *
7
+ * `expectedRootHash` must be the `hash` the parent trunk or branch reported for
8
+ * `key`; it is what anchors this subtree to the proven root, so the result
9
+ * carries no root hash of its own.
10
+ *
11
+ * `depth` is validated against an allowed range, so take it from the parent
12
+ * trunk's `chunkDepths` rather than picking a value.
13
+ */
14
+ export function verifyAddressesBranchState(proof, key, depth, expectedRootHash, platformVersion) {
15
+ const result = dppProvider.dpp.verifyAddressesBranchState(proof, key, depth, expectedRootHash, valueToDynamicValue(platformVersion));
16
+ return {
17
+ elements: result.elements.map(mapGroveElementEntry),
18
+ leafKeys: result.leafKeys.map(mapGroveLeafInfo),
19
+ branchRootHash: result.branchRootHash,
20
+ traceKeyToLeaf: (traced) => {
21
+ const leaf = result.traceKeyToLeaf(traced);
22
+ return leaf != null ? mapGroveLeafInfo(leaf) : undefined;
23
+ },
24
+ getAncestor: (leafKey, minPrivacyTreeCount) => {
25
+ const ancestor = result.getAncestor(leafKey, minPrivacyTreeCount.toString());
26
+ return ancestor != null ? mapGroveAncestor(ancestor) : undefined;
27
+ }
28
+ };
29
+ }
@@ -0,0 +1,9 @@
1
+ import { PlatformVersionLike, VerifiedAddressesTrunkState } from '../../types.js';
2
+ /**
3
+ * Verifies a trunk chunk proof for the address funds tree.
4
+ *
5
+ * The trunk covers the top of the tree only. Subtrees below it are truncated
6
+ * and listed in `leafKeys`; use `traceKeyToLeaf` to find which one holds an
7
+ * address, then fetch it with `verifyAddressesBranchState`.
8
+ */
9
+ export declare function verifyAddressesTrunkState(proof: Uint8Array, platformVersion: PlatformVersionLike): VerifiedAddressesTrunkState;
@@ -0,0 +1,30 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { valueToDynamicValue } from '../../utils.js';
3
+ import { mapGroveAncestor, mapGroveElementEntry, mapGroveLeafInfo } from './utils.js';
4
+ /**
5
+ * Verifies a trunk chunk proof for the address funds tree.
6
+ *
7
+ * The trunk covers the top of the tree only. Subtrees below it are truncated
8
+ * and listed in `leafKeys`; use `traceKeyToLeaf` to find which one holds an
9
+ * address, then fetch it with `verifyAddressesBranchState`.
10
+ */
11
+ export function verifyAddressesTrunkState(proof, platformVersion) {
12
+ const result = dppProvider.dpp.verifyAddressesTrunkState(proof, valueToDynamicValue(platformVersion));
13
+ return {
14
+ rootHash: result.rootHash,
15
+ elements: result.elements.map(mapGroveElementEntry),
16
+ leafKeys: result.leafKeys.map(mapGroveLeafInfo),
17
+ chunkDepths: result.chunkDepths,
18
+ maxTreeDepth: result.maxTreeDepth,
19
+ // These close over the verified result because tracing walks the proof's
20
+ // reconstructed tree, which is not projected into plain data.
21
+ traceKeyToLeaf: (key) => {
22
+ const leaf = result.traceKeyToLeaf(key);
23
+ return leaf != null ? mapGroveLeafInfo(leaf) : undefined;
24
+ },
25
+ getAncestor: (leafKey, minPrivacyTreeCount) => {
26
+ const ancestor = result.getAncestor(leafKey, minPrivacyTreeCount.toString());
27
+ return ancestor != null ? mapGroveAncestor(ancestor) : undefined;
28
+ }
29
+ };
30
+ }
@@ -0,0 +1,9 @@
1
+ import { PlatformVersionLike, VerifiedRecentAddressBalanceChanges } from '../../types.js';
2
+ /**
3
+ * Verifies a proof of the address balance changes from a block height onwards.
4
+ *
5
+ * `startHeightExclusive` must match the flag the proof was requested with: it
6
+ * selects a range starting just past `startBlockHeight` rather than at it, and
7
+ * the two produce different queries, so a mismatch fails verification.
8
+ */
9
+ export declare function verifyRecentAddressBalanceChanges(proof: Uint8Array, startBlockHeight: bigint, startHeightExclusive: boolean, limit: number | undefined, verifySubsetOfProof: boolean, platformVersion: PlatformVersionLike): VerifiedRecentAddressBalanceChanges;
@@ -0,0 +1,24 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { valueToDynamicValue } from '../../utils.js';
3
+ import { PlatformAddressWASM } from '../../structs/PlatformAddress/PlatformAddress.js';
4
+ /**
5
+ * Verifies a proof of the address balance changes from a block height onwards.
6
+ *
7
+ * `startHeightExclusive` must match the flag the proof was requested with: it
8
+ * selects a range starting just past `startBlockHeight` rather than at it, and
9
+ * the two produce different queries, so a mismatch fails verification.
10
+ */
11
+ export function verifyRecentAddressBalanceChanges(proof, startBlockHeight, startHeightExclusive, limit, verifySubsetOfProof, platformVersion) {
12
+ const result = dppProvider.dpp.verifyRecentAddressBalanceChanges(proof, startBlockHeight.toString(), startHeightExclusive, limit, verifySubsetOfProof, valueToDynamicValue(platformVersion));
13
+ return {
14
+ rootHash: result.rootHash,
15
+ blocks: result.blocks.map((block) => ({
16
+ blockHeight: BigInt(block.blockHeight),
17
+ changes: block.changes.map((change) => ({
18
+ address: PlatformAddressWASM.createFromRawInstance(change.address),
19
+ operation: change.operation,
20
+ credits: BigInt(change.credits)
21
+ }))
22
+ }))
23
+ };
24
+ }
@@ -0,0 +1,10 @@
1
+ import { PlatformVersionLike, VerifiedRecentCompactedAddressBalanceChanges } from '../../types.js';
2
+ /**
3
+ * Verifies a proof of the compacted address balance changes from a block height
4
+ * onwards, where each entry merges a range of blocks.
5
+ *
6
+ * There is no subset flag here: the proof is a self-contained envelope whose
7
+ * predecessor half authenticates which range covers the requested height, so
8
+ * the forward half has nothing to be a subset of.
9
+ */
10
+ export declare function verifyRecentCompactedAddressBalanceChanges(proof: Uint8Array, startBlockHeight: bigint, limit: number | undefined, platformVersion: PlatformVersionLike): VerifiedRecentCompactedAddressBalanceChanges;
@@ -0,0 +1,30 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { valueToDynamicValue } from '../../utils.js';
3
+ import { PlatformAddressWASM } from '../../structs/PlatformAddress/PlatformAddress.js';
4
+ /**
5
+ * Verifies a proof of the compacted address balance changes from a block height
6
+ * onwards, where each entry merges a range of blocks.
7
+ *
8
+ * There is no subset flag here: the proof is a self-contained envelope whose
9
+ * predecessor half authenticates which range covers the requested height, so
10
+ * the forward half has nothing to be a subset of.
11
+ */
12
+ export function verifyRecentCompactedAddressBalanceChanges(proof, startBlockHeight, limit, platformVersion) {
13
+ const result = dppProvider.dpp.verifyRecentCompactedAddressBalanceChanges(proof, startBlockHeight.toString(), limit, valueToDynamicValue(platformVersion));
14
+ return {
15
+ rootHash: result.rootHash,
16
+ ranges: result.ranges.map((range) => ({
17
+ startBlockHeight: BigInt(range.startBlockHeight),
18
+ endBlockHeight: BigInt(range.endBlockHeight),
19
+ changes: range.changes.map((change) => ({
20
+ address: PlatformAddressWASM.createFromRawInstance(change.address),
21
+ operation: change.operation,
22
+ setCredits: change.setCredits != null ? BigInt(change.setCredits) : undefined,
23
+ addToCreditsOperations: change.addToCreditsOperations.map((operation) => ({
24
+ blockHeight: BigInt(operation.blockHeight),
25
+ credits: BigInt(operation.credits)
26
+ }))
27
+ }))
28
+ }))
29
+ };
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pshenmic-dpp",
3
- "version": "2.0.0-dev.27",
3
+ "version": "2.0.0-dev.28",
4
4
  "main": "dist/src/wasm.js",
5
5
  "types": "dist/src/wasm.d.ts",
6
6
  "react-native": "./dist/src/react-native.js",