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
@@ -782,11 +782,11 @@ export declare class IdentityUpdateTransitionNAPI {
782
782
  static fromStateTransition(st: StateTransitionNAPI): IdentityUpdateTransitionNAPI;
783
783
  }
784
784
  export declare class InputAddressNAPI {
785
- constructor(address: PlatformAddressNAPI, nonce: number, credits: BigIntString);
785
+ constructor(address: PlatformAddressLikeNAPI, nonce: number, credits: BigIntString);
786
786
  get address(): PlatformAddressNAPI;
787
787
  get nonce(): number;
788
788
  get credits(): BigIntString;
789
- set address(address: PlatformAddressNAPI);
789
+ set address(address: PlatformAddressLikeNAPI);
790
790
  set nonce(nonce: number);
791
791
  set credits(credits: BigIntString);
792
792
  }
@@ -856,17 +856,17 @@ export declare class OutPointNAPI {
856
856
  static fromBase64(base64: string): OutPointNAPI;
857
857
  }
858
858
  export declare class OutputAddressNAPI {
859
- constructor(address: PlatformAddressNAPI, credits: BigIntString);
859
+ constructor(address: PlatformAddressLikeNAPI, credits: BigIntString);
860
860
  get address(): PlatformAddressNAPI;
861
861
  get credits(): BigIntString;
862
- set address(address: PlatformAddressNAPI);
862
+ set address(address: PlatformAddressLikeNAPI);
863
863
  set credits(credits: BigIntString);
864
864
  }
865
865
  export declare class OutputAddressNullableCreditsNAPI {
866
- constructor(address: PlatformAddressNAPI, credits?: BigIntString | undefined | null);
866
+ constructor(address: PlatformAddressLikeNAPI, credits?: BigIntString | undefined | null);
867
867
  get address(): PlatformAddressNAPI;
868
868
  get credits(): BigIntString | null;
869
- set address(address: PlatformAddressNAPI);
869
+ set address(address: PlatformAddressLikeNAPI);
870
870
  set credits(credits: BigIntString | undefined | null);
871
871
  }
872
872
  export declare class PartialIdentityNAPI {
@@ -883,13 +883,15 @@ export declare class PartialIdentityNAPI {
883
883
  set notFoundPublicKeys(keys: Array<number> | undefined | null);
884
884
  }
885
885
  export declare class PlatformAddressNAPI {
886
- constructor(address: Uint8Array);
886
+ constructor(address: PlatformAddressLikeNAPI);
887
887
  bytes(): Uint8Array;
888
888
  toAddress(jsNetwork: DynamicValue): string;
889
889
  toBech32m(jsNetwork: DynamicValue): string;
890
890
  isP2PKH(): boolean;
891
891
  isP2SH(): boolean;
892
892
  hash(): Uint8Array;
893
+ static fromBech32m(bech32M: string): PlatformAddressNAPI;
894
+ static fromBytes(bytes: Uint8Array): PlatformAddressNAPI;
893
895
  }
894
896
  export declare class PrefundedVotingBalanceNAPI {
895
897
  constructor(indexName: string, credits: BigIntString);
@@ -1346,6 +1348,12 @@ export declare class TxOutNAPI {
1346
1348
  set scriptPubKeyBytes(scriptPubkeyBytes: Uint8Array);
1347
1349
  getScriptPubKeyASM(): string;
1348
1350
  }
1351
+ export declare class VerifiedAddressInfoNAPI {
1352
+ rootHash: Uint8Array;
1353
+ nonce?: number;
1354
+ balance?: BigIntString;
1355
+ get address(): PlatformAddressNAPI | null;
1356
+ }
1349
1357
  export declare class VerifiedAddressInfosNAPI {
1350
1358
  nonce?: number;
1351
1359
  get address(): PlatformAddressNAPI;
@@ -1633,6 +1641,7 @@ export declare const enum NetworkNAPI {
1633
1641
  Devnet = 2,
1634
1642
  Regtest = 3
1635
1643
  }
1644
+ export type PlatformAddressLikeNAPI = PlatformAddressNAPI | DynamicValue;
1636
1645
  export declare const enum PlatformVersionNAPI {
1637
1646
  PLATFORM_V1 = 1,
1638
1647
  PLATFORM_V2 = 2,
@@ -1679,6 +1688,7 @@ export declare const enum TokenEmergencyActionNAPI {
1679
1688
  Pause = 0,
1680
1689
  Resume = 1
1681
1690
  }
1691
+ export declare function verifyAddressInfo(proof: Uint8Array, jsPlatformAddress: PlatformAddressLikeNAPI, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedAddressInfoNAPI;
1682
1692
  export declare function verifyContractProof(proof: Uint8Array, contractKnownKeepsHistory: boolean | undefined | null, isProofSubset: boolean, inMultipleContractProofForm: boolean, jsContractId: IdentifierLikeNAPI, jsPlatformVersion: DynamicValue): VerifiedContractNAPI;
1683
1693
  export declare function verifyDocumentsProof(proof: Uint8Array, contract: DataContractNAPI, documentTypeName: string, jsWhereClauses: DynamicValue, jsOrderBy: Array<Array<string>>, limit: number | undefined | null, jsStartAt: IdentifierLikeNAPI | undefined | null, startAtIncluded: boolean, blockTimeMs: BigIntString | undefined | null, jsPlatformVersion: DynamicValue): VerifiedDocumentsNAPI;
1684
1694
  export declare function verifyEpochsInfoProof(proof: Uint8Array, currentEpoch: number, startEpoch: number | undefined | null, count: number, ascending: boolean, jsPlatformVersion: DynamicValue): VerifiedEpochsInfoNAPI;
@@ -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;
@@ -1,3 +1,3 @@
1
1
  /* eslint-disable */
2
2
  import { requireNodeAddon } from 'react-native-node-api';
3
- 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 } = requireNodeAddon('./pshenmic-dpp--pshenmic_dpp');
3
+ 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 } = requireNodeAddon('./pshenmic-dpp--pshenmic_dpp');