pshenmic-dpp 2.0.0-dev.25 → 2.0.0-dev.27
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 +51 -1
- package/dist/binaries/bindingsTypes.js +1 -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/wasm/wasmBytes.cjs +1 -1
- 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/Orchard/RecoveredNote.d.ts +1 -0
- package/dist/src/dpp/structs/Orchard/RecoveredNote.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/ShieldedTransitions/IdentityCreateFromShieldedPoolTransition.d.ts +2 -1
- package/dist/src/dpp/structs/ShieldedTransitions/IdentityCreateFromShieldedPoolTransition.js +3 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldFromAssetLockTransition.d.ts +2 -1
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldFromAssetLockTransition.js +3 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldTransition.d.ts +2 -1
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldTransition.js +3 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedTransferTransition.d.ts +2 -1
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedTransferTransition.js +3 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedWithdrawalTransition.d.ts +2 -1
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedWithdrawalTransition.js +3 -0
- package/dist/src/dpp/structs/ShieldedTransitions/UnshieldTransition.d.ts +2 -1
- package/dist/src/dpp/structs/ShieldedTransitions/UnshieldTransition.js +3 -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 +6 -0
- package/dist/src/dpp/verify/StateTransition/verifyStateTransitionResult.js +2 -1
- package/package.json +1 -1
- package/tests/unit/AddressTransitionsFees.spec.ts +274 -0
- package/tests/unit/Shielded.spec.ts +37 -4
- package/tests/unit/ShieldedTransitions.spec.ts +168 -0
- package/tests/unit/StateTransitionFees.spec.ts +177 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddressCreditWithdrawalTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { AddressCreditWithdrawalTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
3
3
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
4
4
|
import { PoolingLike } from '../../types.js';
|
|
@@ -26,6 +26,8 @@ export declare class AddressCreditWithdrawalTransitionWASM {
|
|
|
26
26
|
set userFeeIncrease(value: number);
|
|
27
27
|
get inputWitness(): AddressWitnessWASM[];
|
|
28
28
|
set inputWitness(value: AddressWitnessWASM[]);
|
|
29
|
+
static estimateMinFee(inputCount: number, hasChangeOutput: boolean, platformVersion?: PlatformVersionNAPI): bigint;
|
|
30
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
29
31
|
bytes(): Uint8Array;
|
|
30
32
|
hex(): string;
|
|
31
33
|
base64(): string;
|
|
@@ -63,6 +63,12 @@ export class AddressCreditWithdrawalTransitionWASM {
|
|
|
63
63
|
set inputWitness(value) {
|
|
64
64
|
this._rawAddressCreditWithdrawalTransition.inputWitness = value.map(witness => witness._rawWitness);
|
|
65
65
|
}
|
|
66
|
+
static estimateMinFee(inputCount, hasChangeOutput, platformVersion) {
|
|
67
|
+
return BigInt(dppProvider.dpp.AddressCreditWithdrawalTransitionNAPI.estimateMinFee(inputCount, hasChangeOutput, platformVersion));
|
|
68
|
+
}
|
|
69
|
+
calculateMinRequiredFee(platformVersion) {
|
|
70
|
+
return BigInt(this._rawAddressCreditWithdrawalTransition.calculateMinRequiredFee(platformVersion));
|
|
71
|
+
}
|
|
66
72
|
bytes() {
|
|
67
73
|
return this._rawAddressCreditWithdrawalTransition.bytes();
|
|
68
74
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddressFundingFromAssetLockTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { AddressFundingFromAssetLockTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { AssetLockProofWASM } from '../AssetLockProof/AssetLockProof.js';
|
|
3
3
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
4
4
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
@@ -23,6 +23,7 @@ export declare class AddressFundingFromAssetLockTransitionWASM {
|
|
|
23
23
|
set inputWitness(value: AddressWitnessWASM[]);
|
|
24
24
|
get signature(): Uint8Array;
|
|
25
25
|
set signature(value: Uint8Array);
|
|
26
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
26
27
|
bytes(): Uint8Array;
|
|
27
28
|
hex(): string;
|
|
28
29
|
base64(): string;
|
|
@@ -53,6 +53,9 @@ export class AddressFundingFromAssetLockTransitionWASM {
|
|
|
53
53
|
set signature(value) {
|
|
54
54
|
this._rawAddressFundingFromAssetLockTransition.signature = value;
|
|
55
55
|
}
|
|
56
|
+
calculateMinRequiredFee(platformVersion) {
|
|
57
|
+
return BigInt(this._rawAddressFundingFromAssetLockTransition.calculateMinRequiredFee(platformVersion));
|
|
58
|
+
}
|
|
56
59
|
bytes() {
|
|
57
60
|
return this._rawAddressFundingFromAssetLockTransition.bytes();
|
|
58
61
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddressFundsTransferTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { AddressFundsTransferTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
3
3
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
4
4
|
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
@@ -18,6 +18,8 @@ export declare class AddressFundsTransferTransitionWASM {
|
|
|
18
18
|
set userFeeIncrease(value: number);
|
|
19
19
|
get inputWitness(): AddressWitnessWASM[];
|
|
20
20
|
set inputWitness(witness: AddressWitnessWASM[]);
|
|
21
|
+
static estimateMinFee(inputCount: number, outputCount: number, platformVersion?: PlatformVersionNAPI): bigint;
|
|
22
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
21
23
|
bytes(): Uint8Array;
|
|
22
24
|
hex(): string;
|
|
23
25
|
base64(): string;
|
|
@@ -40,6 +40,12 @@ export class AddressFundsTransferTransitionWASM {
|
|
|
40
40
|
set inputWitness(witness) {
|
|
41
41
|
this._rawAddressFundsTransferTransition.inputWitness = witness.map(w => w._rawWitness);
|
|
42
42
|
}
|
|
43
|
+
static estimateMinFee(inputCount, outputCount, platformVersion) {
|
|
44
|
+
return BigInt(dppProvider.dpp.AddressFundsTransferTransitionNAPI.estimateMinFee(inputCount, outputCount, platformVersion));
|
|
45
|
+
}
|
|
46
|
+
calculateMinRequiredFee(platformVersion) {
|
|
47
|
+
return BigInt(this._rawAddressFundsTransferTransition.calculateMinRequiredFee(platformVersion));
|
|
48
|
+
}
|
|
43
49
|
bytes() {
|
|
44
50
|
return this._rawAddressFundsTransferTransition.bytes();
|
|
45
51
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IdentityCreateFromAddressesTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityCreateFromAddressesTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentityPublicKeyInCreationWASM } from '../IdentityPublicKeyInCreation.js';
|
|
3
3
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
4
4
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
@@ -21,6 +21,7 @@ export declare class IdentityCreateFromAddressesTransitionWASM {
|
|
|
21
21
|
set userFeeIncrease(value: number);
|
|
22
22
|
get inputWitness(): AddressWitnessWASM[];
|
|
23
23
|
set inputWitness(value: AddressWitnessWASM[]);
|
|
24
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
24
25
|
bytes(): Uint8Array;
|
|
25
26
|
hex(): string;
|
|
26
27
|
base64(): string;
|
|
@@ -50,6 +50,9 @@ export class IdentityCreateFromAddressesTransitionWASM {
|
|
|
50
50
|
set inputWitness(value) {
|
|
51
51
|
this._rawIdentityCreateFromAddressesTransition.inputWitness = value.map(w => w._rawWitness);
|
|
52
52
|
}
|
|
53
|
+
calculateMinRequiredFee(platformVersion) {
|
|
54
|
+
return BigInt(this._rawIdentityCreateFromAddressesTransition.calculateMinRequiredFee(platformVersion));
|
|
55
|
+
}
|
|
53
56
|
bytes() {
|
|
54
57
|
return this._rawIdentityCreateFromAddressesTransition.bytes();
|
|
55
58
|
}
|
package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IdentityCreditTransferToAddressesTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityCreditTransferToAddressesTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { OutputAddressWASM } from './entities/OutputAddress.js';
|
|
4
4
|
import { IdentifierWASM } from '../Identifier.js';
|
|
@@ -19,6 +19,7 @@ export declare class IdentityCreditTransferToAddressesTransitionWASM {
|
|
|
19
19
|
set signaturePublicKeyId(value: number);
|
|
20
20
|
get signature(): Uint8Array;
|
|
21
21
|
set signature(sig: Uint8Array);
|
|
22
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
22
23
|
bytes(): Uint8Array;
|
|
23
24
|
hex(): string;
|
|
24
25
|
base64(): string;
|
package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.js
CHANGED
|
@@ -45,6 +45,9 @@ export class IdentityCreditTransferToAddressesTransitionWASM {
|
|
|
45
45
|
set signature(sig) {
|
|
46
46
|
this._rawIdentityCreditTransferToAddressesTransition.signature = sig;
|
|
47
47
|
}
|
|
48
|
+
calculateMinRequiredFee(platformVersion) {
|
|
49
|
+
return BigInt(this._rawIdentityCreditTransferToAddressesTransition.calculateMinRequiredFee(platformVersion));
|
|
50
|
+
}
|
|
48
51
|
bytes() {
|
|
49
52
|
return this._rawIdentityCreditTransferToAddressesTransition.bytes();
|
|
50
53
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IdentityTopUpFromAddressesTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityTopUpFromAddressesTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { InputAddressWASM } from './entities/InputAddress.js';
|
|
4
4
|
import { AddressFundsFeeStrategyStepWASM } from './entities/AddressFundsFeeStrategyStep.js';
|
|
@@ -19,6 +19,7 @@ export declare class IdentityTopUpFromAddressesTransitionWASM {
|
|
|
19
19
|
set userFeeIncrease(userFeeIncrease: number);
|
|
20
20
|
get inputWitness(): AddressWitnessWASM[];
|
|
21
21
|
set inputWitness(addressWitness: AddressWitnessWASM[]);
|
|
22
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
22
23
|
bytes(): Uint8Array;
|
|
23
24
|
hex(): string;
|
|
24
25
|
base64(): string;
|
|
@@ -44,6 +44,9 @@ export class IdentityTopUpFromAddressesTransitionWASM {
|
|
|
44
44
|
set inputWitness(addressWitness) {
|
|
45
45
|
this._rawIdentityTopUpFromAddressesTransition.inputWitness = addressWitness.map(w => w._rawWitness);
|
|
46
46
|
}
|
|
47
|
+
calculateMinRequiredFee(platformVersion) {
|
|
48
|
+
return BigInt(this._rawIdentityTopUpFromAddressesTransition.calculateMinRequiredFee(platformVersion));
|
|
49
|
+
}
|
|
47
50
|
bytes() {
|
|
48
51
|
return this._rawIdentityTopUpFromAddressesTransition.bytes();
|
|
49
52
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BatchTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { BatchTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { BatchedTransitionWASM } from './BatchedTransition.js';
|
|
4
4
|
import { DocumentTransitionWASM } from './DocumentTransition.js';
|
|
@@ -20,6 +20,7 @@ export declare class BatchTransitionWASM {
|
|
|
20
20
|
get modifiedDataIds(): IdentifierWASM[];
|
|
21
21
|
get allConflictingIndexCollateralVotingFunds(): bigint | undefined;
|
|
22
22
|
setIdentityContractNonce(nonce: bigint): void;
|
|
23
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
23
24
|
bytes(): Uint8Array;
|
|
24
25
|
hex(): string;
|
|
25
26
|
base64(): string;
|
|
@@ -57,6 +57,9 @@ export class BatchTransitionWASM {
|
|
|
57
57
|
setIdentityContractNonce(nonce) {
|
|
58
58
|
this._rawBatchTransition.setIdentityContractNonce(nonce.toString());
|
|
59
59
|
}
|
|
60
|
+
calculateMinRequiredFee(platformVersion) {
|
|
61
|
+
return BigInt(this._rawBatchTransition.calculateMinRequiredFee(platformVersion));
|
|
62
|
+
}
|
|
60
63
|
bytes() {
|
|
61
64
|
return this._rawBatchTransition.bytes();
|
|
62
65
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataContractCreateTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { DataContractCreateTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { DataContractWASM } from '../DataContract.js';
|
|
3
3
|
import { PlatformVersionLike } from '../../types.js';
|
|
4
4
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
@@ -11,6 +11,7 @@ export declare class DataContractCreateTransitionWASM {
|
|
|
11
11
|
verifyProtocolVersion(protocolVersion: number): boolean;
|
|
12
12
|
setDataContract(dataContract: DataContractWASM, platformVersion?: PlatformVersionLike): void;
|
|
13
13
|
getDataContract(platformVersion?: PlatformVersionLike, fullValidation?: boolean): DataContractWASM;
|
|
14
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
14
15
|
bytes(): Uint8Array;
|
|
15
16
|
hex(): string;
|
|
16
17
|
base64(): string;
|
|
@@ -23,6 +23,9 @@ export class DataContractCreateTransitionWASM {
|
|
|
23
23
|
getDataContract(platformVersion, fullValidation) {
|
|
24
24
|
return DataContractWASM.createFromRawInstance(this._rawDataContractCreateTransition.getDataContract(valueToDynamicValue(platformVersion), fullValidation));
|
|
25
25
|
}
|
|
26
|
+
calculateMinRequiredFee(platformVersion) {
|
|
27
|
+
return BigInt(this._rawDataContractCreateTransition.calculateMinRequiredFee(platformVersion));
|
|
28
|
+
}
|
|
26
29
|
bytes() {
|
|
27
30
|
return this._rawDataContractCreateTransition.bytes();
|
|
28
31
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataContractUpdateTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { DataContractUpdateTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { DataContractWASM } from '../DataContract.js';
|
|
3
3
|
import { PlatformVersionLike } from '../../types.js';
|
|
4
4
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
@@ -11,6 +11,7 @@ export declare class DataContractUpdateTransitionWASM {
|
|
|
11
11
|
verifyProtocolVersion(protocolVersion: number): boolean;
|
|
12
12
|
setDataContract(dataContract: DataContractWASM, platformVersion?: PlatformVersionLike): void;
|
|
13
13
|
getDataContract(fullValidation?: boolean, platformVersion?: PlatformVersionLike): DataContractWASM;
|
|
14
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
14
15
|
bytes(): Uint8Array;
|
|
15
16
|
hex(): string;
|
|
16
17
|
base64(): string;
|
|
@@ -23,6 +23,9 @@ export class DataContractUpdateTransitionWASM {
|
|
|
23
23
|
getDataContract(fullValidation, platformVersion) {
|
|
24
24
|
return DataContractWASM.createFromRawInstance(this._rawDataContractUpdateTransition.getDataContract(fullValidation, valueToDynamicValue(platformVersion)));
|
|
25
25
|
}
|
|
26
|
+
calculateMinRequiredFee(platformVersion) {
|
|
27
|
+
return BigInt(this._rawDataContractUpdateTransition.calculateMinRequiredFee(platformVersion));
|
|
28
|
+
}
|
|
26
29
|
bytes() {
|
|
27
30
|
return this._rawDataContractUpdateTransition.bytes();
|
|
28
31
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IdentityCreateTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityCreateTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentityPublicKeyInCreationWASM } from '../IdentityPublicKeyInCreation.js';
|
|
3
3
|
import { AssetLockProofWASM } from '../AssetLockProof/AssetLockProof.js';
|
|
4
4
|
import { PlatformVersionLike } from '../../types.js';
|
|
@@ -18,6 +18,7 @@ export declare class IdentityCreateTransitionWASM {
|
|
|
18
18
|
set assetLock(value: AssetLockProofWASM);
|
|
19
19
|
getSignableBytes(): Uint8Array;
|
|
20
20
|
getIdentifier(): IdentifierWASM;
|
|
21
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
21
22
|
bytes(): Uint8Array;
|
|
22
23
|
toStateTransition(): StateTransitionWASM;
|
|
23
24
|
static default(platformVersion: PlatformVersionLike): IdentityCreateTransitionWASM;
|
|
@@ -40,6 +40,9 @@ export class IdentityCreateTransitionWASM {
|
|
|
40
40
|
getIdentifier() {
|
|
41
41
|
return IdentifierWASM.createFromRawInstance(this._rawIdentityCreateTransition.getIdentifier());
|
|
42
42
|
}
|
|
43
|
+
calculateMinRequiredFee(platformVersion) {
|
|
44
|
+
return BigInt(this._rawIdentityCreateTransition.calculateMinRequiredFee(platformVersion));
|
|
45
|
+
}
|
|
43
46
|
bytes() {
|
|
44
47
|
return this._rawIdentityCreateTransition.bytes();
|
|
45
48
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IdentityCreditTransferNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityCreditTransferNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { IdentifierWASM } from '../Identifier.js';
|
|
4
4
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
@@ -21,6 +21,7 @@ export declare class IdentityCreditTransferWASM {
|
|
|
21
21
|
get userFeeIncrease(): number;
|
|
22
22
|
set userFeeIncrease(value: number);
|
|
23
23
|
getSignableBytes(): Uint8Array;
|
|
24
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
24
25
|
bytes(): Uint8Array;
|
|
25
26
|
hex(): string;
|
|
26
27
|
base64(): string;
|
|
@@ -53,6 +53,9 @@ export class IdentityCreditTransferWASM {
|
|
|
53
53
|
getSignableBytes() {
|
|
54
54
|
return this._rawIdentityCreditTransfer.getSignableBytes();
|
|
55
55
|
}
|
|
56
|
+
calculateMinRequiredFee(platformVersion) {
|
|
57
|
+
return BigInt(this._rawIdentityCreditTransfer.calculateMinRequiredFee(platformVersion));
|
|
58
|
+
}
|
|
56
59
|
bytes() {
|
|
57
60
|
return this._rawIdentityCreditTransfer.bytes();
|
|
58
61
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IdentityCreditWithdrawalTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityCreditWithdrawalTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike, PoolingLike } from '../../types.js';
|
|
3
3
|
import { CoreScriptWASM } from '../CoreScript.js';
|
|
4
4
|
import { IdentifierWASM } from '../Identifier.js';
|
|
@@ -30,6 +30,7 @@ export declare class IdentityCreditWithdrawalTransitionWASM {
|
|
|
30
30
|
getPurposeRequirement(): string[];
|
|
31
31
|
getModifiedDataIds(): IdentifierWASM[];
|
|
32
32
|
getOptionalAssetLockProof(): AssetLockProofWASM | undefined;
|
|
33
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
33
34
|
bytes(): Uint8Array;
|
|
34
35
|
hex(): string;
|
|
35
36
|
base64(): string;
|
|
@@ -82,6 +82,9 @@ export class IdentityCreditWithdrawalTransitionWASM {
|
|
|
82
82
|
return AssetLockProofWASM.createFromRawInstance(lock);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
calculateMinRequiredFee(platformVersion) {
|
|
86
|
+
return BigInt(this._rawIdentityCreditWithdrawalTransition.calculateMinRequiredFee(platformVersion));
|
|
87
|
+
}
|
|
85
88
|
bytes() {
|
|
86
89
|
return this._rawIdentityCreditWithdrawalTransition.bytes();
|
|
87
90
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IdentityTopUpTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityTopUpTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { AssetLockProofWASM } from '../AssetLockProof/AssetLockProof.js';
|
|
3
3
|
import { IdentifierLike } from '../../types.js';
|
|
4
4
|
import { IdentifierWASM } from '../Identifier.js';
|
|
@@ -18,6 +18,7 @@ export declare class IdentityTopUpTransitionWASM {
|
|
|
18
18
|
getSignableBytes(): Uint8Array;
|
|
19
19
|
getModifiedDataIds(): IdentifierWASM[];
|
|
20
20
|
getOptionalAssetLockProof(): AssetLockProofWASM | undefined;
|
|
21
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
21
22
|
bytes(): Uint8Array;
|
|
22
23
|
hex(): string;
|
|
23
24
|
base64(): string;
|
|
@@ -43,6 +43,9 @@ export class IdentityTopUpTransitionWASM {
|
|
|
43
43
|
const lock = this._rawIdentityTopUpTransition.getOptionalAssetLockProof();
|
|
44
44
|
return (lock != null) ? AssetLockProofWASM.createFromRawInstance(lock) : undefined;
|
|
45
45
|
}
|
|
46
|
+
calculateMinRequiredFee(platformVersion) {
|
|
47
|
+
return BigInt(this._rawIdentityTopUpTransition.calculateMinRequiredFee(platformVersion));
|
|
48
|
+
}
|
|
46
49
|
bytes() {
|
|
47
50
|
return this._rawIdentityTopUpTransition.bytes();
|
|
48
51
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IdentityUpdateTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { IdentityUpdateTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { IdentityPublicKeyInCreationWASM } from '../IdentityPublicKeyInCreation.js';
|
|
4
4
|
import { IdentifierWASM } from '../Identifier.js';
|
|
@@ -28,6 +28,7 @@ export declare class IdentityUpdateTransitionWASM {
|
|
|
28
28
|
getPurposeRequirement(): string[];
|
|
29
29
|
getModifiedDataIds(): IdentifierWASM[];
|
|
30
30
|
getOptionalAssetLockProof(): AssetLockProofWASM | undefined;
|
|
31
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
31
32
|
bytes(): Uint8Array;
|
|
32
33
|
hex(): string;
|
|
33
34
|
base64(): string;
|
|
@@ -76,6 +76,9 @@ export class IdentityUpdateTransitionWASM {
|
|
|
76
76
|
return undefined;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
calculateMinRequiredFee(platformVersion) {
|
|
80
|
+
return BigInt(this._rawIdentityUpdateTransition.calculateMinRequiredFee(platformVersion));
|
|
81
|
+
}
|
|
79
82
|
bytes() {
|
|
80
83
|
return this._rawIdentityUpdateTransition.bytes();
|
|
81
84
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MasternodeVoteTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { MasternodeVoteTransitionNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentifierLike } from '../../types.js';
|
|
3
3
|
import { VoteWASM } from './Vote.js';
|
|
4
4
|
import { IdentifierWASM } from '../Identifier.js';
|
|
@@ -23,6 +23,7 @@ export declare class MasternodeVoteTransitionWASM {
|
|
|
23
23
|
get assetLock(): AssetLockProofWASM | undefined;
|
|
24
24
|
get modifiedDataIds(): IdentifierWASM[];
|
|
25
25
|
getSignableBytes(): Uint8Array;
|
|
26
|
+
calculateMinRequiredFee(platformVersion?: PlatformVersionNAPI): bigint;
|
|
26
27
|
bytes(): Uint8Array;
|
|
27
28
|
hex(): string;
|
|
28
29
|
base64(): string;
|
|
@@ -58,6 +58,9 @@ export class MasternodeVoteTransitionWASM {
|
|
|
58
58
|
getSignableBytes() {
|
|
59
59
|
return this._rawMasternodeVoteTransition.getSignableBytes();
|
|
60
60
|
}
|
|
61
|
+
calculateMinRequiredFee(platformVersion) {
|
|
62
|
+
return BigInt(this._rawMasternodeVoteTransition.calculateMinRequiredFee(platformVersion));
|
|
63
|
+
}
|
|
61
64
|
bytes() {
|
|
62
65
|
return this._rawMasternodeVoteTransition.bytes();
|
|
63
66
|
}
|
|
@@ -8,6 +8,7 @@ export declare class RecoveredNoteWASM {
|
|
|
8
8
|
/** The action's global leaf position in the commitment tree. */
|
|
9
9
|
get index(): number;
|
|
10
10
|
get note(): NoteWASM;
|
|
11
|
+
get nullifier(): Uint8Array;
|
|
11
12
|
static createFromRawInstance(rawInstance: RecoveredNoteNAPI): RecoveredNoteWASM;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
@@ -11,6 +11,9 @@ export class RecoveredNoteWASM {
|
|
|
11
11
|
get note() {
|
|
12
12
|
return NoteWASM.createFromRawInstance(this._rawRecoveredNote.note);
|
|
13
13
|
}
|
|
14
|
+
get nullifier() {
|
|
15
|
+
return this._rawRecoveredNote.nullifier;
|
|
16
|
+
}
|
|
14
17
|
static createFromRawInstance(rawInstance) {
|
|
15
18
|
const instance = Object.create(RecoveredNoteWASM.prototype);
|
|
16
19
|
instance._rawRecoveredNote = rawInstance;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PlatformAddressNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { PlatformAddressNAPI, PlatformVersionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { NetworkLike, PlatformAddressLike } from '../../types.js';
|
|
3
3
|
export declare class PlatformAddressWASM {
|
|
4
4
|
/** @private **/
|
|
@@ -10,6 +10,14 @@ export declare class PlatformAddressWASM {
|
|
|
10
10
|
isP2PKH(): boolean;
|
|
11
11
|
isP2SH(): boolean;
|
|
12
12
|
hash(): Uint8Array;
|
|
13
|
+
/**
|
|
14
|
+
* Storage fee charged for creating balance entries for addresses that are not in state yet.
|
|
15
|
+
*
|
|
16
|
+
* A minimum fee prices every output as a fresh address, but the fee actually charged is
|
|
17
|
+
* metered: paying an address that already exists adds no bytes, while each address created
|
|
18
|
+
* costs this much storage on top of processing.
|
|
19
|
+
*/
|
|
20
|
+
static estimateStorageFeeForNewAddresses(addressCount: number, platformVersion?: PlatformVersionNAPI): bigint;
|
|
13
21
|
static fromBech32m(bech32m: string): PlatformAddressWASM;
|
|
14
22
|
static fromBytes(bytes: Uint8Array): PlatformAddressWASM;
|
|
15
23
|
static createFromRawInstance(rawInstance: PlatformAddressNAPI): PlatformAddressWASM;
|
|
@@ -24,6 +24,16 @@ export class PlatformAddressWASM {
|
|
|
24
24
|
hash() {
|
|
25
25
|
return this._rawPlatformAddress.hash();
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Storage fee charged for creating balance entries for addresses that are not in state yet.
|
|
29
|
+
*
|
|
30
|
+
* A minimum fee prices every output as a fresh address, but the fee actually charged is
|
|
31
|
+
* metered: paying an address that already exists adds no bytes, while each address created
|
|
32
|
+
* costs this much storage on top of processing.
|
|
33
|
+
*/
|
|
34
|
+
static estimateStorageFeeForNewAddresses(addressCount, platformVersion) {
|
|
35
|
+
return BigInt(dppProvider.dpp.PlatformAddressNAPI.estimateStorageFeeForNewAddresses(addressCount, platformVersion));
|
|
36
|
+
}
|
|
27
37
|
static fromBech32m(bech32m) {
|
|
28
38
|
return PlatformAddressWASM.createFromRawInstance(dppProvider.dpp.PlatformAddressNAPI.fromBech32m(bech32m));
|
|
29
39
|
}
|
package/dist/src/dpp/structs/ShieldedTransitions/IdentityCreateFromShieldedPoolTransition.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IdentityCreateFromShieldedPoolTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { PlatformVersionNAPI, IdentityCreateFromShieldedPoolTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { IdentityPublicKeyInCreationWASM } from '../IdentityPublicKeyInCreation.js';
|
|
3
3
|
import { SerializedActionWASM } from './SerializedAction.js';
|
|
4
4
|
import { PlatformAddressWASM } from '../PlatformAddress/PlatformAddress.js';
|
|
@@ -25,6 +25,7 @@ export declare class IdentityCreateFromShieldedPoolTransitionWASM {
|
|
|
25
25
|
set sendToAddressOnCreationFailure(value: PlatformAddressLike);
|
|
26
26
|
get identityId(): IdentifierWASM;
|
|
27
27
|
set identityId(value: IdentifierLike);
|
|
28
|
+
static computeMinimumFee(numActions: number, numKeys: number, platformVersion?: PlatformVersionNAPI): bigint;
|
|
28
29
|
toStateTransition(): StateTransitionWASM;
|
|
29
30
|
static fromStateTransition(st: StateTransitionWASM): IdentityCreateFromShieldedPoolTransitionWASM;
|
|
30
31
|
static createFromRawInstance(rawInstance: IdentityCreateFromShieldedPoolTransitionNAPI): IdentityCreateFromShieldedPoolTransitionWASM;
|
package/dist/src/dpp/structs/ShieldedTransitions/IdentityCreateFromShieldedPoolTransition.js
CHANGED
|
@@ -59,6 +59,9 @@ export class IdentityCreateFromShieldedPoolTransitionWASM {
|
|
|
59
59
|
set identityId(value) {
|
|
60
60
|
this._rawIdentityCreateFromShieldedPoolTransition.identityId = prepareIdentifierValue(value);
|
|
61
61
|
}
|
|
62
|
+
static computeMinimumFee(numActions, numKeys, platformVersion) {
|
|
63
|
+
return BigInt(dppProvider.dpp.IdentityCreateFromShieldedPoolTransitionNAPI.computeMinimumFee(numActions, numKeys, platformVersion));
|
|
64
|
+
}
|
|
62
65
|
toStateTransition() {
|
|
63
66
|
return StateTransitionWASM.createFromRawInstance(this._rawIdentityCreateFromShieldedPoolTransition.toStateTransition());
|
|
64
67
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ShieldFromAssetLockTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { PlatformVersionNAPI, ShieldFromAssetLockTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { SerializedActionWASM } from './SerializedAction.js';
|
|
3
3
|
import { AssetLockProofWASM } from '../AssetLockProof/AssetLockProof.js';
|
|
4
4
|
import { PlatformAddressWASM } from '../PlatformAddress/PlatformAddress.js';
|
|
@@ -24,6 +24,7 @@ export declare class ShieldFromAssetLockTransitionWASM {
|
|
|
24
24
|
set surplusOutput(value: PlatformAddressLike | undefined);
|
|
25
25
|
get signature(): Uint8Array;
|
|
26
26
|
set signature(value: Uint8Array);
|
|
27
|
+
static computeMinimumFee(numActions: number, platformVersion?: PlatformVersionNAPI): bigint;
|
|
27
28
|
toStateTransition(): StateTransitionWASM;
|
|
28
29
|
static fromStateTransition(st: StateTransitionWASM): ShieldFromAssetLockTransitionWASM;
|
|
29
30
|
static createFromRawInstance(rawInstance: ShieldFromAssetLockTransitionNAPI): ShieldFromAssetLockTransitionWASM;
|
|
@@ -63,6 +63,9 @@ export class ShieldFromAssetLockTransitionWASM {
|
|
|
63
63
|
set signature(value) {
|
|
64
64
|
this._rawShieldFromAssetLockTransition.signature = value;
|
|
65
65
|
}
|
|
66
|
+
static computeMinimumFee(numActions, platformVersion) {
|
|
67
|
+
return BigInt(dppProvider.dpp.ShieldFromAssetLockTransitionNAPI.computeMinimumFee(numActions, platformVersion));
|
|
68
|
+
}
|
|
66
69
|
toStateTransition() {
|
|
67
70
|
return StateTransitionWASM.createFromRawInstance(this._rawShieldFromAssetLockTransition.toStateTransition());
|
|
68
71
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ShieldTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { PlatformVersionNAPI, ShieldTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { InputAddressWASM } from '../AddressTransitions/entities/InputAddress.js';
|
|
3
3
|
import { AddressFundsFeeStrategyStepWASM } from '../AddressTransitions/entities/AddressFundsFeeStrategyStep.js';
|
|
4
4
|
import { AddressWitnessWASM } from '../PlatformAddress/AddressWitness.js';
|
|
@@ -26,6 +26,7 @@ export declare class ShieldTransitionWASM {
|
|
|
26
26
|
set userFeeIncrease(value: number);
|
|
27
27
|
get inputWitnesses(): AddressWitnessWASM[];
|
|
28
28
|
set inputWitnesses(value: AddressWitnessWASM[]);
|
|
29
|
+
static computeMinimumFee(numActions: number, platformVersion?: PlatformVersionNAPI): bigint;
|
|
29
30
|
toStateTransition(): StateTransitionWASM;
|
|
30
31
|
static fromStateTransition(st: StateTransitionWASM): ShieldTransitionWASM;
|
|
31
32
|
static createFromRawInstance(rawInstance: ShieldTransitionNAPI): ShieldTransitionWASM;
|
|
@@ -64,6 +64,9 @@ export class ShieldTransitionWASM {
|
|
|
64
64
|
set inputWitnesses(value) {
|
|
65
65
|
this._rawShieldTransition.inputWitnesses = value.map(w => w._rawWitness);
|
|
66
66
|
}
|
|
67
|
+
static computeMinimumFee(numActions, platformVersion) {
|
|
68
|
+
return BigInt(dppProvider.dpp.ShieldTransitionNAPI.computeMinimumFee(numActions, platformVersion));
|
|
69
|
+
}
|
|
67
70
|
toStateTransition() {
|
|
68
71
|
return StateTransitionWASM.createFromRawInstance(this._rawShieldTransition.toStateTransition());
|
|
69
72
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ShieldedTransferTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { PlatformVersionNAPI, ShieldedTransferTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { SerializedActionWASM } from './SerializedAction.js';
|
|
3
3
|
import { StateTransitionWASM } from '../StateTransition.js';
|
|
4
4
|
export declare class ShieldedTransferTransitionWASM {
|
|
@@ -15,6 +15,7 @@ export declare class ShieldedTransferTransitionWASM {
|
|
|
15
15
|
set proof(value: Uint8Array);
|
|
16
16
|
get bindingsSignature(): Uint8Array;
|
|
17
17
|
set bindingsSignature(value: Uint8Array);
|
|
18
|
+
static computeMinimumFee(numActions: number, platformVersion?: PlatformVersionNAPI): bigint;
|
|
18
19
|
toStateTransition(): StateTransitionWASM;
|
|
19
20
|
static fromStateTransition(st: StateTransitionWASM): ShieldedTransferTransitionWASM;
|
|
20
21
|
static createFromRawInstance(rawInstance: ShieldedTransferTransitionNAPI): ShieldedTransferTransitionWASM;
|
|
@@ -37,6 +37,9 @@ export class ShieldedTransferTransitionWASM {
|
|
|
37
37
|
set bindingsSignature(value) {
|
|
38
38
|
this._rawShieldedTransferTransition.bindingsSignature = value;
|
|
39
39
|
}
|
|
40
|
+
static computeMinimumFee(numActions, platformVersion) {
|
|
41
|
+
return BigInt(dppProvider.dpp.ShieldedTransferTransitionNAPI.computeMinimumFee(numActions, platformVersion));
|
|
42
|
+
}
|
|
40
43
|
toStateTransition() {
|
|
41
44
|
return StateTransitionWASM.createFromRawInstance(this._rawShieldedTransferTransition.toStateTransition());
|
|
42
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ShieldedWithdrawalTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { PlatformVersionNAPI, ShieldedWithdrawalTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { SerializedActionWASM } from './SerializedAction.js';
|
|
3
3
|
import { CoreScriptWASM } from '../CoreScript.js';
|
|
4
4
|
import { PoolingLike } from '../../types.js';
|
|
@@ -23,6 +23,7 @@ export declare class ShieldedWithdrawalTransitionWASM {
|
|
|
23
23
|
set pooling(value: PoolingLike);
|
|
24
24
|
get outputScript(): CoreScriptWASM;
|
|
25
25
|
set outputScript(value: CoreScriptWASM);
|
|
26
|
+
static computeMinimumFee(numActions: number, platformVersion?: PlatformVersionNAPI): bigint;
|
|
26
27
|
toStateTransition(): StateTransitionWASM;
|
|
27
28
|
static fromStateTransition(st: StateTransitionWASM): ShieldedWithdrawalTransitionWASM;
|
|
28
29
|
static createFromRawInstance(rawInstance: ShieldedWithdrawalTransitionNAPI): ShieldedWithdrawalTransitionWASM;
|
|
@@ -57,6 +57,9 @@ export class ShieldedWithdrawalTransitionWASM {
|
|
|
57
57
|
set outputScript(value) {
|
|
58
58
|
this._rawShieldedWithdrawalTransition.outputScript = value._rawCoreScript;
|
|
59
59
|
}
|
|
60
|
+
static computeMinimumFee(numActions, platformVersion) {
|
|
61
|
+
return BigInt(dppProvider.dpp.ShieldedWithdrawalTransitionNAPI.computeMinimumFee(numActions, platformVersion));
|
|
62
|
+
}
|
|
60
63
|
toStateTransition() {
|
|
61
64
|
return StateTransitionWASM.createFromRawInstance(this._rawShieldedWithdrawalTransition.toStateTransition());
|
|
62
65
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UnshieldTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
1
|
+
import type { PlatformVersionNAPI, UnshieldTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
2
|
import { SerializedActionWASM } from './SerializedAction.js';
|
|
3
3
|
import { PlatformAddressWASM } from '../PlatformAddress/PlatformAddress.js';
|
|
4
4
|
import { PlatformAddressLike } from '../../types.js';
|
|
@@ -19,6 +19,7 @@ export declare class UnshieldTransitionWASM {
|
|
|
19
19
|
set proof(value: Uint8Array);
|
|
20
20
|
get bindingsSignature(): Uint8Array;
|
|
21
21
|
set bindingsSignature(value: Uint8Array);
|
|
22
|
+
static computeMinimumFee(numActions: number, platformVersion?: PlatformVersionNAPI): bigint;
|
|
22
23
|
toStateTransition(): StateTransitionWASM;
|
|
23
24
|
static fromStateTransition(st: StateTransitionWASM): UnshieldTransitionWASM;
|
|
24
25
|
static createFromRawInstance(rawInstance: UnshieldTransitionNAPI): UnshieldTransitionWASM;
|
|
@@ -45,6 +45,9 @@ export class UnshieldTransitionWASM {
|
|
|
45
45
|
set bindingsSignature(value) {
|
|
46
46
|
this._rawUnshieldTransition.bindingsSignature = value;
|
|
47
47
|
}
|
|
48
|
+
static computeMinimumFee(numActions, platformVersion) {
|
|
49
|
+
return BigInt(dppProvider.dpp.UnshieldTransitionNAPI.computeMinimumFee(numActions, platformVersion));
|
|
50
|
+
}
|
|
48
51
|
toStateTransition() {
|
|
49
52
|
return StateTransitionWASM.createFromRawInstance(this._rawUnshieldTransition.toStateTransition());
|
|
50
53
|
}
|