pshenmic-dpp 2.0.0-dev.2 → 2.0.0-dev.21

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 (207) hide show
  1. package/dist/binaries/bindingsTypes.d.ts +507 -37
  2. package/dist/binaries/bindingsTypes.js +4 -3
  3. package/dist/binaries/native/aarch64-apple-darwin/pshenmic_dpp.node +0 -0
  4. package/dist/binaries/native/x86_64-apple-darwin/pshenmic_dpp.node +0 -0
  5. package/dist/binaries/native/x86_64-unknown-linux-gnu/pshenmic_dpp.node +0 -0
  6. package/dist/binaries/native/x86_64-unknown-linux-musl/pshenmic_dpp.node +0 -0
  7. package/dist/binaries/node.cjs +50 -0
  8. package/dist/binaries/node.d.cts +2 -0
  9. package/dist/binaries/pshenmic_dpp.android.node/arm64-v8a/libpshenmic_dpp.so +0 -0
  10. package/dist/binaries/pshenmic_dpp.apple.node/Info.plist +29 -0
  11. package/dist/binaries/pshenmic_dpp.apple.node/ios-arm64-simulator/libpshenmic_dpp.framework/Info.plist +24 -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.apple.node/react-native-node-api-module +0 -0
  14. package/dist/binaries/pshenmic_dpp.d.ts +42 -1
  15. package/dist/binaries/pshenmic_dpp.js +1 -1
  16. package/dist/binaries/wasm/wasmBytes.cjs +3 -0
  17. package/dist/binaries/wasm/wasmBytes.d.cts +1 -0
  18. package/dist/binaries/wasm.d.ts +42 -1
  19. package/dist/binaries/wasm.js +2 -44
  20. package/dist/binaries/wasmCreation.cjs +46 -0
  21. package/dist/binaries/wasmCreation.d.cts +2 -0
  22. package/dist/src/dpp/dpp.d.ts +28 -2
  23. package/dist/src/dpp/dpp.js +28 -2
  24. package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +1 -1
  25. package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +2 -2
  26. package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +1 -1
  27. package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +3 -3
  28. package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +1 -1
  29. package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +3 -3
  30. package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +1 -1
  31. package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +2 -2
  32. package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.js +1 -1
  33. package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +1 -1
  34. package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +2 -2
  35. package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.d.ts +4 -3
  36. package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +5 -4
  37. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +4 -3
  38. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +5 -4
  39. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +4 -3
  40. package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +5 -4
  41. package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.js +1 -1
  42. package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.js +2 -2
  43. package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.js +1 -1
  44. package/dist/src/dpp/structs/AssetLockProof/OutPoint.js +1 -1
  45. package/dist/src/dpp/structs/AssetLockProof/Transaction.js +1 -1
  46. package/dist/src/dpp/structs/AssetLockProof/TxIn.js +1 -1
  47. package/dist/src/dpp/structs/AssetLockProof/TxOut.js +1 -1
  48. package/dist/src/dpp/structs/AssetLockProof/Witness.js +1 -1
  49. package/dist/src/dpp/structs/Batch/BatchTransition.js +1 -1
  50. package/dist/src/dpp/structs/Batch/BatchedTransition.js +1 -1
  51. package/dist/src/dpp/structs/Batch/DocumentBaseTransition.js +1 -1
  52. package/dist/src/dpp/structs/Batch/DocumentTransition.d.ts +1 -0
  53. package/dist/src/dpp/structs/Batch/DocumentTransition.js +4 -1
  54. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.d.ts +1 -1
  55. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.js +2 -2
  56. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.js +1 -1
  57. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.js +1 -1
  58. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.d.ts +1 -1
  59. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.js +2 -2
  60. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.js +1 -1
  61. package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.js +1 -1
  62. package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.js +1 -1
  63. package/dist/src/dpp/structs/Batch/TokenBaseTransition.js +1 -1
  64. package/dist/src/dpp/structs/Batch/TokenPaymentInfo.js +1 -1
  65. package/dist/src/dpp/structs/Batch/TokenPricingSchedule.js +1 -1
  66. package/dist/src/dpp/structs/Batch/TokenTransition.d.ts +1 -0
  67. package/dist/src/dpp/structs/Batch/TokenTransition.js +4 -1
  68. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.js +1 -1
  69. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.js +1 -1
  70. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.js +1 -1
  71. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.js +1 -1
  72. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.js +1 -1
  73. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.js +1 -1
  74. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.js +1 -1
  75. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.js +1 -1
  76. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.js +1 -1
  77. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.d.ts +3 -0
  78. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.js +8 -1
  79. package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.js +1 -1
  80. package/dist/src/dpp/structs/ContractBounds.js +1 -1
  81. package/dist/src/dpp/structs/CoreScript.js +1 -1
  82. package/dist/src/dpp/structs/DataContract.d.ts +6 -4
  83. package/dist/src/dpp/structs/DataContract.js +8 -2
  84. package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.js +1 -1
  85. package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.js +1 -1
  86. package/dist/src/dpp/structs/Document.d.ts +1 -1
  87. package/dist/src/dpp/structs/Document.js +1 -1
  88. package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.js +1 -1
  89. package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.js +1 -1
  90. package/dist/src/dpp/structs/GroupStateTransitionInfo.js +1 -1
  91. package/dist/src/dpp/structs/Identifier.js +1 -1
  92. package/dist/src/dpp/structs/Identity.js +1 -1
  93. package/dist/src/dpp/structs/IdentityPublicKey.d.ts +1 -0
  94. package/dist/src/dpp/structs/IdentityPublicKey.js +6 -1
  95. package/dist/src/dpp/structs/IdentityPublicKeyInCreation.d.ts +1 -0
  96. package/dist/src/dpp/structs/IdentityPublicKeyInCreation.js +6 -1
  97. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.js +1 -1
  98. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.js +1 -1
  99. package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.js +1 -1
  100. package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.js +1 -1
  101. package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.js +1 -1
  102. package/dist/src/dpp/structs/InstantLock.js +1 -1
  103. package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.d.ts +0 -2
  104. package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.js +1 -7
  105. package/dist/src/dpp/structs/MasternodeVote/Vote.js +1 -1
  106. package/dist/src/dpp/structs/MasternodeVote/VotePoll.d.ts +1 -1
  107. package/dist/src/dpp/structs/MasternodeVote/VotePoll.js +3 -3
  108. package/dist/src/dpp/structs/Orchard/CommitmentTree.d.ts +14 -0
  109. package/dist/src/dpp/structs/Orchard/CommitmentTree.js +31 -0
  110. package/dist/src/dpp/structs/Orchard/IdentityCreateFromShieldedPoolResult.d.ts +21 -0
  111. package/dist/src/dpp/structs/Orchard/IdentityCreateFromShieldedPoolResult.js +38 -0
  112. package/dist/src/dpp/structs/Orchard/MerklePath.d.ts +11 -0
  113. package/dist/src/dpp/structs/Orchard/MerklePath.js +25 -0
  114. package/dist/src/dpp/structs/Orchard/Note.d.ts +18 -0
  115. package/dist/src/dpp/structs/Orchard/Note.js +42 -0
  116. package/dist/src/dpp/structs/Orchard/OrchardAddress.d.ts +15 -0
  117. package/dist/src/dpp/structs/Orchard/OrchardAddress.js +31 -0
  118. package/dist/src/dpp/structs/Orchard/OrchardProver.d.ts +12 -0
  119. package/dist/src/dpp/structs/Orchard/OrchardProver.js +18 -0
  120. package/dist/src/dpp/structs/Orchard/RecoveredNote.d.ts +18 -0
  121. package/dist/src/dpp/structs/Orchard/RecoveredNote.js +29 -0
  122. package/dist/src/dpp/structs/Orchard/ShieldedBuilder.d.ts +40 -0
  123. package/dist/src/dpp/structs/Orchard/ShieldedBuilder.js +45 -0
  124. package/dist/src/dpp/structs/Orchard/ShieldedMemo.d.ts +11 -0
  125. package/dist/src/dpp/structs/Orchard/ShieldedMemo.js +25 -0
  126. package/dist/src/dpp/structs/Orchard/ShieldedWithdrawalResult.d.ts +11 -0
  127. package/dist/src/dpp/structs/Orchard/ShieldedWithdrawalResult.js +18 -0
  128. package/dist/src/dpp/structs/Orchard/SpendableNote.d.ts +13 -0
  129. package/dist/src/dpp/structs/Orchard/SpendableNote.js +27 -0
  130. package/dist/src/dpp/structs/PartialIdentity.js +1 -1
  131. package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.d.ts +2 -2
  132. package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.js +2 -2
  133. package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.d.ts +4 -2
  134. package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.js +9 -3
  135. package/dist/src/dpp/structs/PrivateKey.js +1 -1
  136. package/dist/src/dpp/structs/PublicKey.js +1 -1
  137. package/dist/src/dpp/structs/ShieldedTransitions/IdentityCreateFromShieldedPoolTransition.d.ts +31 -0
  138. package/dist/src/dpp/structs/ShieldedTransitions/IdentityCreateFromShieldedPoolTransition.js +73 -0
  139. package/dist/src/dpp/structs/ShieldedTransitions/SerializedAction.d.ts +19 -0
  140. package/dist/src/dpp/structs/ShieldedTransitions/SerializedAction.js +49 -0
  141. package/dist/src/dpp/structs/ShieldedTransitions/ShieldFromAssetLockTransition.d.ts +30 -0
  142. package/dist/src/dpp/structs/ShieldedTransitions/ShieldFromAssetLockTransition.js +77 -0
  143. package/dist/src/dpp/structs/ShieldedTransitions/ShieldTransition.d.ts +32 -0
  144. package/dist/src/dpp/structs/ShieldedTransitions/ShieldTransition.js +78 -0
  145. package/dist/src/dpp/structs/ShieldedTransitions/ShieldedTransferTransition.d.ts +21 -0
  146. package/dist/src/dpp/structs/ShieldedTransitions/ShieldedTransferTransition.js +51 -0
  147. package/dist/src/dpp/structs/ShieldedTransitions/ShieldedWithdrawalTransition.d.ts +29 -0
  148. package/dist/src/dpp/structs/ShieldedTransitions/ShieldedWithdrawalTransition.js +71 -0
  149. package/dist/src/dpp/structs/ShieldedTransitions/UnshieldTransition.d.ts +25 -0
  150. package/dist/src/dpp/structs/ShieldedTransitions/UnshieldTransition.js +59 -0
  151. package/dist/src/dpp/structs/StateTransition.d.ts +1 -0
  152. package/dist/src/dpp/structs/StateTransition.js +3 -0
  153. package/dist/src/dpp/structs/TokenConfiguration/ActionTaker.js +1 -1
  154. package/dist/src/dpp/structs/TokenConfiguration/ChangeControlRules.js +1 -1
  155. package/dist/src/dpp/structs/TokenConfiguration/Group.js +1 -1
  156. package/dist/src/dpp/structs/TokenConfiguration/TokenConfiguration.js +1 -1
  157. package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationConvention.js +1 -1
  158. package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationLocalization.js +1 -1
  159. package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRules.js +1 -1
  160. package/dist/src/dpp/structs/TokenConfiguration/TokenKeepsHistoryRules.js +1 -1
  161. package/dist/src/dpp/structs/TokenConfiguration/TokenMarketplaceRules.js +1 -1
  162. package/dist/src/dpp/structs/TokenConfiguration/TokenPerpetualDistribution.js +1 -1
  163. package/dist/src/dpp/structs/TokenConfiguration/TokenPreProgrammedDistribution.js +1 -1
  164. package/dist/src/dpp/types.d.ts +85 -11
  165. package/dist/src/dpp/utils.d.ts +4 -3
  166. package/dist/src/dpp/utils.js +24 -6
  167. package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.d.ts +1 -1
  168. package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.js +1 -1
  169. package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.d.ts +2 -0
  170. package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.js +12 -0
  171. package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.d.ts +2 -0
  172. package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.js +14 -0
  173. package/dist/src/dpp/verify/Shielded/verifyMostRecentShieldedAnchorProof.d.ts +2 -0
  174. package/dist/src/dpp/verify/Shielded/verifyMostRecentShieldedAnchorProof.js +9 -0
  175. package/dist/src/dpp/verify/Shielded/verifyShieldedAnchorsProof.d.ts +2 -0
  176. package/dist/src/dpp/verify/Shielded/verifyShieldedAnchorsProof.js +9 -0
  177. package/dist/src/dpp/verify/Shielded/verifyShieldedEncryptedNotesProof.d.ts +2 -0
  178. package/dist/src/dpp/verify/Shielded/verifyShieldedEncryptedNotesProof.js +15 -0
  179. package/dist/src/dpp/verify/Shielded/verifyShieldedNotesCountProof.d.ts +2 -0
  180. package/dist/src/dpp/verify/Shielded/verifyShieldedNotesCountProof.js +9 -0
  181. package/dist/src/dpp/verify/Shielded/verifyShieldedNullifiersProof.d.ts +2 -0
  182. package/dist/src/dpp/verify/Shielded/verifyShieldedNullifiersProof.js +12 -0
  183. package/dist/src/dpp/verify/Shielded/verifyShieldedPoolStateProof.d.ts +2 -0
  184. package/dist/src/dpp/verify/Shielded/verifyShieldedPoolStateProof.js +9 -0
  185. package/dist/src/dpp/verify/StateTransition/utils.js +80 -15
  186. package/dist/src/dpp/verify/System/verifyEpochsInfoProof.js +1 -1
  187. package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.js +1 -1
  188. package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.js +1 -1
  189. package/dist/src/native.d.ts +3 -0
  190. package/dist/src/native.js +8 -0
  191. package/dist/utils/{base122.js → base122.cjs} +3 -1
  192. package/package.json +18 -28
  193. package/tests/unit/DataContract.spec.ts +281 -0
  194. package/tests/unit/DynamicValue.spec.ts +42 -2
  195. package/tests/unit/Identifier.spec.ts +1 -1
  196. package/tests/unit/Identity.spec.ts +1 -1
  197. package/tests/unit/IdentityPublicKey.spec.ts +1 -1
  198. package/tests/unit/NodeApi.spec.ts +49 -0
  199. package/tests/unit/Shielded.spec.ts +344 -0
  200. package/tests/unit/ShieldedTransitions.spec.ts +709 -0
  201. package/tests/unit/TokenConfiguration.spec.ts +114 -0
  202. package/tests/unit/WebAssembly.spec.ts +49 -0
  203. package/tests/unit/utils/buildTokenConfiguration.ts +66 -0
  204. package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
  205. package/dist/binaries/wasm/wasmBytes.d.ts +0 -2
  206. package/dist/binaries/wasm/wasmBytes.js +0 -2
  207. /package/dist/utils/{base122.d.ts → base122.d.cts} +0 -0
@@ -0,0 +1,78 @@
1
+ import { InputAddressWASM } from '../AddressTransitions/entities/InputAddress.js';
2
+ import { AddressFundsFeeStrategyStepWASM } from '../AddressTransitions/entities/AddressFundsFeeStrategyStep.js';
3
+ import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
4
+ import { SerializedActionWASM } from './SerializedAction.js';
5
+ import { dppProvider } from '../../provider.js';
6
+ import { StateTransitionWASM } from '../StateTransition.js';
7
+ export class ShieldTransitionWASM {
8
+ /** @private **/
9
+ _rawShieldTransition;
10
+ constructor(inputs, actions, amount, anchor, proof, bindingsSignature, feeStrategy, userFeeIncrease, inputWitnesses) {
11
+ this._rawShieldTransition = new dppProvider.dpp.ShieldTransitionNAPI(inputs.map(i => i._rawInputAddress), actions.map(a => a._rawSerializedAction), amount.toString(), anchor, proof, bindingsSignature, feeStrategy.map(s => s._rawAddressFundsFeeStrategyStep), userFeeIncrease, inputWitnesses.map(w => w._rawWitness));
12
+ }
13
+ get inputs() {
14
+ return this._rawShieldTransition.inputs.map(InputAddressWASM.createFromRawInstance);
15
+ }
16
+ set inputs(value) {
17
+ this._rawShieldTransition.inputs = value.map(i => i._rawInputAddress);
18
+ }
19
+ get actions() {
20
+ return this._rawShieldTransition.actions.map(SerializedActionWASM.createFromRawInstance);
21
+ }
22
+ set actions(value) {
23
+ this._rawShieldTransition.actions = value.map(a => a._rawSerializedAction);
24
+ }
25
+ get amount() {
26
+ return BigInt(this._rawShieldTransition.amount);
27
+ }
28
+ set amount(value) {
29
+ this._rawShieldTransition.amount = value.toString();
30
+ }
31
+ get anchor() {
32
+ return this._rawShieldTransition.anchor;
33
+ }
34
+ set anchor(value) {
35
+ this._rawShieldTransition.anchor = value;
36
+ }
37
+ get proof() {
38
+ return this._rawShieldTransition.proof;
39
+ }
40
+ set proof(value) {
41
+ this._rawShieldTransition.proof = value;
42
+ }
43
+ get bindingsSignature() {
44
+ return this._rawShieldTransition.bindingsSignature;
45
+ }
46
+ set bindingsSignature(value) {
47
+ this._rawShieldTransition.bindingsSignature = value;
48
+ }
49
+ get feeStrategy() {
50
+ return this._rawShieldTransition.feeStrategy.map(AddressFundsFeeStrategyStepWASM.createFromRawInstance);
51
+ }
52
+ set feeStrategy(value) {
53
+ this._rawShieldTransition.feeStrategy = value.map(s => s._rawAddressFundsFeeStrategyStep);
54
+ }
55
+ get userFeeIncrease() {
56
+ return this._rawShieldTransition.userFeeIncrease;
57
+ }
58
+ set userFeeIncrease(value) {
59
+ this._rawShieldTransition.userFeeIncrease = value;
60
+ }
61
+ get inputWitnesses() {
62
+ return this._rawShieldTransition.inputWitnesses.map(AddressWitnessWASM.createFromRawInstance);
63
+ }
64
+ set inputWitnesses(value) {
65
+ this._rawShieldTransition.inputWitnesses = value.map(w => w._rawWitness);
66
+ }
67
+ toStateTransition() {
68
+ return StateTransitionWASM.createFromRawInstance(this._rawShieldTransition.toStateTransition());
69
+ }
70
+ static fromStateTransition(st) {
71
+ return ShieldTransitionWASM.createFromRawInstance(dppProvider.dpp.ShieldTransitionNAPI.fromStateTransition(st._rawStateTransition));
72
+ }
73
+ static createFromRawInstance(rawInstance) {
74
+ const instance = Object.create(ShieldTransitionWASM.prototype);
75
+ instance._rawShieldTransition = rawInstance;
76
+ return instance;
77
+ }
78
+ }
@@ -0,0 +1,21 @@
1
+ import type { ShieldedTransferTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { SerializedActionWASM } from './SerializedAction.js';
3
+ import { StateTransitionWASM } from '../StateTransition.js';
4
+ export declare class ShieldedTransferTransitionWASM {
5
+ /** @private **/
6
+ _rawShieldedTransferTransition: ShieldedTransferTransitionNAPI;
7
+ constructor(actions: SerializedActionWASM[], valueBalance: bigint, anchor: Uint8Array, proof: Uint8Array, bindingsSignature: Uint8Array);
8
+ get actions(): SerializedActionWASM[];
9
+ set actions(value: SerializedActionWASM[]);
10
+ get valueBalance(): bigint;
11
+ set valueBalance(value: bigint);
12
+ get anchor(): Uint8Array;
13
+ set anchor(value: Uint8Array);
14
+ get proof(): Uint8Array;
15
+ set proof(value: Uint8Array);
16
+ get bindingsSignature(): Uint8Array;
17
+ set bindingsSignature(value: Uint8Array);
18
+ toStateTransition(): StateTransitionWASM;
19
+ static fromStateTransition(st: StateTransitionWASM): ShieldedTransferTransitionWASM;
20
+ static createFromRawInstance(rawInstance: ShieldedTransferTransitionNAPI): ShieldedTransferTransitionWASM;
21
+ }
@@ -0,0 +1,51 @@
1
+ import { SerializedActionWASM } from './SerializedAction.js';
2
+ import { dppProvider } from '../../provider.js';
3
+ import { StateTransitionWASM } from '../StateTransition.js';
4
+ export class ShieldedTransferTransitionWASM {
5
+ /** @private **/
6
+ _rawShieldedTransferTransition;
7
+ constructor(actions, valueBalance, anchor, proof, bindingsSignature) {
8
+ this._rawShieldedTransferTransition = new dppProvider.dpp.ShieldedTransferTransitionNAPI(actions.map(a => a._rawSerializedAction), valueBalance.toString(), anchor, proof, bindingsSignature);
9
+ }
10
+ get actions() {
11
+ return this._rawShieldedTransferTransition.actions.map(SerializedActionWASM.createFromRawInstance);
12
+ }
13
+ set actions(value) {
14
+ this._rawShieldedTransferTransition.actions = value.map(a => a._rawSerializedAction);
15
+ }
16
+ get valueBalance() {
17
+ return BigInt(this._rawShieldedTransferTransition.valueBalance);
18
+ }
19
+ set valueBalance(value) {
20
+ this._rawShieldedTransferTransition.valueBalance = value.toString();
21
+ }
22
+ get anchor() {
23
+ return this._rawShieldedTransferTransition.anchor;
24
+ }
25
+ set anchor(value) {
26
+ this._rawShieldedTransferTransition.anchor = value;
27
+ }
28
+ get proof() {
29
+ return this._rawShieldedTransferTransition.proof;
30
+ }
31
+ set proof(value) {
32
+ this._rawShieldedTransferTransition.proof = value;
33
+ }
34
+ get bindingsSignature() {
35
+ return this._rawShieldedTransferTransition.bindingsSignature;
36
+ }
37
+ set bindingsSignature(value) {
38
+ this._rawShieldedTransferTransition.bindingsSignature = value;
39
+ }
40
+ toStateTransition() {
41
+ return StateTransitionWASM.createFromRawInstance(this._rawShieldedTransferTransition.toStateTransition());
42
+ }
43
+ static fromStateTransition(st) {
44
+ return ShieldedTransferTransitionWASM.createFromRawInstance(dppProvider.dpp.ShieldedTransferTransitionNAPI.fromStateTransition(st._rawStateTransition));
45
+ }
46
+ static createFromRawInstance(rawInstance) {
47
+ const instance = Object.create(ShieldedTransferTransitionWASM.prototype);
48
+ instance._rawShieldedTransferTransition = rawInstance;
49
+ return instance;
50
+ }
51
+ }
@@ -0,0 +1,29 @@
1
+ import type { ShieldedWithdrawalTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { SerializedActionWASM } from './SerializedAction.js';
3
+ import { CoreScriptWASM } from '../CoreScript.js';
4
+ import { PoolingLike } from '../../types.js';
5
+ import { StateTransitionWASM } from '../StateTransition.js';
6
+ export declare class ShieldedWithdrawalTransitionWASM {
7
+ /** @private **/
8
+ _rawShieldedWithdrawalTransition: ShieldedWithdrawalTransitionNAPI;
9
+ constructor(actions: SerializedActionWASM[], unshieldingAmount: bigint, anchor: Uint8Array, proof: Uint8Array, bindingsSignature: Uint8Array, coreFeePerByte: number, pooling: PoolingLike, outputScript: CoreScriptWASM);
10
+ get actions(): SerializedActionWASM[];
11
+ set actions(value: SerializedActionWASM[]);
12
+ get unshieldingAmount(): bigint;
13
+ set unshieldingAmount(value: bigint);
14
+ get anchor(): Uint8Array;
15
+ set anchor(value: Uint8Array);
16
+ get proof(): Uint8Array;
17
+ set proof(value: Uint8Array);
18
+ get bindingsSignature(): Uint8Array;
19
+ set bindingsSignature(value: Uint8Array);
20
+ get coreFeePerByte(): number;
21
+ set coreFeePerByte(value: number);
22
+ get pooling(): string;
23
+ set pooling(value: PoolingLike);
24
+ get outputScript(): CoreScriptWASM;
25
+ set outputScript(value: CoreScriptWASM);
26
+ toStateTransition(): StateTransitionWASM;
27
+ static fromStateTransition(st: StateTransitionWASM): ShieldedWithdrawalTransitionWASM;
28
+ static createFromRawInstance(rawInstance: ShieldedWithdrawalTransitionNAPI): ShieldedWithdrawalTransitionWASM;
29
+ }
@@ -0,0 +1,71 @@
1
+ import { SerializedActionWASM } from './SerializedAction.js';
2
+ import { CoreScriptWASM } from '../CoreScript.js';
3
+ import { dppProvider } from '../../provider.js';
4
+ import { valueToDynamicValue } from '../../utils.js';
5
+ import { StateTransitionWASM } from '../StateTransition.js';
6
+ export class ShieldedWithdrawalTransitionWASM {
7
+ /** @private **/
8
+ _rawShieldedWithdrawalTransition;
9
+ constructor(actions, unshieldingAmount, anchor, proof, bindingsSignature, coreFeePerByte, pooling, outputScript) {
10
+ this._rawShieldedWithdrawalTransition = new dppProvider.dpp.ShieldedWithdrawalTransitionNAPI(actions.map(a => a._rawSerializedAction), unshieldingAmount.toString(), anchor, proof, bindingsSignature, coreFeePerByte, valueToDynamicValue(pooling), outputScript._rawCoreScript);
11
+ }
12
+ get actions() {
13
+ return this._rawShieldedWithdrawalTransition.actions.map(SerializedActionWASM.createFromRawInstance);
14
+ }
15
+ set actions(value) {
16
+ this._rawShieldedWithdrawalTransition.actions = value.map(a => a._rawSerializedAction);
17
+ }
18
+ get unshieldingAmount() {
19
+ return BigInt(this._rawShieldedWithdrawalTransition.unshieldingAmount);
20
+ }
21
+ set unshieldingAmount(value) {
22
+ this._rawShieldedWithdrawalTransition.unshieldingAmount = value.toString();
23
+ }
24
+ get anchor() {
25
+ return this._rawShieldedWithdrawalTransition.anchor;
26
+ }
27
+ set anchor(value) {
28
+ this._rawShieldedWithdrawalTransition.anchor = value;
29
+ }
30
+ get proof() {
31
+ return this._rawShieldedWithdrawalTransition.proof;
32
+ }
33
+ set proof(value) {
34
+ this._rawShieldedWithdrawalTransition.proof = value;
35
+ }
36
+ get bindingsSignature() {
37
+ return this._rawShieldedWithdrawalTransition.bindingsSignature;
38
+ }
39
+ set bindingsSignature(value) {
40
+ this._rawShieldedWithdrawalTransition.bindingsSignature = value;
41
+ }
42
+ get coreFeePerByte() {
43
+ return this._rawShieldedWithdrawalTransition.coreFeePerByte;
44
+ }
45
+ set coreFeePerByte(value) {
46
+ this._rawShieldedWithdrawalTransition.coreFeePerByte = value;
47
+ }
48
+ get pooling() {
49
+ return this._rawShieldedWithdrawalTransition.pooling;
50
+ }
51
+ set pooling(value) {
52
+ this._rawShieldedWithdrawalTransition.pooling = valueToDynamicValue(value);
53
+ }
54
+ get outputScript() {
55
+ return CoreScriptWASM.createFromRawInstance(this._rawShieldedWithdrawalTransition.outputScript);
56
+ }
57
+ set outputScript(value) {
58
+ this._rawShieldedWithdrawalTransition.outputScript = value._rawCoreScript;
59
+ }
60
+ toStateTransition() {
61
+ return StateTransitionWASM.createFromRawInstance(this._rawShieldedWithdrawalTransition.toStateTransition());
62
+ }
63
+ static fromStateTransition(st) {
64
+ return ShieldedWithdrawalTransitionWASM.createFromRawInstance(dppProvider.dpp.ShieldedWithdrawalTransitionNAPI.fromStateTransition(st._rawStateTransition));
65
+ }
66
+ static createFromRawInstance(rawInstance) {
67
+ const instance = Object.create(ShieldedWithdrawalTransitionWASM.prototype);
68
+ instance._rawShieldedWithdrawalTransition = rawInstance;
69
+ return instance;
70
+ }
71
+ }
@@ -0,0 +1,25 @@
1
+ import type { UnshieldTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
2
+ import { SerializedActionWASM } from './SerializedAction.js';
3
+ import { PlatformAddressWASM } from '../PlatformAddress/PlatformAddress.js';
4
+ import { PlatformAddressLike } from '../../types.js';
5
+ import { StateTransitionWASM } from '../StateTransition.js';
6
+ export declare class UnshieldTransitionWASM {
7
+ /** @private **/
8
+ _rawUnshieldTransition: UnshieldTransitionNAPI;
9
+ constructor(outputAddress: PlatformAddressLike, actions: SerializedActionWASM[], unshieldingAmount: bigint, anchor: Uint8Array, proof: Uint8Array, bindingsSignature: Uint8Array);
10
+ get outputAddress(): PlatformAddressWASM;
11
+ set outputAddress(value: PlatformAddressLike);
12
+ get actions(): SerializedActionWASM[];
13
+ set actions(value: SerializedActionWASM[]);
14
+ get unshieldingAmount(): bigint;
15
+ set unshieldingAmount(value: bigint);
16
+ get anchor(): Uint8Array;
17
+ set anchor(value: Uint8Array);
18
+ get proof(): Uint8Array;
19
+ set proof(value: Uint8Array);
20
+ get bindingsSignature(): Uint8Array;
21
+ set bindingsSignature(value: Uint8Array);
22
+ toStateTransition(): StateTransitionWASM;
23
+ static fromStateTransition(st: StateTransitionWASM): UnshieldTransitionWASM;
24
+ static createFromRawInstance(rawInstance: UnshieldTransitionNAPI): UnshieldTransitionWASM;
25
+ }
@@ -0,0 +1,59 @@
1
+ import { SerializedActionWASM } from './SerializedAction.js';
2
+ import { PlatformAddressWASM } from '../PlatformAddress/PlatformAddress.js';
3
+ import { dppProvider } from '../../provider.js';
4
+ import { preparePlatformAddressValue } from '../../utils.js';
5
+ import { StateTransitionWASM } from '../StateTransition.js';
6
+ export class UnshieldTransitionWASM {
7
+ /** @private **/
8
+ _rawUnshieldTransition;
9
+ constructor(outputAddress, actions, unshieldingAmount, anchor, proof, bindingsSignature) {
10
+ this._rawUnshieldTransition = new dppProvider.dpp.UnshieldTransitionNAPI(preparePlatformAddressValue(outputAddress), actions.map(a => a._rawSerializedAction), unshieldingAmount.toString(), anchor, proof, bindingsSignature);
11
+ }
12
+ get outputAddress() {
13
+ return PlatformAddressWASM.createFromRawInstance(this._rawUnshieldTransition.outputAddress);
14
+ }
15
+ set outputAddress(value) {
16
+ this._rawUnshieldTransition.outputAddress = preparePlatformAddressValue(value);
17
+ }
18
+ get actions() {
19
+ return this._rawUnshieldTransition.actions.map(SerializedActionWASM.createFromRawInstance);
20
+ }
21
+ set actions(value) {
22
+ this._rawUnshieldTransition.actions = value.map(a => a._rawSerializedAction);
23
+ }
24
+ get unshieldingAmount() {
25
+ return BigInt(this._rawUnshieldTransition.unshieldingAmount);
26
+ }
27
+ set unshieldingAmount(value) {
28
+ this._rawUnshieldTransition.unshieldingAmount = value.toString();
29
+ }
30
+ get anchor() {
31
+ return this._rawUnshieldTransition.anchor;
32
+ }
33
+ set anchor(value) {
34
+ this._rawUnshieldTransition.anchor = value;
35
+ }
36
+ get proof() {
37
+ return this._rawUnshieldTransition.proof;
38
+ }
39
+ set proof(value) {
40
+ this._rawUnshieldTransition.proof = value;
41
+ }
42
+ get bindingsSignature() {
43
+ return this._rawUnshieldTransition.bindingsSignature;
44
+ }
45
+ set bindingsSignature(value) {
46
+ this._rawUnshieldTransition.bindingsSignature = value;
47
+ }
48
+ toStateTransition() {
49
+ return StateTransitionWASM.createFromRawInstance(this._rawUnshieldTransition.toStateTransition());
50
+ }
51
+ static fromStateTransition(st) {
52
+ return UnshieldTransitionWASM.createFromRawInstance(dppProvider.dpp.UnshieldTransitionNAPI.fromStateTransition(st._rawStateTransition));
53
+ }
54
+ static createFromRawInstance(rawInstance) {
55
+ const instance = Object.create(UnshieldTransitionWASM.prototype);
56
+ instance._rawUnshieldTransition = rawInstance;
57
+ return instance;
58
+ }
59
+ }
@@ -28,6 +28,7 @@ export declare class StateTransitionWASM {
28
28
  setOwnerId(ownerId: IdentifierLike): void;
29
29
  setIdentityContractNonce(nonce: bigint): void;
30
30
  setIdentityNonce(nonce: bigint): void;
31
+ getSignableBytes(): Uint8Array;
31
32
  bytes(): Uint8Array;
32
33
  hex(): string;
33
34
  base64(): string;
@@ -76,6 +76,9 @@ export class StateTransitionWASM {
76
76
  setIdentityNonce(nonce) {
77
77
  this._rawStateTransition.setIdentityNonce(nonce.toString());
78
78
  }
79
+ getSignableBytes() {
80
+ return this._rawStateTransition.getSignableBytes();
81
+ }
79
82
  bytes() {
80
83
  return this._rawStateTransition.bytes();
81
84
  }
@@ -37,7 +37,7 @@ export class ActionTakerWASM {
37
37
  this._rawActionTaker.value = normalValue;
38
38
  }
39
39
  static createFromRawInstance(rawInstance) {
40
- const instance = Object.create(this.prototype);
40
+ const instance = Object.create(ActionTakerWASM.prototype);
41
41
  instance._rawActionTaker = rawInstance;
42
42
  return instance;
43
43
  }
@@ -45,7 +45,7 @@ export class ChangeControlRulesWASM {
45
45
  return this._rawChangeControlRules.canChangeAdminActionTakers(adminActionTakers._rawAuthorizedActionTakers, prepareIdentifierValue(contractOwnerId), mainGroup, normalGroups, actionTaker._rawActionTaker, valueToDynamicValue(goal));
46
46
  }
47
47
  static createFromRawInstance(rawInstance) {
48
- const instance = Object.create(this.prototype);
48
+ const instance = Object.create(ChangeControlRulesWASM.prototype);
49
49
  instance._rawChangeControlRules = rawInstance;
50
50
  return instance;
51
51
  }
@@ -37,7 +37,7 @@ export class GroupWASM {
37
37
  this._rawGroup.setMemberRequiredPower(prepareIdentifierValue(member), power);
38
38
  }
39
39
  static createFromRawInstance(rawInstance) {
40
- const instance = Object.create(this.prototype);
40
+ const instance = Object.create(GroupWASM.prototype);
41
41
  instance._rawGroup = rawInstance;
42
42
  return instance;
43
43
  }
@@ -132,7 +132,7 @@ export class TokenConfigurationWASM {
132
132
  return IdentifierWASM.createFromRawInstance(dppProvider.dpp.TokenConfigurationNAPI.calculateTokenId(prepareIdentifierValue(contractId), tokenPosition));
133
133
  }
134
134
  static createFromRawInstance(rawInstance) {
135
- const instance = Object.create(this.prototype);
135
+ const instance = Object.create(TokenConfigurationWASM.prototype);
136
136
  instance._rawTokenConfiguration = rawInstance;
137
137
  return instance;
138
138
  }
@@ -40,7 +40,7 @@ export class TokenConfigurationConventionWASM {
40
40
  this._rawTokenConfigurationConvention.localizations = normalLocalization;
41
41
  }
42
42
  static createFromRawInstance(rawInstance) {
43
- const instance = Object.create(this.prototype);
43
+ const instance = Object.create(TokenConfigurationConventionWASM.prototype);
44
44
  instance._rawTokenConfigurationConvention = rawInstance;
45
45
  return instance;
46
46
  }
@@ -27,7 +27,7 @@ export class TokenConfigurationLocalizationWASM {
27
27
  return this._rawTokenConfigurationLocalization.toJSON();
28
28
  }
29
29
  static createFromRawInstance(rawInstance) {
30
- const instance = Object.create(this.prototype);
30
+ const instance = Object.create(TokenConfigurationLocalizationWASM.prototype);
31
31
  instance._rawTokenConfigurationLocalization = rawInstance;
32
32
  return instance;
33
33
  }
@@ -68,7 +68,7 @@ export class TokenDistributionRulesWASM {
68
68
  this._rawTokenDistributionRules.changeDirectPurchasePricingRules = changeDirectPurchasePricingRules._rawChangeControlRules;
69
69
  }
70
70
  static createFromRawInstance(rawInstance) {
71
- const instance = Object.create(this.prototype);
71
+ const instance = Object.create(TokenDistributionRulesWASM.prototype);
72
72
  instance._rawTokenDistributionRules = rawInstance;
73
73
  return instance;
74
74
  }
@@ -42,7 +42,7 @@ export class TokenKeepsHistoryRulesWASM {
42
42
  this._rawTokenKeepsHistoryRules.keepsDirectPurchaseHistory = keepsDirectPurchaseHistory;
43
43
  }
44
44
  static createFromRawInstance(rawInstance) {
45
- const instance = Object.create(this.prototype);
45
+ const instance = Object.create(TokenKeepsHistoryRulesWASM.prototype);
46
46
  instance._rawTokenKeepsHistoryRules = rawInstance;
47
47
  return instance;
48
48
  }
@@ -20,7 +20,7 @@ export class TokenMarketplaceRulesWASM {
20
20
  this._rawTokenMarketplaceRules.tradeModeChangeRules = value._rawChangeControlRules;
21
21
  }
22
22
  static createFromRawInstance(rawInstance) {
23
- const instance = Object.create(this.prototype);
23
+ const instance = Object.create(TokenMarketplaceRulesWASM.prototype);
24
24
  instance._rawTokenMarketplaceRules = rawInstance;
25
25
  return instance;
26
26
  }
@@ -20,7 +20,7 @@ export class TokenPerpetualDistributionWASM {
20
20
  this._rawTokenPerpetualDistribution.distributionRecipient = value._rawTokenDistributionRecipient;
21
21
  }
22
22
  static createFromRawInstance(rawInstance) {
23
- const instance = Object.create(this.prototype);
23
+ const instance = Object.create(TokenPerpetualDistributionWASM.prototype);
24
24
  instance._rawTokenPerpetualDistribution = rawInstance;
25
25
  return instance;
26
26
  }
@@ -35,7 +35,7 @@ export class TokenPreProgrammedDistributionWASM {
35
35
  this._rawTokenPreProgrammedDistribution.distributions = objectToDistributionArray(distributions);
36
36
  }
37
37
  static createFromRawInstance(rawInstance) {
38
- const instance = Object.create(this.prototype);
38
+ const instance = Object.create(TokenPreProgrammedDistributionWASM.prototype);
39
39
  instance._rawTokenPreProgrammedDistribution = rawInstance;
40
40
  return instance;
41
41
  }
@@ -28,9 +28,10 @@ import { PartialIdentityWASM } from './structs/PartialIdentity.js';
28
28
  import { DocumentWASM } from './structs/Document.js';
29
29
  import { VoteWASM } from './structs/MasternodeVote/Vote.js';
30
30
  import { TokenPricingScheduleWASM } from './structs/Batch/TokenPricingSchedule.js';
31
- import { PlatformAddressWASM } from './structs/Address/PlatformAddress.js';
31
+ import { PlatformAddressWASM } from './structs/PlatformAddress/PlatformAddress.js';
32
32
  export type DashPlatformProtocol = typeof protocol;
33
33
  export type IdentifierLike = string | Uint8Array | protocol.IdentifierNAPI | IdentifierWASM;
34
+ export type PlatformAddressLike = string | Uint8Array | protocol.PlatformAddressNAPI | PlatformAddressWASM;
34
35
  export type KeyTypeLike = KeyType | keyof typeof KeyType | Lowercase<keyof typeof KeyType>;
35
36
  export type NetworkLike = NetworkWASM | keyof typeof NetworkWASM | Lowercase<keyof typeof NetworkWASM>;
36
37
  export type SecurityLevelLike = SecurityLevel | keyof typeof SecurityLevel | Lowercase<keyof typeof SecurityLevel>;
@@ -43,7 +44,6 @@ export type TokenEmergencyActionLike = TokenEmergencyActionWASM | keyof typeof T
43
44
  export type AssetLockProofTypeLike = AssetLockProofType | keyof typeof AssetLockProofType | Lowercase<keyof typeof AssetLockProofType>;
44
45
  export type PoolingLike = PoolingWASM | keyof typeof PoolingWASM | Lowercase<keyof typeof PoolingWASM>;
45
46
  export type VoteStateResultTypeLike = VoteStateResultType | keyof typeof VoteStateResultType | Lowercase<keyof typeof VoteStateResultType>;
46
- export type EnumLike = KeyTypeLike | NetworkLike | SecurityLevelLike | PlatformVersionLike | PurposeLike;
47
47
  export type AddressWitnessP2PKH = protocol.AddressWitnessP2pkhNAPI;
48
48
  export type AddressWitnessP2SH = protocol.AddressWitnessP2shNAPI;
49
49
  export type TokenConfigurationLocalizationJson = protocol.TokenConfigurationLocalizationJsonNAPI;
@@ -182,21 +182,49 @@ export interface VerifiedTokenGroupActionWithTokenPricingSchedule {
182
182
  groupActionStatus: string;
183
183
  pricingSchedule?: TokenPricingScheduleWASM;
184
184
  }
185
- export interface VerifiedAddressInfo {
185
+ export interface VerifiedPlatformAddressInfo {
186
+ address?: PlatformAddressWASM;
186
187
  nonce?: number;
187
- address: PlatformAddressWASM;
188
- credits?: bigint;
188
+ balance?: bigint;
189
189
  }
190
190
  export interface VerifiedIdentityFullWithAddressInfos {
191
191
  identity: IdentityWASM;
192
- infos: VerifiedAddressInfo[];
192
+ infos: VerifiedPlatformAddressInfo[];
193
193
  }
194
194
  export interface VerifiedIdentityWithAddressInfos {
195
195
  identity: PartialIdentityWASM;
196
- infos: VerifiedAddressInfo[];
196
+ infos: VerifiedPlatformAddressInfo[];
197
+ }
198
+ export interface AssetLockValue {
199
+ initialCreditValue: bigint;
200
+ txOutScript: Uint8Array;
201
+ remainingCreditValue: bigint;
202
+ usedTags: Uint8Array[];
203
+ }
204
+ export type StoredAssetLockInfoType = 'FullyConsumed' | 'PartiallyConsumed' | 'NotPresent';
205
+ export interface StoredAssetLockInfo {
206
+ type: StoredAssetLockInfoType;
207
+ value?: AssetLockValue;
208
+ }
209
+ export type ShieldedNullifier = [Uint8Array, boolean];
210
+ export interface VerifiedShieldedNullifiersWithAddressInfos {
211
+ nullifiers: ShieldedNullifier[];
212
+ infos: VerifiedPlatformAddressInfo[];
213
+ }
214
+ export interface VerifiedShieldedNullifiersWithWithdrawalDocument {
215
+ nullifiers: ShieldedNullifier[];
216
+ documents: VerifiedDocument[];
217
+ }
218
+ export interface VerifiedAssetLockConsumedWithAddressInfos {
219
+ storedAssetLockInfo: StoredAssetLockInfo;
220
+ infos: VerifiedPlatformAddressInfo[];
221
+ }
222
+ export interface VerifiedIdentityWithShieldedNullifiers {
223
+ identity: IdentityWASM;
224
+ nullifiers: ShieldedNullifier[];
197
225
  }
198
- export type VerifiedStateTransitionResultVariants = DataContractWASM | IdentityWASM | IdentifierWASM | VerifiedIdentityBalance | VerifiedIdentityTokenInfo | VerifiedTokenPricingSchedule | TokenStatus | VerifiedIdentityBalance[] | PartialIdentityWASM | VerifiedBalanceTransfer | VerifiedDocument[] | DocumentWASM | VerifiedTokenGroupActionWithDocument | VerifiedTokenGroupActionWithTokenBalance | VerifiedTokenGroupActionWithTokenIdentityInfo | VerifiedTokenGroupActionWithTokenPricingSchedule | VoteWASM | VerifiedAddressInfo[] | VerifiedIdentityFullWithAddressInfos | VerifiedIdentityWithAddressInfos;
199
- export type VerifiedStateTransitionResultVariantsRAW = protocol.DataContractNAPI | protocol.IdentityNAPI | protocol.IdentifierNAPI | protocol.VerifiedIdentityBalanceNAPI | protocol.VerifiedIdentityTokenInfoNAPI | protocol.VerifiedTokenPricingScheduleNAPI | protocol.TokenStatusNAPI | protocol.VerifiedIdentityBalanceNAPI[] | protocol.PartialIdentityNAPI | protocol.VerifiedBalanceTransferNAPI | protocol.VerifiedDocumentNAPI[] | protocol.DocumentNAPI | protocol.VerifiedTokenGroupActionWithDocumentNAPI | protocol.VerifiedTokenGroupActionWithTokenBalanceNAPI | protocol.VerifiedTokenGroupActionWithTokenIdentityInfoNAPI | protocol.VerifiedTokenGroupActionWithTokenPricingScheduleNAPI | protocol.VoteNAPI | protocol.VerifiedAddressInfosNAPI[] | protocol.VerifiedIdentityFullWithAddressInfosNAPI | protocol.VerifiedIdentityWithAddressInfosNAPI;
226
+ export type VerifiedStateTransitionResultVariants = DataContractWASM | IdentityWASM | IdentifierWASM | VerifiedIdentityBalance | VerifiedIdentityTokenInfo | VerifiedTokenPricingSchedule | TokenStatus | VerifiedIdentityBalance[] | PartialIdentityWASM | VerifiedBalanceTransfer | VerifiedDocument[] | DocumentWASM | VerifiedTokenGroupActionWithDocument | VerifiedTokenGroupActionWithTokenBalance | VerifiedTokenGroupActionWithTokenIdentityInfo | VerifiedTokenGroupActionWithTokenPricingSchedule | VoteWASM | VerifiedPlatformAddressInfo[] | VerifiedIdentityFullWithAddressInfos | VerifiedIdentityWithAddressInfos | StoredAssetLockInfo | ShieldedNullifier[] | VerifiedShieldedNullifiersWithAddressInfos | VerifiedShieldedNullifiersWithWithdrawalDocument | VerifiedAssetLockConsumedWithAddressInfos | VerifiedIdentityWithShieldedNullifiers;
227
+ export type VerifiedStateTransitionResultVariantsRAW = protocol.DataContractNAPI | protocol.IdentityNAPI | protocol.IdentifierNAPI | protocol.VerifiedIdentityBalanceNAPI | protocol.VerifiedIdentityTokenInfoNAPI | protocol.VerifiedTokenPricingScheduleNAPI | protocol.TokenStatusNAPI | protocol.VerifiedIdentityBalanceNAPI[] | protocol.PartialIdentityNAPI | protocol.VerifiedBalanceTransferNAPI | protocol.VerifiedDocumentNAPI[] | protocol.DocumentNAPI | protocol.VerifiedTokenGroupActionWithDocumentNAPI | protocol.VerifiedTokenGroupActionWithTokenBalanceNAPI | protocol.VerifiedTokenGroupActionWithTokenIdentityInfoNAPI | protocol.VerifiedTokenGroupActionWithTokenPricingScheduleNAPI | protocol.VoteNAPI | protocol.PlatformAddressInfoNAPI[] | protocol.VerifiedIdentityFullWithAddressInfosNAPI | protocol.VerifiedIdentityWithAddressInfosNAPI | protocol.StoredAssetLockInfoNAPI | Array<[Uint8Array, boolean]> | [Array<[Uint8Array, boolean]>, protocol.PlatformAddressInfoNAPI[]] | [Array<[Uint8Array, boolean]>, protocol.VerifiedDocumentNAPI[]] | [protocol.StoredAssetLockInfoNAPI, protocol.PlatformAddressInfoNAPI[]] | [protocol.IdentityNAPI, Array<[Uint8Array, boolean]>];
200
228
  export interface VerifiedStateTransitionResult {
201
229
  rootHash: Uint8Array;
202
230
  result: VerifiedStateTransitionResultVariants;
@@ -243,9 +271,13 @@ export interface IdentityTokenBalance {
243
271
  balance: bigint;
244
272
  id: IdentifierWASM;
245
273
  }
274
+ export interface IdentityTokenBalanceOptional {
275
+ balance?: bigint;
276
+ id: IdentifierWASM;
277
+ }
246
278
  export interface VerifiedTokenBalancesForIdentities {
247
279
  rootHash: Uint8Array;
248
- balances: IdentityTokenBalance[];
280
+ balances: IdentityTokenBalanceOptional[];
249
281
  }
250
282
  export interface TokenContractInfo {
251
283
  contractId: IdentifierWASM;
@@ -269,5 +301,47 @@ export interface VerifiedTokenTotalSupply {
269
301
  }
270
302
  export interface VerifiedTokensBalancesForIdentity {
271
303
  rootHash: Uint8Array;
272
- balances: IdentityTokenBalance[];
304
+ balances: IdentityTokenBalanceOptional[];
305
+ }
306
+ export type VerifiedPlatformAddressInfoWithRootHash = VerifiedPlatformAddressInfo & {
307
+ rootHash: Uint8Array;
308
+ };
309
+ export interface VerifiedPlatformAddressesInfosWithRootHash {
310
+ rootHash: Uint8Array;
311
+ infos: VerifiedPlatformAddressInfo[];
312
+ }
313
+ export interface VerifiedShieldedEncryptedNote {
314
+ cmx: Uint8Array;
315
+ nullifier: Uint8Array;
316
+ cvNet: Uint8Array;
317
+ encryptedNote: Uint8Array;
318
+ }
319
+ export interface VerifiedShieldedEncryptedNotes {
320
+ rootHash: Uint8Array;
321
+ notes: VerifiedShieldedEncryptedNote[];
322
+ totalCount: bigint;
323
+ }
324
+ export interface VerifiedShieldedAnchors {
325
+ rootHash: Uint8Array;
326
+ anchors: Uint8Array[];
327
+ }
328
+ export interface VerifiedMostRecentShieldedAnchor {
329
+ rootHash: Uint8Array;
330
+ anchor?: Uint8Array;
331
+ }
332
+ export interface VerifiedShieldedPoolState {
333
+ rootHash: Uint8Array;
334
+ totalBalance?: bigint;
335
+ }
336
+ export interface VerifiedShieldedNotesCount {
337
+ rootHash: Uint8Array;
338
+ count?: bigint;
339
+ }
340
+ export interface VerifiedShieldedNullifier {
341
+ nullifier: Uint8Array;
342
+ isSpent: boolean;
343
+ }
344
+ export interface VerifiedShieldedNullifiers {
345
+ rootHash: Uint8Array;
346
+ nullifiers: VerifiedShieldedNullifier[];
273
347
  }
@@ -1,5 +1,6 @@
1
- import type { DynamicValue, IdentifierLikeNAPI } from '../../binaries/bindingsTypes.js';
2
- import { IdentifierLike } from './types.js';
1
+ import type { DynamicValue, IdentifierLikeNAPI, PlatformAddressLikeNAPI } from '../../binaries/bindingsTypes.js';
2
+ import { IdentifierLike, PlatformAddressLike } from './types.js';
3
3
  export declare function valueToDynamicValue(value: any): DynamicValue;
4
- export declare function valueFromDynamicValue(dynamicValue: DynamicValue): any;
4
+ export declare function valueFromDynamicValue(dynamicValue: DynamicValue, jsonLike?: boolean): any;
5
5
  export declare function prepareIdentifierValue(identifier: IdentifierLike): IdentifierLikeNAPI;
6
+ export declare function preparePlatformAddressValue(address: PlatformAddressLike): PlatformAddressLikeNAPI;