pshenmic-dpp 2.0.0-dev.26 → 2.0.0-dev.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/binaries/bindingsTypes.d.ts +266 -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/node.cjs +42 -21
- package/dist/binaries/node.d.cts +2 -2
- 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 +17 -0
- package/dist/binaries/pshenmic_dpp.js +1 -1
- package/dist/binaries/wasm/wasmBytes.cjs +1 -1
- package/dist/binaries/wasm.d.ts +17 -0
- package/dist/binaries/wasm.js +1 -1
- package/dist/src/dpp/dpp.d.ts +4 -0
- package/dist/src/dpp/dpp.js +4 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +3 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +6 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +2 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +3 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +3 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +6 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +2 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +3 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.d.ts +2 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.js +3 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +2 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +3 -0
- package/dist/src/dpp/structs/Batch/BatchTransition.d.ts +2 -1
- package/dist/src/dpp/structs/Batch/BatchTransition.js +3 -0
- package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.d.ts +2 -1
- package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.js +3 -0
- package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.d.ts +2 -1
- package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.js +3 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.d.ts +2 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.js +3 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.d.ts +2 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.js +3 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.d.ts +2 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.js +3 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.d.ts +2 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.js +3 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.d.ts +2 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.js +3 -0
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.d.ts +2 -1
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.js +3 -0
- package/dist/src/dpp/structs/PlatformAddress/PlatformAddress.d.ts +9 -1
- package/dist/src/dpp/structs/PlatformAddress/PlatformAddress.js +10 -0
- package/dist/src/dpp/structs/StateTransition.d.ts +2 -1
- package/dist/src/dpp/structs/StateTransition.js +3 -0
- package/dist/src/dpp/types.d.ts +82 -0
- 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/AddressTransitionsFees.spec.ts +274 -0
- package/tests/unit/Shielded.spec.ts +37 -4
- package/tests/unit/StateTransitionFees.spec.ts +177 -0
|
@@ -13,6 +13,16 @@ export declare class ActionTakerNAPI {
|
|
|
13
13
|
get value(): IdentifierNAPI | Array<IdentifierNAPI>;
|
|
14
14
|
set value(value: IdentifierLikeNAPI | Array<IdentifierLikeNAPI>);
|
|
15
15
|
}
|
|
16
|
+
/** How one address's balance changed in a block. */
|
|
17
|
+
export declare class AddressBalanceChangeNAPI {
|
|
18
|
+
get address(): PlatformAddressNAPI;
|
|
19
|
+
/**
|
|
20
|
+
* Either "setCredits", where `credits` is the new balance, or
|
|
21
|
+
* "addToCredits", where `credits` is the amount added to it.
|
|
22
|
+
*/
|
|
23
|
+
get operation(): string;
|
|
24
|
+
get credits(): BigIntString;
|
|
25
|
+
}
|
|
16
26
|
export declare class AddressCreditWithdrawalTransitionNAPI {
|
|
17
27
|
constructor(jsInputs: Array<InputAddressNAPI>, jsFeeStrategy: Array<AddressFundsFeeStrategyStepNAPI>, coreFeePerByte: number, jsPooling: DynamicValue, jsOutputScript: CoreScriptNAPI, userFeeIncrease: number, jsInputWitnesses: Array<AddressWitnessNAPI>, jsOutput?: OutputAddressNAPI | undefined | null);
|
|
18
28
|
get coreFeePerByte(): number;
|
|
@@ -31,6 +41,8 @@ export declare class AddressCreditWithdrawalTransitionNAPI {
|
|
|
31
41
|
set feeStrategy(jsFeeStrategy: Array<AddressFundsFeeStrategyStepNAPI>);
|
|
32
42
|
set userFeeIncrease(userFeeIncrease: number);
|
|
33
43
|
set inputWitness(jsInputWitnesses: Array<AddressWitnessNAPI>);
|
|
44
|
+
static estimateMinFee(jsInputCount: number, jsHasChangeOutput: boolean, jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
45
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
34
46
|
bytes(): Uint8Array;
|
|
35
47
|
hex(): string;
|
|
36
48
|
base64(): string;
|
|
@@ -56,6 +68,7 @@ export declare class AddressFundingFromAssetLockTransitionNAPI {
|
|
|
56
68
|
set feeStrategy(jsFeeStrategy: Array<AddressFundsFeeStrategyStepNAPI>);
|
|
57
69
|
set userFeeIncrease(userFeeIncrease: number);
|
|
58
70
|
set inputWitness(jsInputWitnesses: Array<AddressWitnessNAPI>);
|
|
71
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
59
72
|
bytes(): Uint8Array;
|
|
60
73
|
hex(): string;
|
|
61
74
|
base64(): string;
|
|
@@ -84,6 +97,8 @@ export declare class AddressFundsTransferTransitionNAPI {
|
|
|
84
97
|
set feeStrategy(jsFeeStrategy: Array<AddressFundsFeeStrategyStepNAPI>);
|
|
85
98
|
set userFeeIncrease(userFeeIncrease: number);
|
|
86
99
|
set inputWitness(jsInputWitnesses: Array<AddressWitnessNAPI>);
|
|
100
|
+
static estimateMinFee(jsInputCount: number, jsOutputCount: number, jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
101
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
87
102
|
bytes(): Uint8Array;
|
|
88
103
|
hex(): string;
|
|
89
104
|
base64(): string;
|
|
@@ -148,6 +163,7 @@ export declare class BatchTransitionNAPI {
|
|
|
148
163
|
setIdentityContractNonce(nonce: BigIntString): void;
|
|
149
164
|
toStateTransition(): StateTransitionNAPI;
|
|
150
165
|
static fromStateTransition(stateTransition: StateTransitionNAPI): BatchTransitionNAPI;
|
|
166
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
151
167
|
bytes(): Uint8Array;
|
|
152
168
|
hex(): string;
|
|
153
169
|
base64(): string;
|
|
@@ -155,11 +171,24 @@ export declare class BatchTransitionNAPI {
|
|
|
155
171
|
static fromBase64(base64: string): BatchTransitionNAPI;
|
|
156
172
|
static fromHex(hex: string): BatchTransitionNAPI;
|
|
157
173
|
}
|
|
174
|
+
/** The address balance changes that happened in a single block. */
|
|
175
|
+
export declare class BlockAddressBalanceChangesNAPI {
|
|
176
|
+
get blockHeight(): BigIntString;
|
|
177
|
+
get changes(): Array<AddressBalanceChangeNAPI>;
|
|
178
|
+
}
|
|
158
179
|
export declare class BlockBasedDistributionNAPI {
|
|
159
180
|
interval: BigIntString;
|
|
160
181
|
get function(): DistributionFunctionNAPI;
|
|
161
182
|
set function(distributionFunction: DistributionFunctionNAPI);
|
|
162
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* One add-to-credits operation, kept tagged with the block it happened in so a
|
|
186
|
+
* partially-synced client can tell which additions it has already applied.
|
|
187
|
+
*/
|
|
188
|
+
export declare class BlockHeightCreditNAPI {
|
|
189
|
+
get blockHeight(): BigIntString;
|
|
190
|
+
get credits(): BigIntString;
|
|
191
|
+
}
|
|
163
192
|
export declare class BlockInfoNAPI {
|
|
164
193
|
constructor(timestamp: BigIntString, height: BigIntString, coreBlockHeight: number, jsEpochIndex?: number | undefined | null);
|
|
165
194
|
get timeMs(): BigIntString;
|
|
@@ -244,6 +273,34 @@ export declare class CommitmentTreeNAPI {
|
|
|
244
273
|
*/
|
|
245
274
|
anchor(): Uint8Array;
|
|
246
275
|
}
|
|
276
|
+
/** How one address's balance changed across a compacted range of blocks. */
|
|
277
|
+
export declare class CompactedAddressBalanceChangeNAPI {
|
|
278
|
+
get address(): PlatformAddressNAPI;
|
|
279
|
+
/**
|
|
280
|
+
* Either "setCredits" or "addToCreditsOperations", naming which of the two
|
|
281
|
+
* fields below is populated.
|
|
282
|
+
*/
|
|
283
|
+
get operation(): string;
|
|
284
|
+
/**
|
|
285
|
+
* The final balance, when a set overwrote everything before it in the
|
|
286
|
+
* range.
|
|
287
|
+
*/
|
|
288
|
+
get setCredits(): BigIntString | null;
|
|
289
|
+
/**
|
|
290
|
+
* The individual additions, kept per block rather than summed so a client
|
|
291
|
+
* can apply only the ones past its sync height.
|
|
292
|
+
*/
|
|
293
|
+
get addToCreditsOperations(): Array<BlockHeightCreditNAPI>;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* The compacted changes covering blocks `startBlockHeight` through
|
|
297
|
+
* `endBlockHeight` inclusive.
|
|
298
|
+
*/
|
|
299
|
+
export declare class CompactedBlockAddressBalanceChangesNAPI {
|
|
300
|
+
get startBlockHeight(): BigIntString;
|
|
301
|
+
get endBlockHeight(): BigIntString;
|
|
302
|
+
get changes(): Array<CompactedAddressBalanceChangeNAPI>;
|
|
303
|
+
}
|
|
247
304
|
export declare class ConsensusErrorNAPI {
|
|
248
305
|
static deserialize(error: Uint8Array): ConsensusErrorNAPI;
|
|
249
306
|
get message(): string;
|
|
@@ -285,6 +342,7 @@ export declare class DataContractCreateTransitionNAPI {
|
|
|
285
342
|
static fromBytes(bytes: Uint8Array): DataContractCreateTransitionNAPI;
|
|
286
343
|
static fromHex(hex: string): DataContractCreateTransitionNAPI;
|
|
287
344
|
static fromBase64(base64: string): DataContractCreateTransitionNAPI;
|
|
345
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
288
346
|
bytes(): Uint8Array;
|
|
289
347
|
hex(): string;
|
|
290
348
|
base64(): string;
|
|
@@ -334,6 +392,7 @@ export declare class DataContractUpdateTransitionNAPI {
|
|
|
334
392
|
static fromBytes(bytes: Uint8Array): DataContractUpdateTransitionNAPI;
|
|
335
393
|
static fromHex(hex: string): DataContractUpdateTransitionNAPI;
|
|
336
394
|
static fromBase64(base64: string): DataContractUpdateTransitionNAPI;
|
|
395
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
337
396
|
bytes(): Uint8Array;
|
|
338
397
|
hex(): string;
|
|
339
398
|
base64(): string;
|
|
@@ -551,6 +610,70 @@ export declare class GroupStateTransitionInfoNAPI {
|
|
|
551
610
|
get actionId(): IdentifierNAPI;
|
|
552
611
|
get actionIsProposer(): boolean;
|
|
553
612
|
}
|
|
613
|
+
/**
|
|
614
|
+
* An ancestor of a leaf whose subtree is large enough to hide which leaf was
|
|
615
|
+
* actually wanted.
|
|
616
|
+
*/
|
|
617
|
+
export declare class GroveAncestorNAPI {
|
|
618
|
+
levelsUp: number;
|
|
619
|
+
get count(): BigIntString;
|
|
620
|
+
get key(): Uint8Array;
|
|
621
|
+
get hash(): Uint8Array;
|
|
622
|
+
}
|
|
623
|
+
/** A proven element together with the key it is stored under. */
|
|
624
|
+
export declare class GroveElementEntryNAPI {
|
|
625
|
+
get key(): Uint8Array;
|
|
626
|
+
get element(): GroveElementNAPI;
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* A GroveDB element flattened into a JS-friendly shape.
|
|
630
|
+
*
|
|
631
|
+
* `Element` is a wide enum whose variants carry different combinations of a
|
|
632
|
+
* value, a sum and a count. Rather than model that union in JS, every variant
|
|
633
|
+
* is projected onto the fields it actually populates and identified by `type`,
|
|
634
|
+
* so callers switch on `type` and read the fields it implies.
|
|
635
|
+
*
|
|
636
|
+
* The projection is deliberately lossy: element flags, reference paths, and
|
|
637
|
+
* the structural parameters of the append-only tree variants (chunk power,
|
|
638
|
+
* height) are dropped. The address funds tree stores none of those, so what
|
|
639
|
+
* survives is everything that tree can actually hold.
|
|
640
|
+
*/
|
|
641
|
+
export declare class GroveElementNAPI {
|
|
642
|
+
/** The `Element` variant, e.g. "Item", "SumTree" or "ProvableCountSumTree". */
|
|
643
|
+
get type(): string;
|
|
644
|
+
/**
|
|
645
|
+
* Set when the element was wrapped to opt out of contributing to its
|
|
646
|
+
* parent's aggregates: "NonCounted", "NotSummed" or "NotCountedOrSummed".
|
|
647
|
+
* `type` then describes the wrapped element itself.
|
|
648
|
+
*/
|
|
649
|
+
get wrapper(): string | null;
|
|
650
|
+
/**
|
|
651
|
+
* An item's payload, or a subtree's root key. Absent for an empty subtree,
|
|
652
|
+
* and for variants that carry neither (`Reference`, `SumItem`).
|
|
653
|
+
*/
|
|
654
|
+
get value(): Uint8Array | null;
|
|
655
|
+
/** The sum, for the sum-bearing variants only. */
|
|
656
|
+
get sum(): BigIntString | null;
|
|
657
|
+
/** The element count, for the count-bearing variants only. */
|
|
658
|
+
get count(): BigIntString | null;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* A truncated subtree: the proof stops here, and `hash` is what a follow-up
|
|
662
|
+
* branch proof for this key must reproduce.
|
|
663
|
+
*/
|
|
664
|
+
export declare class GroveLeafInfoNAPI {
|
|
665
|
+
get key(): Uint8Array;
|
|
666
|
+
/**
|
|
667
|
+
* Pass this as `expectedRootHash` when verifying the branch proof for this
|
|
668
|
+
* key.
|
|
669
|
+
*/
|
|
670
|
+
get hash(): Uint8Array;
|
|
671
|
+
/**
|
|
672
|
+
* How many elements the truncated subtree holds. Only the counted tree
|
|
673
|
+
* types carry this.
|
|
674
|
+
*/
|
|
675
|
+
get count(): BigIntString | null;
|
|
676
|
+
}
|
|
554
677
|
export declare class IdentifierNAPI {
|
|
555
678
|
constructor(jsId: DynamicValue);
|
|
556
679
|
base58(): string;
|
|
@@ -576,6 +699,7 @@ export declare class IdentityCreateFromAddressesTransitionNAPI {
|
|
|
576
699
|
set feeStrategy(jsFeeStrategy: Array<AddressFundsFeeStrategyStepNAPI>);
|
|
577
700
|
set userFeeIncrease(userFeeIncrease: number);
|
|
578
701
|
set inputWitness(jsInputWitnesses: Array<AddressWitnessNAPI>);
|
|
702
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
579
703
|
bytes(): Uint8Array;
|
|
580
704
|
hex(): string;
|
|
581
705
|
base64(): string;
|
|
@@ -626,6 +750,7 @@ export declare class IdentityCreateTransitionNAPI {
|
|
|
626
750
|
static default(jsPlatformVersion: DynamicValue): IdentityCreateTransitionNAPI;
|
|
627
751
|
static fromHex(hex: string): IdentityCreateTransitionNAPI;
|
|
628
752
|
static fromBase64(base64: string): IdentityCreateTransitionNAPI;
|
|
753
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
629
754
|
bytes(): Uint8Array;
|
|
630
755
|
static fromBytes(bytes: Uint8Array): IdentityCreateTransitionNAPI;
|
|
631
756
|
get publicKeys(): Array<IdentityPublicKeyInCreationNAPI>;
|
|
@@ -643,6 +768,7 @@ export declare class IdentityCreateTransitionNAPI {
|
|
|
643
768
|
}
|
|
644
769
|
export declare class IdentityCreditTransferNAPI {
|
|
645
770
|
constructor(jsSender: IdentifierLikeNAPI, amount: BigIntString, jsRecipient: IdentifierLikeNAPI, nonce: BigIntString, userFeeIncrease?: number | undefined | null);
|
|
771
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
646
772
|
bytes(): Uint8Array;
|
|
647
773
|
hex(): string;
|
|
648
774
|
base64(): string;
|
|
@@ -681,6 +807,7 @@ export declare class IdentityCreditTransferToAddressesTransitionNAPI {
|
|
|
681
807
|
set userFeeIncrease(userFeeIncrease: number);
|
|
682
808
|
set signaturePublicKeyId(keyId: number);
|
|
683
809
|
set signature(signature: Uint8Array);
|
|
810
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
684
811
|
bytes(): Uint8Array;
|
|
685
812
|
hex(): string;
|
|
686
813
|
base64(): string;
|
|
@@ -716,6 +843,7 @@ export declare class IdentityCreditWithdrawalTransitionNAPI {
|
|
|
716
843
|
set signaturePublicKeyId(signaturePublicKeyId: number);
|
|
717
844
|
static fromHex(hex: string): IdentityCreditWithdrawalTransitionNAPI;
|
|
718
845
|
static fromBase64(base64: string): IdentityCreditWithdrawalTransitionNAPI;
|
|
846
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
719
847
|
bytes(): Uint8Array;
|
|
720
848
|
hex(): string;
|
|
721
849
|
base64(): string;
|
|
@@ -823,6 +951,7 @@ export declare class IdentityTopUpFromAddressesTransitionNAPI {
|
|
|
823
951
|
set feeStrategy(jsFeeStrategy: Array<AddressFundsFeeStrategyStepNAPI>);
|
|
824
952
|
set userFeeIncrease(userFeeIncrease: number);
|
|
825
953
|
set inputWitness(jsInputWitnesses: Array<AddressWitnessNAPI>);
|
|
954
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
826
955
|
bytes(): Uint8Array;
|
|
827
956
|
hex(): string;
|
|
828
957
|
base64(): string;
|
|
@@ -845,6 +974,7 @@ export declare class IdentityTopUpTransitionNAPI {
|
|
|
845
974
|
get signature(): Uint8Array;
|
|
846
975
|
getSignableBytes(): Uint8Array;
|
|
847
976
|
set signature(signature: Uint8Array);
|
|
977
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
848
978
|
bytes(): Uint8Array;
|
|
849
979
|
hex(): string;
|
|
850
980
|
base64(): string;
|
|
@@ -878,6 +1008,7 @@ export declare class IdentityUpdateTransitionNAPI {
|
|
|
878
1008
|
set signaturePublicKeyId(signaturePublicKeyId: number);
|
|
879
1009
|
static fromHex(hex: string): IdentityUpdateTransitionNAPI;
|
|
880
1010
|
static fromBase64(base64: string): IdentityUpdateTransitionNAPI;
|
|
1011
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
881
1012
|
bytes(): Uint8Array;
|
|
882
1013
|
hex(): string;
|
|
883
1014
|
base64(): string;
|
|
@@ -936,6 +1067,7 @@ export declare class MasternodeVoteTransitionNAPI {
|
|
|
936
1067
|
set signature(signature: Uint8Array);
|
|
937
1068
|
static fromHex(hex: string): MasternodeVoteTransitionNAPI;
|
|
938
1069
|
static fromBase64(base64: string): MasternodeVoteTransitionNAPI;
|
|
1070
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
939
1071
|
bytes(): Uint8Array;
|
|
940
1072
|
hex(): string;
|
|
941
1073
|
base64(): string;
|
|
@@ -1039,6 +1171,17 @@ export declare class PlatformAddressInfoNAPI {
|
|
|
1039
1171
|
export declare class PlatformAddressNAPI {
|
|
1040
1172
|
constructor(address: PlatformAddressLikeNAPI);
|
|
1041
1173
|
bytes(): Uint8Array;
|
|
1174
|
+
/**
|
|
1175
|
+
* Storage fee GroveDB charges for creating balance entries for addresses that are not in
|
|
1176
|
+
* state yet.
|
|
1177
|
+
*
|
|
1178
|
+
* Minimum fees price a transition as if every one of its outputs pays a fresh address, but
|
|
1179
|
+
* the fee actually charged is metered: paying an address that already exists writes no new
|
|
1180
|
+
* bytes and costs (close to) nothing in storage, while every address created costs
|
|
1181
|
+
* `PLATFORM_ADDRESS_STORAGE_BYTES` at the disk rate. Add this to a processing estimate when
|
|
1182
|
+
* you know how many of your outputs are new.
|
|
1183
|
+
*/
|
|
1184
|
+
static estimateStorageFeeForNewAddresses(jsAddressCount: number, jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
1042
1185
|
toAddress(jsNetwork: DynamicValue): string;
|
|
1043
1186
|
toBech32m(jsNetwork: DynamicValue): string;
|
|
1044
1187
|
isP2PKH(): boolean;
|
|
@@ -1359,6 +1502,15 @@ export declare class StateTransitionNAPI {
|
|
|
1359
1502
|
static fromBase64(base64: string): StateTransitionNAPI;
|
|
1360
1503
|
hash(skipSignature: boolean): string;
|
|
1361
1504
|
getActionName(): string;
|
|
1505
|
+
/**
|
|
1506
|
+
* The minimum fee the network requires for this transition to be accepted.
|
|
1507
|
+
*
|
|
1508
|
+
* This is the same value the node checks the payer balance against before execution.
|
|
1509
|
+
* The fee actually charged is metered during execution and depends on state (for
|
|
1510
|
+
* example, paying an address that does not exist yet adds storage cost), so it can
|
|
1511
|
+
* be higher than this minimum.
|
|
1512
|
+
*/
|
|
1513
|
+
calculateMinRequiredFee(jsPlatformVersion?: PlatformVersionNAPI | undefined | null): BigIntString;
|
|
1362
1514
|
getActionType(): string;
|
|
1363
1515
|
getActionTypeNumber(): number;
|
|
1364
1516
|
getOwnerId(): IdentifierNAPI | null;
|
|
@@ -1764,6 +1916,80 @@ export declare class UnshieldTransitionNAPI {
|
|
|
1764
1916
|
toStateTransition(): StateTransitionNAPI;
|
|
1765
1917
|
static fromStateTransition(st: StateTransitionNAPI): UnshieldTransitionNAPI;
|
|
1766
1918
|
}
|
|
1919
|
+
/**
|
|
1920
|
+
* The verified subtree returned by a branch chunk proof.
|
|
1921
|
+
*
|
|
1922
|
+
* A branch proof is checked against the hash its parent trunk (or branch)
|
|
1923
|
+
* proof published for this key, so it carries no root hash of its own: the
|
|
1924
|
+
* chain back to the platform root is what the parent already established.
|
|
1925
|
+
*/
|
|
1926
|
+
export declare class VerifiedAddressesBranchStateNAPI {
|
|
1927
|
+
/** The elements proven by this branch, keyed by their tree key. */
|
|
1928
|
+
get elements(): Array<GroveElementEntryNAPI>;
|
|
1929
|
+
/**
|
|
1930
|
+
* Subtrees this branch in turn stops at, for going a level deeper. Empty
|
|
1931
|
+
* when the branch returned its whole subtree.
|
|
1932
|
+
*/
|
|
1933
|
+
get leafKeys(): Array<GroveLeafInfoNAPI>;
|
|
1934
|
+
/**
|
|
1935
|
+
* This subtree's root hash, matching the `expectedRootHash` it was
|
|
1936
|
+
* verified against.
|
|
1937
|
+
*/
|
|
1938
|
+
get branchRootHash(): Uint8Array;
|
|
1939
|
+
/**
|
|
1940
|
+
* Which truncated subtree below this branch would contain `key`.
|
|
1941
|
+
*
|
|
1942
|
+
* Returns `undefined` when the key is already among `elements`, or when no
|
|
1943
|
+
* subtree could hold it.
|
|
1944
|
+
*/
|
|
1945
|
+
traceKeyToLeaf(key: Uint8Array): GroveLeafInfoNAPI | null;
|
|
1946
|
+
/**
|
|
1947
|
+
* Walks up from `leafKey` to the nearest ancestor holding at least
|
|
1948
|
+
* `minPrivacyTreeCount` elements. See the trunk equivalent for details.
|
|
1949
|
+
*/
|
|
1950
|
+
getAncestor(leafKey: Uint8Array, minPrivacyTreeCount: BigIntString): GroveAncestorNAPI | null;
|
|
1951
|
+
}
|
|
1952
|
+
/**
|
|
1953
|
+
* The verified trunk of the address funds tree.
|
|
1954
|
+
*
|
|
1955
|
+
* A trunk proof covers the top of the tree only; subtrees below it are
|
|
1956
|
+
* truncated and listed in `leafKeys`. Use `traceKeyToLeaf` to find which
|
|
1957
|
+
* truncated subtree holds a given address, then fetch that subtree with a
|
|
1958
|
+
* branch query.
|
|
1959
|
+
*/
|
|
1960
|
+
export declare class VerifiedAddressesTrunkStateNAPI {
|
|
1961
|
+
rootHash: Uint8Array;
|
|
1962
|
+
/** The elements proven by the trunk, keyed by their tree key. */
|
|
1963
|
+
get elements(): Array<GroveElementEntryNAPI>;
|
|
1964
|
+
/**
|
|
1965
|
+
* The subtrees the trunk stops at. Empty when the whole tree fit in the
|
|
1966
|
+
* trunk.
|
|
1967
|
+
*/
|
|
1968
|
+
get leafKeys(): Array<GroveLeafInfoNAPI>;
|
|
1969
|
+
/**
|
|
1970
|
+
* Depths to split subsequent branch queries into, e.g. `[7, 7, 6]` for a
|
|
1971
|
+
* tree of depth 20.
|
|
1972
|
+
*/
|
|
1973
|
+
get chunkDepths(): Array<number>;
|
|
1974
|
+
/** The tree's total depth, derived from its element count. */
|
|
1975
|
+
get maxTreeDepth(): number;
|
|
1976
|
+
/**
|
|
1977
|
+
* Which truncated subtree would contain `key`.
|
|
1978
|
+
*
|
|
1979
|
+
* Returns `undefined` when the key is already among `elements`, or when no
|
|
1980
|
+
* subtree could hold it.
|
|
1981
|
+
*/
|
|
1982
|
+
traceKeyToLeaf(key: Uint8Array): GroveLeafInfoNAPI | null;
|
|
1983
|
+
/**
|
|
1984
|
+
* Walks up from `leafKey` to the nearest ancestor holding at least
|
|
1985
|
+
* `minPrivacyTreeCount` elements, so a branch query can request a subtree
|
|
1986
|
+
* large enough not to reveal which leaf was wanted.
|
|
1987
|
+
*
|
|
1988
|
+
* Never returns the root, and returns `undefined` when the leaf has no
|
|
1989
|
+
* ancestor above it.
|
|
1990
|
+
*/
|
|
1991
|
+
getAncestor(leafKey: Uint8Array, minPrivacyTreeCount: BigIntString): GroveAncestorNAPI | null;
|
|
1992
|
+
}
|
|
1767
1993
|
export declare class VerifiedBalanceTransferNAPI {
|
|
1768
1994
|
get sender(): PartialIdentityNAPI;
|
|
1769
1995
|
get recipient(): PartialIdentityNAPI;
|
|
@@ -1850,6 +2076,16 @@ export declare class VerifiedPlatformAddressInfoNAPI {
|
|
|
1850
2076
|
balance?: BigIntString;
|
|
1851
2077
|
get address(): PlatformAddressNAPI | null;
|
|
1852
2078
|
}
|
|
2079
|
+
export declare class VerifiedRecentAddressBalanceChangesNAPI {
|
|
2080
|
+
rootHash: Uint8Array;
|
|
2081
|
+
/** The proven blocks, in ascending block-height order. */
|
|
2082
|
+
get blocks(): Array<BlockAddressBalanceChangesNAPI>;
|
|
2083
|
+
}
|
|
2084
|
+
export declare class VerifiedRecentCompactedAddressBalanceChangesNAPI {
|
|
2085
|
+
rootHash: Uint8Array;
|
|
2086
|
+
/** The proven compacted ranges, in ascending block-height order. */
|
|
2087
|
+
get ranges(): Array<CompactedBlockAddressBalanceChangesNAPI>;
|
|
2088
|
+
}
|
|
1853
2089
|
export declare class VerifiedShieldedAnchorsNAPI {
|
|
1854
2090
|
rootHash: Uint8Array;
|
|
1855
2091
|
get anchors(): Array<Uint8Array>;
|
|
@@ -2167,7 +2403,18 @@ export declare enum TokenEmergencyActionNAPI {
|
|
|
2167
2403
|
Pause = 0,
|
|
2168
2404
|
Resume = 1
|
|
2169
2405
|
}
|
|
2406
|
+
/**
|
|
2407
|
+
* Verifies a branch chunk proof for the address funds tree.
|
|
2408
|
+
*
|
|
2409
|
+
* `expectedRootHash` must be the `hash` the parent trunk/branch proof reported
|
|
2410
|
+
* for `key`; without it the branch is unanchored and proves nothing.
|
|
2411
|
+
*
|
|
2412
|
+
* `depth` is validated upstream against an allowed range, so take it from the
|
|
2413
|
+
* parent trunk's `chunkDepths` rather than picking a value.
|
|
2414
|
+
*/
|
|
2415
|
+
export declare function verifyAddressesBranchState(proof: Uint8Array, key: Uint8Array, depth: number, expectedRootHash: Uint8Array, jsPlatformVersion: DynamicValue): VerifiedAddressesBranchStateNAPI;
|
|
2170
2416
|
export declare function verifyAddressesInfos(proof: Uint8Array, jsPlatformAddresses: Array<PlatformAddressLikeNAPI>, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedPlatformAddressesInfosNAPI;
|
|
2417
|
+
export declare function verifyAddressesTrunkState(proof: Uint8Array, jsPlatformVersion: DynamicValue): VerifiedAddressesTrunkStateNAPI;
|
|
2171
2418
|
export declare function verifyAddressInfo(proof: Uint8Array, jsPlatformAddress: PlatformAddressLikeNAPI, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedPlatformAddressInfoNAPI;
|
|
2172
2419
|
export declare function verifyContractProof(proof: Uint8Array, contractKnownKeepsHistory: boolean | undefined | null, isProofSubset: boolean, inMultipleContractProofForm: boolean, jsContractId: IdentifierLikeNAPI, jsPlatformVersion: DynamicValue): VerifiedContractNAPI;
|
|
2173
2420
|
export declare function verifyDocumentsProof(proof: Uint8Array, contract: DataContractNAPI, documentTypeName: string, jsWhereClauses: DynamicValue, jsOrderBy: Array<Array<string>>, limit: number | undefined | null, jsStartAt: IdentifierLikeNAPI | undefined | null, startAtIncluded: boolean, blockTimeMs: BigIntString | undefined | null, jsPlatformVersion: DynamicValue): VerifiedDocumentsNAPI;
|
|
@@ -2181,6 +2428,25 @@ export declare function verifyIdentityContractNonceProof(proof: Uint8Array, jsId
|
|
|
2181
2428
|
export declare function verifyIdentityKeysByIdentifierProof(proof: Uint8Array, jsIdentityId: IdentifierLikeNAPI, specificKeyIds: Array<number> | undefined | null, withRevision: boolean, withBalance: boolean, isProofSubset: boolean, limit: number | undefined | null, offset: number | undefined | null, jsPlatformVersion: DynamicValue): VerifiedIdentityKeysByIdentifierNAPI;
|
|
2182
2429
|
export declare function verifyIdentityNonceProof(proof: Uint8Array, jsIdentityId: IdentifierLikeNAPI, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedIdentityNonceNAPI;
|
|
2183
2430
|
export declare function verifyMostRecentShieldedAnchorProof(proof: Uint8Array, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedMostRecentShieldedAnchorNAPI;
|
|
2431
|
+
/**
|
|
2432
|
+
* Verifies a proof of the address balance changes from a block height onwards.
|
|
2433
|
+
*
|
|
2434
|
+
* `startHeightExclusive` mirrors the request flag of the same name: when
|
|
2435
|
+
* false the proof is a `RangeFrom` starting at `startBlockHeight`, when true a
|
|
2436
|
+
* `RangeAfter` starting just past it. It must match what was asked for, since
|
|
2437
|
+
* the two produce different queries and so different proofs.
|
|
2438
|
+
*/
|
|
2439
|
+
export declare function verifyRecentAddressBalanceChanges(proof: Uint8Array, startBlockHeight: BigIntString, startHeightExclusive: boolean, limit: number | undefined | null, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedRecentAddressBalanceChangesNAPI;
|
|
2440
|
+
/**
|
|
2441
|
+
* Verifies a proof of the compacted address balance changes from a block
|
|
2442
|
+
* height onwards.
|
|
2443
|
+
*
|
|
2444
|
+
* Unlike the uncompacted query there is no subset flag: the proof is a
|
|
2445
|
+
* self-contained envelope whose predecessor half authenticates which range
|
|
2446
|
+
* covers the requested height, so the forward half has nothing to be a subset
|
|
2447
|
+
* of.
|
|
2448
|
+
*/
|
|
2449
|
+
export declare function verifyRecentCompactedAddressBalanceChanges(proof: Uint8Array, startBlockHeight: BigIntString, limit: number | undefined | null, jsPlatformVersion: DynamicValue): VerifiedRecentCompactedAddressBalanceChangesNAPI;
|
|
2184
2450
|
export declare function verifyShieldedAnchorsProof(proof: Uint8Array, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedShieldedAnchorsNAPI;
|
|
2185
2451
|
export declare function verifyShieldedEncryptedNotesProof(proof: Uint8Array, startIndex: BigIntString, count: number, maxElements: number, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedShieldedEncryptedNotesNAPI;
|
|
2186
2452
|
export declare function verifyShieldedNotesCountProof(proof: Uint8Array, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedShieldedNotesCountNAPI;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/binaries/node.cjs
CHANGED
|
@@ -3,10 +3,17 @@ const path = require('node:path');
|
|
|
3
3
|
function isMusl() {
|
|
4
4
|
if (process.platform !== 'linux')
|
|
5
5
|
return false;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
try {
|
|
7
|
+
const report = process.report?.getReport?.();
|
|
8
|
+
return !report?.header?.glibcVersionRuntime;
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
// getReport() is unavailable in some embedders/worker contexts; assume
|
|
12
|
+
// glibc, and let the require below fall back to WebAssembly if wrong.
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
8
15
|
}
|
|
9
|
-
function
|
|
16
|
+
function getTarget() {
|
|
10
17
|
const platform = process.platform;
|
|
11
18
|
const arch = process.arch;
|
|
12
19
|
let target = '';
|
|
@@ -24,27 +31,41 @@ function getBinaryPath() {
|
|
|
24
31
|
target = `x86_64-unknown-linux-${libc}`;
|
|
25
32
|
}
|
|
26
33
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
else if (platform === 'win32') {
|
|
35
|
+
if (arch === 'arm64') {
|
|
36
|
+
target = 'aarch64-pc-windows-msvc';
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
target = 'x86_64-pc-windows-msvc';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
35
42
|
else {
|
|
36
43
|
console.error(`Unsupported platform: ${platform} ${arch}. Using WebAssembly instead Node-API`);
|
|
37
44
|
return null;
|
|
38
45
|
}
|
|
39
|
-
|
|
40
|
-
return path.join('native', target, 'pshenmic_dpp.node');
|
|
41
|
-
}
|
|
42
|
-
const binaryPath = getBinaryPath();
|
|
43
|
-
let exportedModule;
|
|
44
|
-
if (binaryPath !== null) {
|
|
45
|
-
exportedModule = require(`./${binaryPath}`);
|
|
46
|
+
return target;
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
// The native addon can be unusable even on a supported platform: the binary may
|
|
49
|
+
// be missing from the package, built for another libc/arch, or fail to link
|
|
50
|
+
// against a system dependency (e.g. the VC++ runtime on Windows). None of that
|
|
51
|
+
// should be fatal — WebAssembly is a complete fallback, so any load failure
|
|
52
|
+
// degrades to it instead of taking the whole import down.
|
|
53
|
+
function loadNative() {
|
|
54
|
+
const target = getTarget();
|
|
55
|
+
if (target === null) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
const nativeModule = require(`./${path.join('native', target, 'pshenmic_dpp.node')}`);
|
|
60
|
+
console.log(`running on native dpp (${target})`);
|
|
61
|
+
return nativeModule;
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
// Only the first line: node appends a multi-line "Require stack" to
|
|
65
|
+
// MODULE_NOT_FOUND messages, which buries the actual reason.
|
|
66
|
+
const reason = String(error?.message ?? error).split('\n')[0];
|
|
67
|
+
console.error(`Failed to load native dpp (${target}): ${reason}. Using WebAssembly instead Node-API`);
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
49
70
|
}
|
|
50
|
-
module.exports =
|
|
71
|
+
module.exports = loadNative() ?? require('./wasmCreation.cjs');
|
package/dist/binaries/node.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const _exports: any;
|
|
2
|
+
export = _exports;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export const orchardOvkFromSeed: any;
|
|
2
2
|
export const recoverNotes: any;
|
|
3
|
+
export const verifyAddressesBranchState: any;
|
|
3
4
|
export const verifyAddressesInfos: any;
|
|
5
|
+
export const verifyAddressesTrunkState: any;
|
|
4
6
|
export const verifyAddressInfo: any;
|
|
5
7
|
export const verifyContractProof: any;
|
|
6
8
|
export const verifyDocumentsProof: any;
|
|
@@ -14,6 +16,8 @@ export const verifyIdentityContractNonceProof: any;
|
|
|
14
16
|
export const verifyIdentityKeysByIdentifierProof: any;
|
|
15
17
|
export const verifyIdentityNonceProof: any;
|
|
16
18
|
export const verifyMostRecentShieldedAnchorProof: any;
|
|
19
|
+
export const verifyRecentAddressBalanceChanges: any;
|
|
20
|
+
export const verifyRecentCompactedAddressBalanceChanges: any;
|
|
17
21
|
export const verifyShieldedAnchorsProof: any;
|
|
18
22
|
export const verifyShieldedEncryptedNotesProof: any;
|
|
19
23
|
export const verifyShieldedNotesCountProof: any;
|
|
@@ -29,6 +33,7 @@ export const verifyTokenTotalSupplyProof: any;
|
|
|
29
33
|
export const verifyTotalCreditsProof: any;
|
|
30
34
|
export const verifyVotePollVoteStateProof: any;
|
|
31
35
|
export const ActionTakerNAPI: any;
|
|
36
|
+
export const AddressBalanceChangeNAPI: any;
|
|
32
37
|
export const AddressCreditWithdrawalTransitionNAPI: any;
|
|
33
38
|
export const AddressFundingFromAssetLockTransitionNAPI: any;
|
|
34
39
|
export const AddressFundsFeeStrategyStepNAPI: any;
|
|
@@ -39,11 +44,15 @@ export const AssetLockValueNAPI: any;
|
|
|
39
44
|
export const AuthorizedActionTakersNAPI: any;
|
|
40
45
|
export const BatchedTransitionNAPI: any;
|
|
41
46
|
export const BatchTransitionNAPI: any;
|
|
47
|
+
export const BlockAddressBalanceChangesNAPI: any;
|
|
42
48
|
export const BlockBasedDistributionNAPI: any;
|
|
49
|
+
export const BlockHeightCreditNAPI: any;
|
|
43
50
|
export const BlockInfoNAPI: any;
|
|
44
51
|
export const ChainAssetLockProofNAPI: any;
|
|
45
52
|
export const ChangeControlRulesNAPI: any;
|
|
46
53
|
export const CommitmentTreeNAPI: any;
|
|
54
|
+
export const CompactedAddressBalanceChangeNAPI: any;
|
|
55
|
+
export const CompactedBlockAddressBalanceChangesNAPI: any;
|
|
47
56
|
export const ConsensusErrorNAPI: any;
|
|
48
57
|
export const ContenderWithSerializedDocumentNAPI: any;
|
|
49
58
|
export const ContestedDocumentVotePollQueryExecutionResultNAPI: any;
|
|
@@ -68,6 +77,10 @@ export const ExtendedEpochInfoNAPI: any;
|
|
|
68
77
|
export const FinalizedEpochInfoNAPI: any;
|
|
69
78
|
export const GroupNAPI: any;
|
|
70
79
|
export const GroupStateTransitionInfoNAPI: any;
|
|
80
|
+
export const GroveAncestorNAPI: any;
|
|
81
|
+
export const GroveElementEntryNAPI: any;
|
|
82
|
+
export const GroveElementNAPI: any;
|
|
83
|
+
export const GroveLeafInfoNAPI: any;
|
|
71
84
|
export const IdentifierNAPI: any;
|
|
72
85
|
export const IdentityCreateFromAddressesTransitionNAPI: any;
|
|
73
86
|
export const IdentityCreateFromShieldedPoolResultNAPI: any;
|
|
@@ -152,6 +165,8 @@ export const TransactionNAPI: any;
|
|
|
152
165
|
export const TxInNAPI: any;
|
|
153
166
|
export const TxOutNAPI: any;
|
|
154
167
|
export const UnshieldTransitionNAPI: any;
|
|
168
|
+
export const VerifiedAddressesBranchStateNAPI: any;
|
|
169
|
+
export const VerifiedAddressesTrunkStateNAPI: any;
|
|
155
170
|
export const VerifiedBalanceTransferNAPI: any;
|
|
156
171
|
export const VerifiedContractNAPI: any;
|
|
157
172
|
export const VerifiedDocumentNAPI: any;
|
|
@@ -171,6 +186,8 @@ export const VerifiedIdentityWithAddressInfosNAPI: any;
|
|
|
171
186
|
export const VerifiedMostRecentShieldedAnchorNAPI: any;
|
|
172
187
|
export const VerifiedPlatformAddressesInfosNAPI: any;
|
|
173
188
|
export const VerifiedPlatformAddressInfoNAPI: any;
|
|
189
|
+
export const VerifiedRecentAddressBalanceChangesNAPI: any;
|
|
190
|
+
export const VerifiedRecentCompactedAddressBalanceChangesNAPI: any;
|
|
174
191
|
export const VerifiedShieldedAnchorsNAPI: any;
|
|
175
192
|
export const VerifiedShieldedEncryptedNoteNAPI: any;
|
|
176
193
|
export const VerifiedShieldedEncryptedNotesNAPI: any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import { requireNodeAddon } from 'react-native-node-api';
|
|
3
|
-
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 } = requireNodeAddon('./pshenmic-dpp--pshenmic_dpp');
|
|
3
|
+
export const { orchardOvkFromSeed, recoverNotes, verifyAddressesBranchState, verifyAddressesInfos, verifyAddressesTrunkState, verifyAddressInfo, verifyContractProof, verifyDocumentsProof, verifyEpochsInfoProof, verifyFinalizedEpochInfosProof, verifyIdentifierByNonUniquePublicKeyHashProof, verifyIdentityBalanceProof, verifyIdentityByIdentifierProof, verifyIdentityByUniqueKeyHashProof, verifyIdentityContractNonceProof, verifyIdentityKeysByIdentifierProof, verifyIdentityNonceProof, verifyMostRecentShieldedAnchorProof, verifyRecentAddressBalanceChanges, verifyRecentCompactedAddressBalanceChanges, verifyShieldedAnchorsProof, verifyShieldedEncryptedNotesProof, verifyShieldedNotesCountProof, verifyShieldedNullifiersProof, verifyShieldedPoolStateProof, verifySignatureDigest, verifyStateTransitionResult, verifyTokenBalancesForIdentitiesProof, verifyTokenContractInfoProof, verifyTokenDirectPurchasePrices, verifyTokensBalancesForIdentityProof, verifyTokenTotalSupplyProof, verifyTotalCreditsProof, verifyVotePollVoteStateProof, ActionTakerNAPI, AddressBalanceChangeNAPI, AddressCreditWithdrawalTransitionNAPI, AddressFundingFromAssetLockTransitionNAPI, AddressFundsFeeStrategyStepNAPI, AddressFundsTransferTransitionNAPI, AddressWitnessNAPI, AssetLockProofNAPI, AssetLockValueNAPI, AuthorizedActionTakersNAPI, BatchedTransitionNAPI, BatchTransitionNAPI, BlockAddressBalanceChangesNAPI, BlockBasedDistributionNAPI, BlockHeightCreditNAPI, BlockInfoNAPI, ChainAssetLockProofNAPI, ChangeControlRulesNAPI, CommitmentTreeNAPI, CompactedAddressBalanceChangeNAPI, CompactedBlockAddressBalanceChangesNAPI, ConsensusErrorNAPI, ContenderWithSerializedDocumentNAPI, ContestedDocumentVotePollQueryExecutionResultNAPI, ContractBoundsNAPI, CoreScriptNAPI, DataContractCreateTransitionNAPI, DataContractNAPI, DataContractUpdateTransitionNAPI, DistributionFunctionNAPI, DocumentBaseTransitionNAPI, DocumentCreateTransitionNAPI, DocumentDeleteTransitionNAPI, DocumentNAPI, DocumentPurchaseTransitionNAPI, DocumentReplaceTransitionNAPI, DocumentTransferTransitionNAPI, DocumentTransitionNAPI, DocumentUpdatePriceTransitionNAPI, DynamicValue, EpochBasedDistributionNAPI, ExtendedEpochInfoNAPI, FinalizedEpochInfoNAPI, GroupNAPI, GroupStateTransitionInfoNAPI, GroveAncestorNAPI, GroveElementEntryNAPI, GroveElementNAPI, GroveLeafInfoNAPI, IdentifierNAPI, IdentityCreateFromAddressesTransitionNAPI, IdentityCreateFromShieldedPoolResultNAPI, IdentityCreateFromShieldedPoolTransitionNAPI, IdentityCreateTransitionNAPI, IdentityCreditTransferNAPI, IdentityCreditTransferToAddressesTransitionNAPI, IdentityCreditWithdrawalTransitionNAPI, IdentityNAPI, IdentityPublicKeyInCreationNAPI, IdentityPublicKeyNAPI, IdentityTokenBalanceNAPI, IdentityTokenBalanceOptionalNAPI, IdentityTokenInfoNAPI, IdentityTopUpFromAddressesTransitionNAPI, IdentityTopUpTransitionNAPI, IdentityUpdateTransitionNAPI, InputAddressNAPI, InstantAssetLockProofNAPI, InstantLockNAPI, MasternodeVoteTransitionNAPI, MerklePathNAPI, NoteNAPI, OrchardAddressNAPI, OrchardProverNAPI, OutPointNAPI, OutputAddressNAPI, OutputAddressNullableCreditsNAPI, PartialIdentityNAPI, PlatformAddressInfoNAPI, PlatformAddressNAPI, PrefundedVotingBalanceNAPI, PrivateEncryptedNoteNAPI, PrivateKeyNAPI, PublicKeyNAPI, RecoveredNoteNAPI, ResourceVoteChoiceNAPI, RewardDistributionTypeNAPI, SerializedActionNAPI, SharedEncryptedNoteNAPI, ShieldedBuilderNAPI, ShieldedMemoNAPI, ShieldedTransferTransitionNAPI, ShieldedWithdrawalResultNAPI, ShieldedWithdrawalTransitionNAPI, ShieldFromAssetLockTransitionNAPI, ShieldTransitionNAPI, SpendableNoteNAPI, StateTransitionNAPI, StoredAssetLockInfoNAPI, TimeBasedDistributionNAPI, TokenBaseTransitionNAPI, TokenBurnTransitionNAPI, TokenClaimTransitionNAPI, TokenConfigUpdateTransitionNAPI, TokenConfigurationChangeItemNAPI, TokenConfigurationConventionNAPI, TokenConfigurationLocalizationNAPI, TokenConfigurationNAPI, TokenContractInfoNAPI, TokenDestroyFrozenFundsTransitionNAPI, TokenDirectPurchaseTransitionNAPI, TokenDistributionRecipientNAPI, TokenDistributionRulesNAPI, TokenEmergencyActionTransitionNAPI, TokenFreezeTransitionNAPI, TokenKeepsHistoryRulesNAPI, TokenMarketplaceRulesNAPI, TokenMintTransitionNAPI, TokenPaymentInfoNAPI, TokenPerpetualDistributionNAPI, TokenPreProgrammedDistributionNAPI, TokenPricingScheduleNAPI, TokenSetPriceForDirectPurchaseTransitionNAPI, TokenStatusNAPI, TokenTradeModeNAPI, TokenTransferTransitionNAPI, TokenTransitionNAPI, TokenUnFreezeTransitionNAPI, TotalSingleTokenBalanceNAPI, TransactionNAPI, TxInNAPI, TxOutNAPI, UnshieldTransitionNAPI, VerifiedAddressesBranchStateNAPI, VerifiedAddressesTrunkStateNAPI, VerifiedBalanceTransferNAPI, VerifiedContractNAPI, VerifiedDocumentNAPI, VerifiedDocumentsNAPI, VerifiedEpochsInfoNAPI, VerifiedFinlizedEpochInfosNAPI, VerifiedIdentifierByNonUniquePublicKeyHashNAPI, VerifiedIdentityBalanceRootHashNAPI, VerifiedIdentityByIdentifierNAPI, VerifiedIdentityByUniqueKeyHashNAPI, VerifiedIdentityContractNonceNAPI, VerifiedIdentityFullWithAddressInfosNAPI, VerifiedIdentityKeysByIdentifierNAPI, VerifiedIdentityNonceNAPI, VerifiedIdentityTokenInfoNAPI, VerifiedIdentityWithAddressInfosNAPI, VerifiedMostRecentShieldedAnchorNAPI, VerifiedPlatformAddressesInfosNAPI, VerifiedPlatformAddressInfoNAPI, VerifiedRecentAddressBalanceChangesNAPI, VerifiedRecentCompactedAddressBalanceChangesNAPI, VerifiedShieldedAnchorsNAPI, VerifiedShieldedEncryptedNoteNAPI, VerifiedShieldedEncryptedNotesNAPI, VerifiedShieldedNotesCountNAPI, VerifiedShieldedNullifierNAPI, VerifiedShieldedNullifiersNAPI, VerifiedShieldedPoolStateNAPI, VerifiedStateTransitionResultNAPI, VerifiedTokenBalancesForIdentitiesNAPI, VerifiedTokenContractInfoNAPI, VerifiedTokenDirectPurchasePricesNAPI, VerifiedTokenGroupActionWithDocumentNAPI, VerifiedTokenGroupActionWithTokenBalanceNAPI, VerifiedTokenGroupActionWithTokenIdentityInfoNAPI, VerifiedTokenGroupActionWithTokenPricingScheduleNAPI, VerifiedTokenPricingScheduleNAPI, VerifiedTokensBalancesForIdentityNAPI, VerifiedTokenTotalSupplyNAPI, VerifiedTotalCreditsNAPI, VerifiedVoteStateNAPI, VoteNAPI, VotePollNAPI, WitnessNAPI, ActionGoalNAPI, AssetLockProofTypeNAPI, BatchTypeNAPI, GasFeesPaidByNAPI, GroupActionStatusNAPI, KeyTypeNAPI, NetworkNAPI, PlatformVersionNAPI, PoolingNAPI, PurposeNAPI, SecurityLevelNAPI, TokenDistributionTypeNAPI, TokenEmergencyActionNAPI, VoteStateResultTypeNAPI } = requireNodeAddon('./pshenmic-dpp--pshenmic_dpp');
|