pshenmic-dpp 2.0.0-dev.27 → 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.
- package/dist/binaries/bindingsTypes.d.ts +369 -2
- package/dist/binaries/bindingsTypes.js +11 -0
- package/dist/binaries/native/aarch64-apple-darwin/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/aarch64-pc-windows-msvc/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/aarch64-unknown-linux-gnu/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/aarch64-unknown-linux-musl/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/x86_64-apple-darwin/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/x86_64-pc-windows-msvc/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/x86_64-unknown-linux-gnu/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/x86_64-unknown-linux-musl/pshenmic_dpp.node +0 -0
- package/dist/binaries/pshenmic_dpp.android.node/arm64-v8a/libpshenmic_dpp.so +0 -0
- package/dist/binaries/pshenmic_dpp.apple.node/ios-arm64-simulator/libpshenmic_dpp.framework/libpshenmic_dpp +0 -0
- package/dist/binaries/pshenmic_dpp.d.ts +21 -0
- package/dist/binaries/pshenmic_dpp.js +1 -1
- package/dist/binaries/wasm/wasmBytes.cjs +1 -1
- package/dist/binaries/wasm.d.ts +21 -0
- package/dist/binaries/wasm.js +1 -1
- package/dist/src/dpp/dpp.d.ts +7 -0
- package/dist/src/dpp/dpp.js +7 -0
- package/dist/src/dpp/enums.d.ts +1 -1
- package/dist/src/dpp/enums.js +1 -1
- package/dist/src/dpp/structs/Orchard/FullViewingKey.d.ts +27 -0
- package/dist/src/dpp/structs/Orchard/FullViewingKey.js +45 -0
- package/dist/src/dpp/structs/Orchard/IncomingViewingKey.d.ts +29 -0
- package/dist/src/dpp/structs/Orchard/IncomingViewingKey.js +44 -0
- package/dist/src/dpp/structs/Orchard/OrchardAddress.d.ts +14 -2
- package/dist/src/dpp/structs/Orchard/OrchardAddress.js +16 -2
- package/dist/src/dpp/structs/Orchard/ShieldedBuilder.d.ts +17 -0
- package/dist/src/dpp/structs/Orchard/ShieldedBuilder.js +18 -0
- package/dist/src/dpp/structs/Orchard/ShieldedOutput.d.ts +23 -0
- package/dist/src/dpp/structs/Orchard/ShieldedOutput.js +41 -0
- package/dist/src/dpp/types.d.ts +84 -1
- package/dist/src/dpp/verify/AddressFunds/utils.d.ts +5 -0
- package/dist/src/dpp/verify/AddressFunds/utils.js +28 -0
- package/dist/src/dpp/verify/AddressFunds/verifyAddressesBranchState.d.ts +12 -0
- package/dist/src/dpp/verify/AddressFunds/verifyAddressesBranchState.js +29 -0
- package/dist/src/dpp/verify/AddressFunds/verifyAddressesTrunkState.d.ts +9 -0
- package/dist/src/dpp/verify/AddressFunds/verifyAddressesTrunkState.js +30 -0
- package/dist/src/dpp/verify/AddressFunds/verifyRecentAddressBalanceChanges.d.ts +9 -0
- package/dist/src/dpp/verify/AddressFunds/verifyRecentAddressBalanceChanges.js +24 -0
- package/dist/src/dpp/verify/AddressFunds/verifyRecentCompactedAddressBalanceChanges.d.ts +10 -0
- package/dist/src/dpp/verify/AddressFunds/verifyRecentCompactedAddressBalanceChanges.js +30 -0
- package/package.json +1 -1
- package/tests/unit/Shielded.spec.ts +176 -0
package/dist/binaries/wasm.d.ts
CHANGED
|
@@ -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;
|
|
@@ -66,8 +75,13 @@ export const DynamicValue: any;
|
|
|
66
75
|
export const EpochBasedDistributionNAPI: any;
|
|
67
76
|
export const ExtendedEpochInfoNAPI: any;
|
|
68
77
|
export const FinalizedEpochInfoNAPI: any;
|
|
78
|
+
export const FullViewingKeyNAPI: any;
|
|
69
79
|
export const GroupNAPI: any;
|
|
70
80
|
export const GroupStateTransitionInfoNAPI: any;
|
|
81
|
+
export const GroveAncestorNAPI: any;
|
|
82
|
+
export const GroveElementEntryNAPI: any;
|
|
83
|
+
export const GroveElementNAPI: any;
|
|
84
|
+
export const GroveLeafInfoNAPI: any;
|
|
71
85
|
export const IdentifierNAPI: any;
|
|
72
86
|
export const IdentityCreateFromAddressesTransitionNAPI: any;
|
|
73
87
|
export const IdentityCreateFromShieldedPoolResultNAPI: any;
|
|
@@ -85,6 +99,7 @@ export const IdentityTokenInfoNAPI: any;
|
|
|
85
99
|
export const IdentityTopUpFromAddressesTransitionNAPI: any;
|
|
86
100
|
export const IdentityTopUpTransitionNAPI: any;
|
|
87
101
|
export const IdentityUpdateTransitionNAPI: any;
|
|
102
|
+
export const IncomingViewingKeyNAPI: any;
|
|
88
103
|
export const InputAddressNAPI: any;
|
|
89
104
|
export const InstantAssetLockProofNAPI: any;
|
|
90
105
|
export const InstantLockNAPI: any;
|
|
@@ -110,6 +125,7 @@ export const SerializedActionNAPI: any;
|
|
|
110
125
|
export const SharedEncryptedNoteNAPI: any;
|
|
111
126
|
export const ShieldedBuilderNAPI: any;
|
|
112
127
|
export const ShieldedMemoNAPI: any;
|
|
128
|
+
export const ShieldedOutputNAPI: any;
|
|
113
129
|
export const ShieldedTransferTransitionNAPI: any;
|
|
114
130
|
export const ShieldedWithdrawalResultNAPI: any;
|
|
115
131
|
export const ShieldedWithdrawalTransitionNAPI: any;
|
|
@@ -152,6 +168,8 @@ export const TransactionNAPI: any;
|
|
|
152
168
|
export const TxInNAPI: any;
|
|
153
169
|
export const TxOutNAPI: any;
|
|
154
170
|
export const UnshieldTransitionNAPI: any;
|
|
171
|
+
export const VerifiedAddressesBranchStateNAPI: any;
|
|
172
|
+
export const VerifiedAddressesTrunkStateNAPI: any;
|
|
155
173
|
export const VerifiedBalanceTransferNAPI: any;
|
|
156
174
|
export const VerifiedContractNAPI: any;
|
|
157
175
|
export const VerifiedDocumentNAPI: any;
|
|
@@ -171,6 +189,8 @@ export const VerifiedIdentityWithAddressInfosNAPI: any;
|
|
|
171
189
|
export const VerifiedMostRecentShieldedAnchorNAPI: any;
|
|
172
190
|
export const VerifiedPlatformAddressesInfosNAPI: any;
|
|
173
191
|
export const VerifiedPlatformAddressInfoNAPI: any;
|
|
192
|
+
export const VerifiedRecentAddressBalanceChangesNAPI: any;
|
|
193
|
+
export const VerifiedRecentCompactedAddressBalanceChangesNAPI: any;
|
|
174
194
|
export const VerifiedShieldedAnchorsNAPI: any;
|
|
175
195
|
export const VerifiedShieldedEncryptedNoteNAPI: any;
|
|
176
196
|
export const VerifiedShieldedEncryptedNotesNAPI: any;
|
|
@@ -204,6 +224,7 @@ export const NetworkNAPI: any;
|
|
|
204
224
|
export const PlatformVersionNAPI: any;
|
|
205
225
|
export const PoolingNAPI: any;
|
|
206
226
|
export const PurposeNAPI: any;
|
|
227
|
+
export const ScopeNAPI: any;
|
|
207
228
|
export const SecurityLevelNAPI: any;
|
|
208
229
|
export const TokenDistributionTypeNAPI: any;
|
|
209
230
|
export const TokenEmergencyActionNAPI: any;
|
package/dist/binaries/wasm.js
CHANGED
|
@@ -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, 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;
|
package/dist/src/dpp/dpp.d.ts
CHANGED
|
@@ -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';
|
|
@@ -125,10 +129,13 @@ export { verifyShieldedPoolStateProof } from './verify/Shielded/verifyShieldedPo
|
|
|
125
129
|
export { verifyShieldedNotesCountProof } from './verify/Shielded/verifyShieldedNotesCountProof.js';
|
|
126
130
|
export { verifyShieldedNullifiersProof } from './verify/Shielded/verifyShieldedNullifiersProof.js';
|
|
127
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';
|
|
128
134
|
export { ShieldedMemoWASM } from './structs/Orchard/ShieldedMemo.js';
|
|
129
135
|
export { NoteWASM } from './structs/Orchard/Note.js';
|
|
130
136
|
export { MerklePathWASM } from './structs/Orchard/MerklePath.js';
|
|
131
137
|
export { SpendableNoteWASM } from './structs/Orchard/SpendableNote.js';
|
|
138
|
+
export { ShieldedOutputWASM } from './structs/Orchard/ShieldedOutput.js';
|
|
132
139
|
export { CommitmentTreeWASM } from './structs/Orchard/CommitmentTree.js';
|
|
133
140
|
export { OrchardProverWASM } from './structs/Orchard/OrchardProver.js';
|
|
134
141
|
export { ShieldedWithdrawalResultWASM } from './structs/Orchard/ShieldedWithdrawalResult.js';
|
package/dist/src/dpp/dpp.js
CHANGED
|
@@ -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';
|
|
@@ -125,10 +129,13 @@ export { verifyShieldedPoolStateProof } from './verify/Shielded/verifyShieldedPo
|
|
|
125
129
|
export { verifyShieldedNotesCountProof } from './verify/Shielded/verifyShieldedNotesCountProof.js';
|
|
126
130
|
export { verifyShieldedNullifiersProof } from './verify/Shielded/verifyShieldedNullifiersProof.js';
|
|
127
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';
|
|
128
134
|
export { ShieldedMemoWASM } from './structs/Orchard/ShieldedMemo.js';
|
|
129
135
|
export { NoteWASM } from './structs/Orchard/Note.js';
|
|
130
136
|
export { MerklePathWASM } from './structs/Orchard/MerklePath.js';
|
|
131
137
|
export { SpendableNoteWASM } from './structs/Orchard/SpendableNote.js';
|
|
138
|
+
export { ShieldedOutputWASM } from './structs/Orchard/ShieldedOutput.js';
|
|
132
139
|
export { CommitmentTreeWASM } from './structs/Orchard/CommitmentTree.js';
|
|
133
140
|
export { OrchardProverWASM } from './structs/Orchard/OrchardProver.js';
|
|
134
141
|
export { ShieldedWithdrawalResultWASM } from './structs/Orchard/ShieldedWithdrawalResult.js';
|
package/dist/src/dpp/enums.d.ts
CHANGED
|
@@ -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';
|
package/dist/src/dpp/enums.js
CHANGED
|
@@ -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
|
+
}
|
package/dist/src/dpp/types.d.ts
CHANGED
|
@@ -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;
|
|
@@ -373,3 +374,85 @@ export interface VerifiedShieldedNullifiers {
|
|
|
373
374
|
rootHash: Uint8Array;
|
|
374
375
|
nullifiers: VerifiedShieldedNullifier[];
|
|
375
376
|
}
|
|
377
|
+
export type AddressBalanceOperation = 'setCredits' | 'addToCredits';
|
|
378
|
+
export interface AddressBalanceChange {
|
|
379
|
+
address: PlatformAddressWASM;
|
|
380
|
+
/** `setCredits` means `credits` is the new balance, `addToCredits` means it is the delta. */
|
|
381
|
+
operation: AddressBalanceOperation;
|
|
382
|
+
credits: bigint;
|
|
383
|
+
}
|
|
384
|
+
export interface BlockAddressBalanceChanges {
|
|
385
|
+
blockHeight: bigint;
|
|
386
|
+
changes: AddressBalanceChange[];
|
|
387
|
+
}
|
|
388
|
+
export interface VerifiedRecentAddressBalanceChanges {
|
|
389
|
+
rootHash: Uint8Array;
|
|
390
|
+
blocks: BlockAddressBalanceChanges[];
|
|
391
|
+
}
|
|
392
|
+
export type CompactedAddressBalanceOperation = 'setCredits' | 'addToCreditsOperations';
|
|
393
|
+
export interface BlockHeightCredit {
|
|
394
|
+
blockHeight: bigint;
|
|
395
|
+
credits: bigint;
|
|
396
|
+
}
|
|
397
|
+
export interface CompactedAddressBalanceChange {
|
|
398
|
+
address: PlatformAddressWASM;
|
|
399
|
+
operation: CompactedAddressBalanceOperation;
|
|
400
|
+
/** Populated when `operation` is `setCredits`. */
|
|
401
|
+
setCredits?: bigint;
|
|
402
|
+
/** Populated when `operation` is `addToCreditsOperations`, otherwise empty. */
|
|
403
|
+
addToCreditsOperations: BlockHeightCredit[];
|
|
404
|
+
}
|
|
405
|
+
export interface CompactedBlockAddressBalanceChanges {
|
|
406
|
+
startBlockHeight: bigint;
|
|
407
|
+
endBlockHeight: bigint;
|
|
408
|
+
changes: CompactedAddressBalanceChange[];
|
|
409
|
+
}
|
|
410
|
+
export interface VerifiedRecentCompactedAddressBalanceChanges {
|
|
411
|
+
rootHash: Uint8Array;
|
|
412
|
+
ranges: CompactedBlockAddressBalanceChanges[];
|
|
413
|
+
}
|
|
414
|
+
export type GroveElementType = 'Item' | 'ItemWithSumItem' | 'SumItem' | 'Reference' | 'ReferenceWithSumItem' | 'Tree' | 'SumTree' | 'BigSumTree' | 'ProvableSumTree' | 'CountTree' | 'ProvableCountTree' | 'CountSumTree' | 'ProvableCountSumTree' | 'ProvableCountProvableSumTree' | 'CommitmentTree' | 'MmrTree' | 'BulkAppendTree' | 'DenseAppendOnlyFixedSizeTree';
|
|
415
|
+
export type GroveElementWrapper = 'NonCounted' | 'NotSummed' | 'NotCountedOrSummed';
|
|
416
|
+
export interface GroveElement {
|
|
417
|
+
type: GroveElementType;
|
|
418
|
+
/** Set when the element opts out of its parent's aggregates; `type` still describes the wrapped element. */
|
|
419
|
+
wrapper?: GroveElementWrapper;
|
|
420
|
+
/** An item's payload, or a subtree's root key. Absent for empty subtrees. */
|
|
421
|
+
value?: Uint8Array;
|
|
422
|
+
sum?: bigint;
|
|
423
|
+
count?: bigint;
|
|
424
|
+
}
|
|
425
|
+
export interface GroveElementEntry {
|
|
426
|
+
key: Uint8Array;
|
|
427
|
+
element: GroveElement;
|
|
428
|
+
}
|
|
429
|
+
export interface GroveLeafInfo {
|
|
430
|
+
key: Uint8Array;
|
|
431
|
+
/** Pass as `expectedRootHash` when verifying this key's branch proof. */
|
|
432
|
+
hash: Uint8Array;
|
|
433
|
+
count?: bigint;
|
|
434
|
+
}
|
|
435
|
+
export interface GroveAncestor {
|
|
436
|
+
levelsUp: number;
|
|
437
|
+
count: bigint;
|
|
438
|
+
key: Uint8Array;
|
|
439
|
+
hash: Uint8Array;
|
|
440
|
+
}
|
|
441
|
+
export interface VerifiedAddressesTrunkState {
|
|
442
|
+
rootHash: Uint8Array;
|
|
443
|
+
elements: GroveElementEntry[];
|
|
444
|
+
/** Subtrees the trunk stops at. Empty when the whole tree fit in the trunk. */
|
|
445
|
+
leafKeys: GroveLeafInfo[];
|
|
446
|
+
chunkDepths: number[];
|
|
447
|
+
maxTreeDepth: number;
|
|
448
|
+
/** Which truncated subtree would hold `key`, or undefined if it is already in `elements`. */
|
|
449
|
+
traceKeyToLeaf: (key: Uint8Array) => GroveLeafInfo | undefined;
|
|
450
|
+
getAncestor: (leafKey: Uint8Array, minPrivacyTreeCount: bigint) => GroveAncestor | undefined;
|
|
451
|
+
}
|
|
452
|
+
export interface VerifiedAddressesBranchState {
|
|
453
|
+
elements: GroveElementEntry[];
|
|
454
|
+
leafKeys: GroveLeafInfo[];
|
|
455
|
+
branchRootHash: Uint8Array;
|
|
456
|
+
traceKeyToLeaf: (key: Uint8Array) => GroveLeafInfo | undefined;
|
|
457
|
+
getAncestor: (leafKey: Uint8Array, minPrivacyTreeCount: bigint) => GroveAncestor | undefined;
|
|
458
|
+
}
|
|
@@ -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;
|