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

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 (34) hide show
  1. package/dist/binaries/bindingsTypes.d.ts +140 -2
  2. package/dist/binaries/bindingsTypes.js +11 -0
  3. package/dist/binaries/native/aarch64-apple-darwin/pshenmic_dpp.node +0 -0
  4. package/dist/binaries/native/aarch64-pc-windows-msvc/pshenmic_dpp.node +0 -0
  5. package/dist/binaries/native/aarch64-unknown-linux-gnu/pshenmic_dpp.node +0 -0
  6. package/dist/binaries/native/aarch64-unknown-linux-musl/pshenmic_dpp.node +0 -0
  7. package/dist/binaries/native/x86_64-apple-darwin/pshenmic_dpp.node +0 -0
  8. package/dist/binaries/native/x86_64-pc-windows-msvc/pshenmic_dpp.node +0 -0
  9. package/dist/binaries/native/x86_64-unknown-linux-gnu/pshenmic_dpp.node +0 -0
  10. package/dist/binaries/native/x86_64-unknown-linux-musl/pshenmic_dpp.node +0 -0
  11. package/dist/binaries/pshenmic_dpp.android.node/arm64-v8a/libpshenmic_dpp.so +0 -0
  12. package/dist/binaries/pshenmic_dpp.apple.node/ios-arm64-simulator/libpshenmic_dpp.framework/libpshenmic_dpp +0 -0
  13. package/dist/binaries/pshenmic_dpp.d.ts +4 -0
  14. package/dist/binaries/pshenmic_dpp.js +1 -1
  15. package/dist/binaries/wasm/wasmBytes.cjs +1 -1
  16. package/dist/binaries/wasm.d.ts +4 -0
  17. package/dist/binaries/wasm.js +1 -1
  18. package/dist/src/dpp/dpp.d.ts +3 -0
  19. package/dist/src/dpp/dpp.js +3 -0
  20. package/dist/src/dpp/enums.d.ts +1 -1
  21. package/dist/src/dpp/enums.js +1 -1
  22. package/dist/src/dpp/structs/Orchard/FullViewingKey.d.ts +27 -0
  23. package/dist/src/dpp/structs/Orchard/FullViewingKey.js +45 -0
  24. package/dist/src/dpp/structs/Orchard/IncomingViewingKey.d.ts +29 -0
  25. package/dist/src/dpp/structs/Orchard/IncomingViewingKey.js +44 -0
  26. package/dist/src/dpp/structs/Orchard/OrchardAddress.d.ts +14 -2
  27. package/dist/src/dpp/structs/Orchard/OrchardAddress.js +16 -2
  28. package/dist/src/dpp/structs/Orchard/ShieldedBuilder.d.ts +17 -0
  29. package/dist/src/dpp/structs/Orchard/ShieldedBuilder.js +18 -0
  30. package/dist/src/dpp/structs/Orchard/ShieldedOutput.d.ts +23 -0
  31. package/dist/src/dpp/structs/Orchard/ShieldedOutput.js +41 -0
  32. package/dist/src/dpp/types.d.ts +2 -1
  33. package/package.json +1 -1
  34. package/tests/unit/Shielded.spec.ts +176 -0
@@ -75,6 +75,7 @@ export const DynamicValue: any;
75
75
  export const EpochBasedDistributionNAPI: any;
76
76
  export const ExtendedEpochInfoNAPI: any;
77
77
  export const FinalizedEpochInfoNAPI: any;
78
+ export const FullViewingKeyNAPI: any;
78
79
  export const GroupNAPI: any;
79
80
  export const GroupStateTransitionInfoNAPI: any;
80
81
  export const GroveAncestorNAPI: any;
@@ -98,6 +99,7 @@ export const IdentityTokenInfoNAPI: any;
98
99
  export const IdentityTopUpFromAddressesTransitionNAPI: any;
99
100
  export const IdentityTopUpTransitionNAPI: any;
100
101
  export const IdentityUpdateTransitionNAPI: any;
102
+ export const IncomingViewingKeyNAPI: any;
101
103
  export const InputAddressNAPI: any;
102
104
  export const InstantAssetLockProofNAPI: any;
103
105
  export const InstantLockNAPI: any;
@@ -123,6 +125,7 @@ export const SerializedActionNAPI: any;
123
125
  export const SharedEncryptedNoteNAPI: any;
124
126
  export const ShieldedBuilderNAPI: any;
125
127
  export const ShieldedMemoNAPI: any;
128
+ export const ShieldedOutputNAPI: any;
126
129
  export const ShieldedTransferTransitionNAPI: any;
127
130
  export const ShieldedWithdrawalResultNAPI: any;
128
131
  export const ShieldedWithdrawalTransitionNAPI: any;
@@ -221,6 +224,7 @@ export const NetworkNAPI: any;
221
224
  export const PlatformVersionNAPI: any;
222
225
  export const PoolingNAPI: any;
223
226
  export const PurposeNAPI: any;
227
+ export const ScopeNAPI: any;
224
228
  export const SecurityLevelNAPI: any;
225
229
  export const TokenDistributionTypeNAPI: any;
226
230
  export const TokenEmergencyActionNAPI: any;
@@ -1,2 +1,2 @@
1
1
  import * as protocol from "./wasmCreation.cjs";
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;
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, FullViewingKeyNAPI, GroupNAPI, GroupStateTransitionInfoNAPI, GroveAncestorNAPI, GroveElementEntryNAPI, GroveElementNAPI, GroveLeafInfoNAPI, IdentifierNAPI, IdentityCreateFromAddressesTransitionNAPI, IdentityCreateFromShieldedPoolResultNAPI, IdentityCreateFromShieldedPoolTransitionNAPI, IdentityCreateTransitionNAPI, IdentityCreditTransferNAPI, IdentityCreditTransferToAddressesTransitionNAPI, IdentityCreditWithdrawalTransitionNAPI, IdentityNAPI, IdentityPublicKeyInCreationNAPI, IdentityPublicKeyNAPI, IdentityTokenBalanceNAPI, IdentityTokenBalanceOptionalNAPI, IdentityTokenInfoNAPI, IdentityTopUpFromAddressesTransitionNAPI, IdentityTopUpTransitionNAPI, IdentityUpdateTransitionNAPI, IncomingViewingKeyNAPI, 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, ShieldedOutputNAPI, 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, ScopeNAPI, SecurityLevelNAPI, TokenDistributionTypeNAPI, TokenEmergencyActionNAPI, VoteStateResultTypeNAPI } = protocol.default;
@@ -129,10 +129,13 @@ export { verifyShieldedPoolStateProof } from './verify/Shielded/verifyShieldedPo
129
129
  export { verifyShieldedNotesCountProof } from './verify/Shielded/verifyShieldedNotesCountProof.js';
130
130
  export { verifyShieldedNullifiersProof } from './verify/Shielded/verifyShieldedNullifiersProof.js';
131
131
  export { OrchardAddressWASM, orchardOvkFromSeed } from './structs/Orchard/OrchardAddress.js';
132
+ export { FullViewingKeyWASM } from './structs/Orchard/FullViewingKey.js';
133
+ export { IncomingViewingKeyWASM } from './structs/Orchard/IncomingViewingKey.js';
132
134
  export { ShieldedMemoWASM } from './structs/Orchard/ShieldedMemo.js';
133
135
  export { NoteWASM } from './structs/Orchard/Note.js';
134
136
  export { MerklePathWASM } from './structs/Orchard/MerklePath.js';
135
137
  export { SpendableNoteWASM } from './structs/Orchard/SpendableNote.js';
138
+ export { ShieldedOutputWASM } from './structs/Orchard/ShieldedOutput.js';
136
139
  export { CommitmentTreeWASM } from './structs/Orchard/CommitmentTree.js';
137
140
  export { OrchardProverWASM } from './structs/Orchard/OrchardProver.js';
138
141
  export { ShieldedWithdrawalResultWASM } from './structs/Orchard/ShieldedWithdrawalResult.js';
@@ -129,10 +129,13 @@ export { verifyShieldedPoolStateProof } from './verify/Shielded/verifyShieldedPo
129
129
  export { verifyShieldedNotesCountProof } from './verify/Shielded/verifyShieldedNotesCountProof.js';
130
130
  export { verifyShieldedNullifiersProof } from './verify/Shielded/verifyShieldedNullifiersProof.js';
131
131
  export { OrchardAddressWASM, orchardOvkFromSeed } from './structs/Orchard/OrchardAddress.js';
132
+ export { FullViewingKeyWASM } from './structs/Orchard/FullViewingKey.js';
133
+ export { IncomingViewingKeyWASM } from './structs/Orchard/IncomingViewingKey.js';
132
134
  export { ShieldedMemoWASM } from './structs/Orchard/ShieldedMemo.js';
133
135
  export { NoteWASM } from './structs/Orchard/Note.js';
134
136
  export { MerklePathWASM } from './structs/Orchard/MerklePath.js';
135
137
  export { SpendableNoteWASM } from './structs/Orchard/SpendableNote.js';
138
+ export { ShieldedOutputWASM } from './structs/Orchard/ShieldedOutput.js';
136
139
  export { CommitmentTreeWASM } from './structs/Orchard/CommitmentTree.js';
137
140
  export { OrchardProverWASM } from './structs/Orchard/OrchardProver.js';
138
141
  export { ShieldedWithdrawalResultWASM } from './structs/Orchard/ShieldedWithdrawalResult.js';
@@ -1 +1 @@
1
- export { KeyTypeNAPI as KeyType, NetworkNAPI as NetworkWASM, PlatformVersionNAPI as PlatformVersionWASM, PurposeNAPI as Purpose, SecurityLevelNAPI as SecurityLevel, ActionGoalNAPI as ActionGoal, TokenDistributionTypeNAPI as TokenDistributionType, TokenEmergencyActionNAPI as TokenEmergencyActionWASM, AssetLockProofTypeNAPI as AssetLockProofType, PoolingNAPI as PoolingWASM, GasFeesPaidByNAPI as GasFeesPaidByWASM, VoteStateResultTypeNAPI as VoteStateResultType } from '../../binaries/bindingsTypes.js';
1
+ export { KeyTypeNAPI as KeyType, NetworkNAPI as NetworkWASM, PlatformVersionNAPI as PlatformVersionWASM, PurposeNAPI as Purpose, SecurityLevelNAPI as SecurityLevel, ActionGoalNAPI as ActionGoal, TokenDistributionTypeNAPI as TokenDistributionType, TokenEmergencyActionNAPI as TokenEmergencyActionWASM, AssetLockProofTypeNAPI as AssetLockProofType, PoolingNAPI as PoolingWASM, GasFeesPaidByNAPI as GasFeesPaidByWASM, VoteStateResultTypeNAPI as VoteStateResultType, ScopeNAPI as ScopeWASM } from '../../binaries/bindingsTypes.js';
@@ -1 +1 @@
1
- export { KeyTypeNAPI as KeyType, NetworkNAPI as NetworkWASM, PlatformVersionNAPI as PlatformVersionWASM, PurposeNAPI as Purpose, SecurityLevelNAPI as SecurityLevel, ActionGoalNAPI as ActionGoal, TokenDistributionTypeNAPI as TokenDistributionType, TokenEmergencyActionNAPI as TokenEmergencyActionWASM, AssetLockProofTypeNAPI as AssetLockProofType, PoolingNAPI as PoolingWASM, GasFeesPaidByNAPI as GasFeesPaidByWASM, VoteStateResultTypeNAPI as VoteStateResultType } from '../../binaries/bindingsTypes.js';
1
+ export { KeyTypeNAPI as KeyType, NetworkNAPI as NetworkWASM, PlatformVersionNAPI as PlatformVersionWASM, PurposeNAPI as Purpose, SecurityLevelNAPI as SecurityLevel, ActionGoalNAPI as ActionGoal, TokenDistributionTypeNAPI as TokenDistributionType, TokenEmergencyActionNAPI as TokenEmergencyActionWASM, AssetLockProofTypeNAPI as AssetLockProofType, PoolingNAPI as PoolingWASM, GasFeesPaidByNAPI as GasFeesPaidByWASM, VoteStateResultTypeNAPI as VoteStateResultType, ScopeNAPI as ScopeWASM } from '../../binaries/bindingsTypes.js';
@@ -0,0 +1,27 @@
1
+ import type { FullViewingKeyNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { ScopeLike } from '../../types.js';
3
+ import { IncomingViewingKeyWASM } from './IncomingViewingKey.js';
4
+ import { OrchardAddressWASM } from './OrchardAddress.js';
5
+ /**
6
+ * An Orchard full viewing key: it detects both incoming and outgoing notes and
7
+ * computes their nullifiers (so it sees the full balance), but cannot spend.
8
+ */
9
+ export declare class FullViewingKeyWASM {
10
+ /** @private **/
11
+ _rawFullViewingKey: FullViewingKeyNAPI;
12
+ /** The 96-byte raw encoding of this key (ak || nk || rivk). */
13
+ bytes(): Uint8Array;
14
+ /** Derives the incoming viewing key for the given scope (default External). */
15
+ toIvk(scope?: ScopeLike): IncomingViewingKeyWASM;
16
+ /** Derives the 32-byte outgoing viewing key for the given scope (default External). */
17
+ toOvk(scope?: ScopeLike): Uint8Array;
18
+ /** The payment address at `diversifierIndex` (default 0) for `scope` (default External). */
19
+ address(diversifierIndex?: number, scope?: ScopeLike): OrchardAddressWASM;
20
+ /** The scope `address` was derived under, or null if it does not belong to this key. */
21
+ scopeForAddress(address: OrchardAddressWASM): string | null;
22
+ /** Derives the full viewing key from a BIP-39 seed via ZIP-32 (m/32'/coinType'/account'). */
23
+ static fromSeed(seed: Uint8Array, coinType: number, account: number): FullViewingKeyWASM;
24
+ /** Parses a full viewing key from its 96-byte raw encoding. */
25
+ static fromBytes(bytes: Uint8Array): FullViewingKeyWASM;
26
+ static createFromRawInstance(rawInstance: FullViewingKeyNAPI): FullViewingKeyWASM;
27
+ }
@@ -0,0 +1,45 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { valueToDynamicValue } from '../../utils.js';
3
+ import { IncomingViewingKeyWASM } from './IncomingViewingKey.js';
4
+ import { OrchardAddressWASM } from './OrchardAddress.js';
5
+ /**
6
+ * An Orchard full viewing key: it detects both incoming and outgoing notes and
7
+ * computes their nullifiers (so it sees the full balance), but cannot spend.
8
+ */
9
+ export class FullViewingKeyWASM {
10
+ /** @private **/
11
+ _rawFullViewingKey;
12
+ /** The 96-byte raw encoding of this key (ak || nk || rivk). */
13
+ bytes() {
14
+ return this._rawFullViewingKey.bytes();
15
+ }
16
+ /** Derives the incoming viewing key for the given scope (default External). */
17
+ toIvk(scope) {
18
+ return IncomingViewingKeyWASM.createFromRawInstance(this._rawFullViewingKey.toIvk(scope == null ? undefined : valueToDynamicValue(scope)));
19
+ }
20
+ /** Derives the 32-byte outgoing viewing key for the given scope (default External). */
21
+ toOvk(scope) {
22
+ return this._rawFullViewingKey.toOvk(scope == null ? undefined : valueToDynamicValue(scope));
23
+ }
24
+ /** The payment address at `diversifierIndex` (default 0) for `scope` (default External). */
25
+ address(diversifierIndex, scope) {
26
+ return OrchardAddressWASM.createFromRawInstance(this._rawFullViewingKey.address(diversifierIndex, scope == null ? undefined : valueToDynamicValue(scope)));
27
+ }
28
+ /** The scope `address` was derived under, or null if it does not belong to this key. */
29
+ scopeForAddress(address) {
30
+ return this._rawFullViewingKey.scopeForAddress(address._rawOrchardAddress);
31
+ }
32
+ /** Derives the full viewing key from a BIP-39 seed via ZIP-32 (m/32'/coinType'/account'). */
33
+ static fromSeed(seed, coinType, account) {
34
+ return FullViewingKeyWASM.createFromRawInstance(dppProvider.dpp.FullViewingKeyNAPI.fromSeed(seed, coinType, account));
35
+ }
36
+ /** Parses a full viewing key from its 96-byte raw encoding. */
37
+ static fromBytes(bytes) {
38
+ return FullViewingKeyWASM.createFromRawInstance(dppProvider.dpp.FullViewingKeyNAPI.fromBytes(bytes));
39
+ }
40
+ static createFromRawInstance(rawInstance) {
41
+ const instance = Object.create(FullViewingKeyWASM.prototype);
42
+ instance._rawFullViewingKey = rawInstance;
43
+ return instance;
44
+ }
45
+ }
@@ -0,0 +1,29 @@
1
+ import type { IncomingViewingKeyNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { ScopeLike } from '../../types.js';
3
+ import { FullViewingKeyWASM } from './FullViewingKey.js';
4
+ import { OrchardAddressWASM } from './OrchardAddress.js';
5
+ /**
6
+ * An Orchard incoming viewing key: it detects and decrypts notes sent to you,
7
+ * but cannot see outgoing notes, tell when a note is spent, or spend it — safe
8
+ * to hand to a watch-only service.
9
+ */
10
+ export declare class IncomingViewingKeyWASM {
11
+ /** @private **/
12
+ _rawIncomingViewingKey: IncomingViewingKeyNAPI;
13
+ /** The 64-byte raw encoding of this key (dk || ivk). */
14
+ bytes(): Uint8Array;
15
+ /** The payment address at `diversifierIndex` (default 0); scope is fixed by the key. */
16
+ address(diversifierIndex?: number): OrchardAddressWASM;
17
+ /** The diversifier index `address` was derived at, or null if it is not from this key. */
18
+ diversifierIndex(address: OrchardAddressWASM): number | null;
19
+ /**
20
+ * Derives the incoming viewing key from a BIP-39 seed via ZIP-32
21
+ * (m/32'/coinType'/account') for the given scope (default External).
22
+ */
23
+ static fromSeed(seed: Uint8Array, coinType: number, account: number, scope?: ScopeLike): IncomingViewingKeyWASM;
24
+ /** Derives the incoming viewing key from a full viewing key (default External scope). */
25
+ static fromFullViewingKey(fullViewingKey: FullViewingKeyWASM, scope?: ScopeLike): IncomingViewingKeyWASM;
26
+ /** Parses an incoming viewing key from its 64-byte raw encoding. */
27
+ static fromBytes(bytes: Uint8Array): IncomingViewingKeyWASM;
28
+ static createFromRawInstance(rawInstance: IncomingViewingKeyNAPI): IncomingViewingKeyWASM;
29
+ }
@@ -0,0 +1,44 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { valueToDynamicValue } from '../../utils.js';
3
+ import { OrchardAddressWASM } from './OrchardAddress.js';
4
+ /**
5
+ * An Orchard incoming viewing key: it detects and decrypts notes sent to you,
6
+ * but cannot see outgoing notes, tell when a note is spent, or spend it — safe
7
+ * to hand to a watch-only service.
8
+ */
9
+ export class IncomingViewingKeyWASM {
10
+ /** @private **/
11
+ _rawIncomingViewingKey;
12
+ /** The 64-byte raw encoding of this key (dk || ivk). */
13
+ bytes() {
14
+ return this._rawIncomingViewingKey.bytes();
15
+ }
16
+ /** The payment address at `diversifierIndex` (default 0); scope is fixed by the key. */
17
+ address(diversifierIndex) {
18
+ return OrchardAddressWASM.createFromRawInstance(this._rawIncomingViewingKey.address(diversifierIndex));
19
+ }
20
+ /** The diversifier index `address` was derived at, or null if it is not from this key. */
21
+ diversifierIndex(address) {
22
+ return this._rawIncomingViewingKey.diversifierIndex(address._rawOrchardAddress);
23
+ }
24
+ /**
25
+ * Derives the incoming viewing key from a BIP-39 seed via ZIP-32
26
+ * (m/32'/coinType'/account') for the given scope (default External).
27
+ */
28
+ static fromSeed(seed, coinType, account, scope) {
29
+ return IncomingViewingKeyWASM.createFromRawInstance(dppProvider.dpp.IncomingViewingKeyNAPI.fromSeed(seed, coinType, account, scope == null ? undefined : valueToDynamicValue(scope)));
30
+ }
31
+ /** Derives the incoming viewing key from a full viewing key (default External scope). */
32
+ static fromFullViewingKey(fullViewingKey, scope) {
33
+ return IncomingViewingKeyWASM.createFromRawInstance(dppProvider.dpp.IncomingViewingKeyNAPI.fromFullViewingKey(fullViewingKey._rawFullViewingKey, scope == null ? undefined : valueToDynamicValue(scope)));
34
+ }
35
+ /** Parses an incoming viewing key from its 64-byte raw encoding. */
36
+ static fromBytes(bytes) {
37
+ return IncomingViewingKeyWASM.createFromRawInstance(dppProvider.dpp.IncomingViewingKeyNAPI.fromBytes(bytes));
38
+ }
39
+ static createFromRawInstance(rawInstance) {
40
+ const instance = Object.create(IncomingViewingKeyWASM.prototype);
41
+ instance._rawIncomingViewingKey = rawInstance;
42
+ return instance;
43
+ }
44
+ }
@@ -1,5 +1,7 @@
1
1
  import type { OrchardAddressNAPI } from '../../../../binaries/bindingsTypes.js';
2
- import { NetworkLike } from '../../types.js';
2
+ import { NetworkLike, ScopeLike } from '../../types.js';
3
+ import { FullViewingKeyWASM } from './FullViewingKey.js';
4
+ import { IncomingViewingKeyWASM } from './IncomingViewingKey.js';
3
5
  export declare class OrchardAddressWASM {
4
6
  /** @private **/
5
7
  _rawOrchardAddress: OrchardAddressNAPI;
@@ -8,7 +10,17 @@ export declare class OrchardAddressWASM {
8
10
  static fromBech32m(bech32m: string): OrchardAddressWASM;
9
11
  static fromBytes(bytes: Uint8Array): OrchardAddressWASM;
10
12
  /** Derives the address from a BIP-39 seed via ZIP-32 (m/32'/coinType'/account'). */
11
- static fromSeed(seed: Uint8Array, coinType: number, account: number, diversifierIndex?: number): OrchardAddressWASM;
13
+ static fromSeed(seed: Uint8Array, coinType: number, account: number, diversifierIndex?: number, scope?: ScopeLike): OrchardAddressWASM;
14
+ /**
15
+ * Derives the address at `diversifierIndex` (default 0) from a full viewing
16
+ * key, for `scope` (default External).
17
+ */
18
+ static fromFullViewingKey(fullViewingKey: FullViewingKeyWASM, diversifierIndex?: number, scope?: ScopeLike): OrchardAddressWASM;
19
+ /**
20
+ * Derives the address at `diversifierIndex` (default 0) from an incoming
21
+ * viewing key. The scope is fixed by the key itself.
22
+ */
23
+ static fromIncomingViewingKey(incomingViewingKey: IncomingViewingKeyWASM, diversifierIndex?: number): OrchardAddressWASM;
12
24
  static createFromRawInstance(rawInstance: OrchardAddressNAPI): OrchardAddressWASM;
13
25
  }
14
26
  /** Derives the sender's Orchard outgoing viewing key (32 bytes) from a BIP-39 seed. */
@@ -16,8 +16,22 @@ export class OrchardAddressWASM {
16
16
  return OrchardAddressWASM.createFromRawInstance(dppProvider.dpp.OrchardAddressNAPI.fromBytes(bytes));
17
17
  }
18
18
  /** Derives the address from a BIP-39 seed via ZIP-32 (m/32'/coinType'/account'). */
19
- static fromSeed(seed, coinType, account, diversifierIndex) {
20
- return OrchardAddressWASM.createFromRawInstance(dppProvider.dpp.OrchardAddressNAPI.fromSeed(seed, coinType, account, diversifierIndex));
19
+ static fromSeed(seed, coinType, account, diversifierIndex, scope) {
20
+ return OrchardAddressWASM.createFromRawInstance(dppProvider.dpp.OrchardAddressNAPI.fromSeed(seed, coinType, account, diversifierIndex, scope == null ? undefined : valueToDynamicValue(scope)));
21
+ }
22
+ /**
23
+ * Derives the address at `diversifierIndex` (default 0) from a full viewing
24
+ * key, for `scope` (default External).
25
+ */
26
+ static fromFullViewingKey(fullViewingKey, diversifierIndex, scope) {
27
+ return OrchardAddressWASM.createFromRawInstance(dppProvider.dpp.OrchardAddressNAPI.fromFullViewingKey(fullViewingKey._rawFullViewingKey, diversifierIndex, scope == null ? undefined : valueToDynamicValue(scope)));
28
+ }
29
+ /**
30
+ * Derives the address at `diversifierIndex` (default 0) from an incoming
31
+ * viewing key. The scope is fixed by the key itself.
32
+ */
33
+ static fromIncomingViewingKey(incomingViewingKey, diversifierIndex) {
34
+ return OrchardAddressWASM.createFromRawInstance(dppProvider.dpp.OrchardAddressNAPI.fromIncomingViewingKey(incomingViewingKey._rawIncomingViewingKey, diversifierIndex));
21
35
  }
22
36
  static createFromRawInstance(rawInstance) {
23
37
  const instance = Object.create(OrchardAddressWASM.prototype);
@@ -4,6 +4,7 @@ import { OrchardAddressWASM } from './OrchardAddress.js';
4
4
  import { ShieldedMemoWASM } from './ShieldedMemo.js';
5
5
  import { SpendableNoteWASM } from './SpendableNote.js';
6
6
  import { ShieldedWithdrawalResultWASM } from './ShieldedWithdrawalResult.js';
7
+ import { ShieldedOutputWASM } from './ShieldedOutput.js';
7
8
  import { AssetLockProofWASM } from '../AssetLockProof/AssetLockProof.js';
8
9
  import { PrivateKeyWASM } from '../PrivateKey.js';
9
10
  import { CoreScriptWASM } from '../CoreScript.js';
@@ -42,6 +43,22 @@ export declare class ShieldedBuilderWASM {
42
43
  unshield(spends: SpendableNoteWASM[], outputAddress: PlatformAddressLike, unshieldAmount: bigint, changeAddress: OrchardAddressWASM, seed: Uint8Array, coinType: number, account: number, anchor: Uint8Array, memo: ShieldedMemoWASM, platformVersion?: PlatformVersionNAPI): Promise<ShieldedWithdrawalResultWASM>;
43
44
  /** Pool -> pool (spend). */
44
45
  shieldedTransfer(spends: SpendableNoteWASM[], recipient: OrchardAddressWASM, transferAmount: bigint, changeAddress: OrchardAddressWASM, seed: Uint8Array, coinType: number, account: number, anchor: Uint8Array, memo: ShieldedMemoWASM, platformVersion?: PlatformVersionNAPI): Promise<ShieldedWithdrawalResultWASM>;
46
+ /**
47
+ * Pool -> pool, paying several Orchard addresses in one proof.
48
+ *
49
+ * The spend side matches `shieldedTransfer` — every note must belong to the
50
+ * `seed`/`coinType`/`account` this call derives its spend authority from, and
51
+ * all must be witnessed against the same `anchor`. The output side is a list,
52
+ * each entry carrying its own amount and memo, and the leftover always goes
53
+ * to `changeAddress` (a zero-value change note is still written, which keeps
54
+ * the fee predictable before the change amount is known).
55
+ *
56
+ * Consensus prices the fee off the bundle's action count, which Orchard sets
57
+ * to `max(spends, outputs + 1, 2)` and caps at 16 — so a fan-out of 15
58
+ * recipients is the ceiling, and each extra action adds proving time. Passing
59
+ * more throws before proving rather than after.
60
+ */
61
+ shieldedTransferMulti(spends: SpendableNoteWASM[], outputs: ShieldedOutputWASM[], changeAddress: OrchardAddressWASM, seed: Uint8Array, coinType: number, account: number, anchor: Uint8Array, platformVersion?: PlatformVersionNAPI): Promise<ShieldedWithdrawalResultWASM>;
45
62
  /** Pool -> new identity (spend). One private key per public key, same order. */
46
63
  identityCreateFromShieldedPool(publicKeys: IdentityPublicKeyInCreationWASM[], privateKeys: PrivateKeyWASM[], denomination: bigint, sendToAddressOnCreationFailure: PlatformAddressLike, spends: SpendableNoteWASM[], changeAddress: OrchardAddressWASM, seed: Uint8Array, coinType: number, account: number, anchor: Uint8Array, memo: ShieldedMemoWASM, platformVersion?: PlatformVersionNAPI): Promise<IdentityCreateFromShieldedPoolResultWASM>;
47
64
  }
@@ -54,6 +54,24 @@ export class ShieldedBuilderWASM {
54
54
  async shieldedTransfer(spends, recipient, transferAmount, changeAddress, seed, coinType, account, anchor, memo, platformVersion) {
55
55
  return ShieldedWithdrawalResultWASM.createFromRawInstance(await this._rawShieldedBuilder.shieldedTransfer(spends.map(s => s._rawSpendableNote), recipient._rawOrchardAddress, transferAmount.toString(), changeAddress._rawOrchardAddress, seed, coinType, account, anchor, memo._rawShieldedMemo, platformVersion));
56
56
  }
57
+ /**
58
+ * Pool -> pool, paying several Orchard addresses in one proof.
59
+ *
60
+ * The spend side matches `shieldedTransfer` — every note must belong to the
61
+ * `seed`/`coinType`/`account` this call derives its spend authority from, and
62
+ * all must be witnessed against the same `anchor`. The output side is a list,
63
+ * each entry carrying its own amount and memo, and the leftover always goes
64
+ * to `changeAddress` (a zero-value change note is still written, which keeps
65
+ * the fee predictable before the change amount is known).
66
+ *
67
+ * Consensus prices the fee off the bundle's action count, which Orchard sets
68
+ * to `max(spends, outputs + 1, 2)` and caps at 16 — so a fan-out of 15
69
+ * recipients is the ceiling, and each extra action adds proving time. Passing
70
+ * more throws before proving rather than after.
71
+ */
72
+ async shieldedTransferMulti(spends, outputs, changeAddress, seed, coinType, account, anchor, platformVersion) {
73
+ return ShieldedWithdrawalResultWASM.createFromRawInstance(await this._rawShieldedBuilder.shieldedTransferMulti(spends.map(s => s._rawSpendableNote), outputs.map(o => o._rawShieldedOutput), changeAddress._rawOrchardAddress, seed, coinType, account, anchor, platformVersion));
74
+ }
57
75
  /** Pool -> new identity (spend). One private key per public key, same order. */
58
76
  async identityCreateFromShieldedPool(publicKeys, privateKeys, denomination, sendToAddressOnCreationFailure, spends, changeAddress, seed, coinType, account, anchor, memo, platformVersion) {
59
77
  return IdentityCreateFromShieldedPoolResultWASM.createFromRawInstance(await this._rawShieldedBuilder.identityCreateFromShieldedPool(publicKeys.map(k => k._rawKeyInCreation), privateKeys.map(k => k._rawPrivateKey), denomination.toString(), preparePlatformAddressValue(sendToAddressOnCreationFailure), spends.map(s => s._rawSpendableNote), changeAddress._rawOrchardAddress, seed, coinType, account, anchor, memo._rawShieldedMemo, platformVersion));
@@ -0,0 +1,23 @@
1
+ import type { ShieldedOutputNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { OrchardAddressWASM } from './OrchardAddress.js';
3
+ import { ShieldedMemoWASM } from './ShieldedMemo.js';
4
+ /**
5
+ * One output of a multi-output shielded transfer (`shieldedTransferMulti`):
6
+ * who receives the note, how much, and the memo carried inside it.
7
+ *
8
+ * Each output holds its own memo — the single-recipient builders share one memo
9
+ * across the bundle, which has nothing sensible to say when there are several
10
+ * unrelated recipients.
11
+ */
12
+ export declare class ShieldedOutputWASM {
13
+ /** @private **/
14
+ _rawShieldedOutput: ShieldedOutputNAPI;
15
+ constructor(address: OrchardAddressWASM, amount: bigint, memo: ShieldedMemoWASM);
16
+ get address(): OrchardAddressWASM;
17
+ set address(value: OrchardAddressWASM);
18
+ get amount(): bigint;
19
+ set amount(value: bigint);
20
+ get memo(): ShieldedMemoWASM;
21
+ set memo(value: ShieldedMemoWASM);
22
+ static createFromRawInstance(rawInstance: ShieldedOutputNAPI): ShieldedOutputWASM;
23
+ }
@@ -0,0 +1,41 @@
1
+ import { dppProvider } from '../../provider.js';
2
+ import { OrchardAddressWASM } from './OrchardAddress.js';
3
+ import { ShieldedMemoWASM } from './ShieldedMemo.js';
4
+ /**
5
+ * One output of a multi-output shielded transfer (`shieldedTransferMulti`):
6
+ * who receives the note, how much, and the memo carried inside it.
7
+ *
8
+ * Each output holds its own memo — the single-recipient builders share one memo
9
+ * across the bundle, which has nothing sensible to say when there are several
10
+ * unrelated recipients.
11
+ */
12
+ export class ShieldedOutputWASM {
13
+ /** @private **/
14
+ _rawShieldedOutput;
15
+ constructor(address, amount, memo) {
16
+ this._rawShieldedOutput = new dppProvider.dpp.ShieldedOutputNAPI(address._rawOrchardAddress, amount.toString(), memo._rawShieldedMemo);
17
+ }
18
+ get address() {
19
+ return OrchardAddressWASM.createFromRawInstance(this._rawShieldedOutput.address);
20
+ }
21
+ set address(value) {
22
+ this._rawShieldedOutput.address = value._rawOrchardAddress;
23
+ }
24
+ get amount() {
25
+ return BigInt(this._rawShieldedOutput.amount);
26
+ }
27
+ set amount(value) {
28
+ this._rawShieldedOutput.amount = value.toString();
29
+ }
30
+ get memo() {
31
+ return ShieldedMemoWASM.createFromRawInstance(this._rawShieldedOutput.memo);
32
+ }
33
+ set memo(value) {
34
+ this._rawShieldedOutput.memo = value._rawShieldedMemo;
35
+ }
36
+ static createFromRawInstance(rawInstance) {
37
+ const instance = Object.create(ShieldedOutputWASM.prototype);
38
+ instance._rawShieldedOutput = rawInstance;
39
+ return instance;
40
+ }
41
+ }
@@ -1,5 +1,5 @@
1
1
  import type * as protocol from '../../binaries/bindingsTypes.js';
2
- import { ActionGoal, AssetLockProofType, GasFeesPaidByWASM, KeyType, NetworkWASM, PlatformVersionWASM, PoolingWASM, Purpose, SecurityLevel, TokenDistributionType, TokenEmergencyActionWASM, VoteStateResultType } from './enums.js';
2
+ import { ActionGoal, AssetLockProofType, GasFeesPaidByWASM, KeyType, NetworkWASM, PlatformVersionWASM, PoolingWASM, Purpose, ScopeWASM, SecurityLevel, TokenDistributionType, TokenEmergencyActionWASM, VoteStateResultType } from './enums.js';
3
3
  import { IdentifierWASM } from './structs/Identifier.js';
4
4
  import { languageCodes } from './constants.js';
5
5
  import { DistributionFunctionWASM } from './structs/TokenConfiguration/DistributionFunction.js';
@@ -44,6 +44,7 @@ export type TokenEmergencyActionLike = TokenEmergencyActionWASM | keyof typeof T
44
44
  export type AssetLockProofTypeLike = AssetLockProofType | keyof typeof AssetLockProofType | Lowercase<keyof typeof AssetLockProofType>;
45
45
  export type PoolingLike = PoolingWASM | keyof typeof PoolingWASM | Lowercase<keyof typeof PoolingWASM>;
46
46
  export type VoteStateResultTypeLike = VoteStateResultType | keyof typeof VoteStateResultType | Lowercase<keyof typeof VoteStateResultType>;
47
+ export type ScopeLike = ScopeWASM | keyof typeof ScopeWASM | Lowercase<keyof typeof ScopeWASM>;
47
48
  export type AddressWitnessP2PKH = protocol.AddressWitnessP2pkhNAPI;
48
49
  export type AddressWitnessP2SH = protocol.AddressWitnessP2shNAPI;
49
50
  export type TokenConfigurationLocalizationJson = protocol.TokenConfigurationLocalizationJsonNAPI;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pshenmic-dpp",
3
- "version": "2.0.0-dev.28",
3
+ "version": "2.0.0-dev.29",
4
4
  "main": "dist/src/wasm.js",
5
5
  "types": "dist/src/wasm.d.ts",
6
6
  "react-native": "./dist/src/react-native.js",