pshenmic-dpp 2.0.0-dev.7 → 2.0.0-dev.9
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 +21 -15
- package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
- package/dist/binaries/pshenmic_dpp.d.ts +4 -2
- package/dist/binaries/pshenmic_dpp.js +1 -1
- package/dist/binaries/wasm/wasmBytes.js +1 -1
- package/dist/binaries/wasm.d.ts +4 -2
- package/dist/binaries/wasm.js +1 -1
- package/dist/src/dpp/dpp.d.ts +1 -0
- package/dist/src/dpp/dpp.js +1 -0
- package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.js +1 -1
- package/dist/src/dpp/structs/PlatformAddress/AddressWitness.d.ts +2 -2
- package/dist/src/dpp/structs/PlatformAddress/AddressWitness.js +2 -2
- package/dist/src/dpp/structs/StateTransition.d.ts +1 -0
- package/dist/src/dpp/structs/StateTransition.js +3 -0
- package/dist/src/dpp/types.d.ts +5 -1
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.d.ts +2 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.js +14 -0
- package/dist/src/dpp/verify/StateTransition/utils.js +1 -1
- package/package.json +3 -3
package/dist/binaries/wasm.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export const verifyAddressesInfos: any;
|
|
1
2
|
export const verifyAddressInfo: any;
|
|
2
3
|
export const verifyContractProof: any;
|
|
3
4
|
export const verifyDocumentsProof: any;
|
|
@@ -78,6 +79,7 @@ export const OutPointNAPI: any;
|
|
|
78
79
|
export const OutputAddressNAPI: any;
|
|
79
80
|
export const OutputAddressNullableCreditsNAPI: any;
|
|
80
81
|
export const PartialIdentityNAPI: any;
|
|
82
|
+
export const PlatformAddressInfoNAPI: any;
|
|
81
83
|
export const PlatformAddressNAPI: any;
|
|
82
84
|
export const PrefundedVotingBalanceNAPI: any;
|
|
83
85
|
export const PrivateEncryptedNoteNAPI: any;
|
|
@@ -120,8 +122,6 @@ export const TotalSingleTokenBalanceNAPI: any;
|
|
|
120
122
|
export const TransactionNAPI: any;
|
|
121
123
|
export const TxInNAPI: any;
|
|
122
124
|
export const TxOutNAPI: any;
|
|
123
|
-
export const VerifiedAddressInfoNAPI: any;
|
|
124
|
-
export const VerifiedAddressInfosNAPI: any;
|
|
125
125
|
export const VerifiedBalanceTransferNAPI: any;
|
|
126
126
|
export const VerifiedContractNAPI: any;
|
|
127
127
|
export const VerifiedDocumentNAPI: any;
|
|
@@ -137,6 +137,8 @@ export const VerifiedIdentityKeysByIdentifierNAPI: any;
|
|
|
137
137
|
export const VerifiedIdentityNonceNAPI: any;
|
|
138
138
|
export const VerifiedIdentityTokenInfoNAPI: any;
|
|
139
139
|
export const VerifiedIdentityWithAddressInfosNAPI: any;
|
|
140
|
+
export const VerifiedPlatformAddressesInfosNAPI: any;
|
|
141
|
+
export const VerifiedPlatformAddressInfoNAPI: any;
|
|
140
142
|
export const VerifiedStateTransitionResultNAPI: any;
|
|
141
143
|
export const VerifiedTokenBalancesForIdentitiesNAPI: any;
|
|
142
144
|
export const VerifiedTokenContractInfoNAPI: any;
|
package/dist/binaries/wasm.js
CHANGED
|
@@ -41,4 +41,4 @@ const wasm = instantiateNapiModuleSync(decompressSync(wasmBytes), {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
export const { verifyAddressInfo, verifyContractProof, verifyDocumentsProof, verifyEpochsInfoProof, verifyIdentifierByNonUniquePublicKeyHashProof, verifyIdentityBalanceProof, verifyIdentityByIdentifierProof, verifyIdentityByUniqueKeyHashProof, verifyIdentityContractNonceProof, verifyIdentityKeysByIdentifierProof, verifyIdentityNonceProof, verifySignatureDigest, verifyStateTransitionResult, verifyTokenBalancesForIdentitiesProof, verifyTokenContractInfoProof, verifyTokenDirectPurchasePrices, verifyTokensBalancesForIdentityProof, verifyTokenTotalSupplyProof, verifyTotalCreditsProof, verifyVotePollVoteStateProof, ActionTakerNAPI, AddressCreditWithdrawalTransitionNAPI, AddressFundingFromAssetLockTransitionNAPI, AddressFundsFeeStrategyStepNAPI, AddressFundsTransferTransitionNAPI, AddressWitnessNAPI, AssetLockProofNAPI, AuthorizedActionTakersNAPI, BatchedTransitionNAPI, BatchTransitionNAPI, BlockBasedDistributionNAPI, BlockInfoNAPI, ChainAssetLockProofNAPI, ChangeControlRulesNAPI, ConsensusErrorNAPI, ContenderWithSerializedDocumentNAPI, ContestedDocumentVotePollQueryExecutionResultNAPI, ContractBoundsNAPI, CoreScriptNAPI, DataContractCreateTransitionNAPI, DataContractNAPI, DataContractUpdateTransitionNAPI, DistributionFunctionNAPI, DocumentBaseTransitionNAPI, DocumentCreateTransitionNAPI, DocumentDeleteTransitionNAPI, DocumentNAPI, DocumentPurchaseTransitionNAPI, DocumentReplaceTransitionNAPI, DocumentTransferTransitionNAPI, DocumentTransitionNAPI, DocumentUpdatePriceTransitionNAPI, DynamicValue, EpochBasedDistributionNAPI, ExtendedEpochInfoNAPI, GroupNAPI, GroupStateTransitionInfoNAPI, IdentifierNAPI, IdentityCreateFromAddressesTransitionNAPI, IdentityCreateTransitionNAPI, IdentityCreditTransferNAPI, IdentityCreditTransferToAddressesTransitionNAPI, IdentityCreditWithdrawalTransitionNAPI, IdentityNAPI, IdentityPublicKeyInCreationNAPI, IdentityPublicKeyNAPI, IdentityTokenBalanceNAPI, IdentityTokenBalanceOptionalNAPI, IdentityTokenInfoNAPI, IdentityTopUpFromAddressesTransitionNAPI, IdentityTopUpTransitionNAPI, IdentityUpdateTransitionNAPI, InputAddressNAPI, InstantAssetLockProofNAPI, InstantLockNAPI, MasternodeVoteTransitionNAPI, OutPointNAPI, OutputAddressNAPI, OutputAddressNullableCreditsNAPI, PartialIdentityNAPI, PlatformAddressNAPI, PrefundedVotingBalanceNAPI, PrivateEncryptedNoteNAPI, PrivateKeyNAPI, PublicKeyNAPI, ResourceVoteChoiceNAPI, RewardDistributionTypeNAPI, SharedEncryptedNoteNAPI, StateTransitionNAPI, 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,
|
|
44
|
+
export const { verifyAddressesInfos, verifyAddressInfo, verifyContractProof, verifyDocumentsProof, verifyEpochsInfoProof, verifyIdentifierByNonUniquePublicKeyHashProof, verifyIdentityBalanceProof, verifyIdentityByIdentifierProof, verifyIdentityByUniqueKeyHashProof, verifyIdentityContractNonceProof, verifyIdentityKeysByIdentifierProof, verifyIdentityNonceProof, verifySignatureDigest, verifyStateTransitionResult, verifyTokenBalancesForIdentitiesProof, verifyTokenContractInfoProof, verifyTokenDirectPurchasePrices, verifyTokensBalancesForIdentityProof, verifyTokenTotalSupplyProof, verifyTotalCreditsProof, verifyVotePollVoteStateProof, ActionTakerNAPI, AddressCreditWithdrawalTransitionNAPI, AddressFundingFromAssetLockTransitionNAPI, AddressFundsFeeStrategyStepNAPI, AddressFundsTransferTransitionNAPI, AddressWitnessNAPI, AssetLockProofNAPI, AuthorizedActionTakersNAPI, BatchedTransitionNAPI, BatchTransitionNAPI, BlockBasedDistributionNAPI, BlockInfoNAPI, ChainAssetLockProofNAPI, ChangeControlRulesNAPI, ConsensusErrorNAPI, ContenderWithSerializedDocumentNAPI, ContestedDocumentVotePollQueryExecutionResultNAPI, ContractBoundsNAPI, CoreScriptNAPI, DataContractCreateTransitionNAPI, DataContractNAPI, DataContractUpdateTransitionNAPI, DistributionFunctionNAPI, DocumentBaseTransitionNAPI, DocumentCreateTransitionNAPI, DocumentDeleteTransitionNAPI, DocumentNAPI, DocumentPurchaseTransitionNAPI, DocumentReplaceTransitionNAPI, DocumentTransferTransitionNAPI, DocumentTransitionNAPI, DocumentUpdatePriceTransitionNAPI, DynamicValue, EpochBasedDistributionNAPI, ExtendedEpochInfoNAPI, GroupNAPI, GroupStateTransitionInfoNAPI, IdentifierNAPI, IdentityCreateFromAddressesTransitionNAPI, IdentityCreateTransitionNAPI, IdentityCreditTransferNAPI, IdentityCreditTransferToAddressesTransitionNAPI, IdentityCreditWithdrawalTransitionNAPI, IdentityNAPI, IdentityPublicKeyInCreationNAPI, IdentityPublicKeyNAPI, IdentityTokenBalanceNAPI, IdentityTokenBalanceOptionalNAPI, IdentityTokenInfoNAPI, IdentityTopUpFromAddressesTransitionNAPI, IdentityTopUpTransitionNAPI, IdentityUpdateTransitionNAPI, InputAddressNAPI, InstantAssetLockProofNAPI, InstantLockNAPI, MasternodeVoteTransitionNAPI, OutPointNAPI, OutputAddressNAPI, OutputAddressNullableCreditsNAPI, PartialIdentityNAPI, PlatformAddressInfoNAPI, PlatformAddressNAPI, PrefundedVotingBalanceNAPI, PrivateEncryptedNoteNAPI, PrivateKeyNAPI, PublicKeyNAPI, ResourceVoteChoiceNAPI, RewardDistributionTypeNAPI, SharedEncryptedNoteNAPI, StateTransitionNAPI, 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, VerifiedBalanceTransferNAPI, VerifiedContractNAPI, VerifiedDocumentNAPI, VerifiedDocumentsNAPI, VerifiedEpochsInfoNAPI, VerifiedIdentifierByNonUniquePublicKeyHashNAPI, VerifiedIdentityBalanceRootHashNAPI, VerifiedIdentityByIdentifierNAPI, VerifiedIdentityByUniqueKeyHashNAPI, VerifiedIdentityContractNonceNAPI, VerifiedIdentityFullWithAddressInfosNAPI, VerifiedIdentityKeysByIdentifierNAPI, VerifiedIdentityNonceNAPI, VerifiedIdentityTokenInfoNAPI, VerifiedIdentityWithAddressInfosNAPI, VerifiedPlatformAddressesInfosNAPI, VerifiedPlatformAddressInfoNAPI, 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 } = wasm.napiModule.exports;
|
package/dist/src/dpp/dpp.d.ts
CHANGED
|
@@ -109,3 +109,4 @@ export { verifyTokenDirectPurchasePrices } from './verify/Tokens/verifyTokenDire
|
|
|
109
109
|
export { verifyTokenTotalSupplyProof } from './verify/Tokens/verifyTokenTotalSupplyProof.js';
|
|
110
110
|
export { verifyTokensBalancesForIdentityProof } from './verify/Tokens/verifyTokensBalancesForIdentityProof.js';
|
|
111
111
|
export { verifyPlatformAddressInfo } from './verify/PlatformAddress/verifyPlatformAddressInfo.js';
|
|
112
|
+
export { verifyPlatformAddressesInfos } from './verify/PlatformAddress/verifyPlatformAddressesInfos.js';
|
package/dist/src/dpp/dpp.js
CHANGED
|
@@ -109,3 +109,4 @@ export { verifyTokenDirectPurchasePrices } from './verify/Tokens/verifyTokenDire
|
|
|
109
109
|
export { verifyTokenTotalSupplyProof } from './verify/Tokens/verifyTokenTotalSupplyProof.js';
|
|
110
110
|
export { verifyTokensBalancesForIdentityProof } from './verify/Tokens/verifyTokensBalancesForIdentityProof.js';
|
|
111
111
|
export { verifyPlatformAddressInfo } from './verify/PlatformAddress/verifyPlatformAddressInfo.js';
|
|
112
|
+
export { verifyPlatformAddressesInfos } from './verify/PlatformAddress/verifyPlatformAddressesInfos.js';
|
|
@@ -4,7 +4,7 @@ import { IdentifierWASM } from '../Identifier.js';
|
|
|
4
4
|
export class ChainAssetLockProofWASM {
|
|
5
5
|
_rawLockProof;
|
|
6
6
|
constructor(coreChainLockedHeight, outPoint) {
|
|
7
|
-
this._rawLockProof = new dppProvider.dpp.ChainAssetLockProofNAPI(coreChainLockedHeight, outPoint);
|
|
7
|
+
this._rawLockProof = new dppProvider.dpp.ChainAssetLockProofNAPI(coreChainLockedHeight, outPoint._rawOutPoint);
|
|
8
8
|
}
|
|
9
9
|
set coreChainLockedHeight(height) {
|
|
10
10
|
this._rawLockProof.coreChainLockedHeight = height;
|
|
@@ -4,8 +4,8 @@ export declare class AddressWitnessWASM {
|
|
|
4
4
|
/** @private **/
|
|
5
5
|
_rawWitness: AddressWitnessNAPI;
|
|
6
6
|
private constructor();
|
|
7
|
-
P2PKH(signature: Uint8Array): AddressWitnessWASM;
|
|
8
|
-
P2SH(signatures: Uint8Array[], redeemScript: Uint8Array): AddressWitnessWASM;
|
|
7
|
+
static P2PKH(signature: Uint8Array): AddressWitnessWASM;
|
|
8
|
+
static P2SH(signatures: Uint8Array[], redeemScript: Uint8Array): AddressWitnessWASM;
|
|
9
9
|
getType(): string;
|
|
10
10
|
getValue(): AddressWitnessP2PKH | AddressWitnessP2SH;
|
|
11
11
|
static createFromRawInstance(rawInstance: AddressWitnessNAPI): AddressWitnessWASM;
|
|
@@ -5,10 +5,10 @@ export class AddressWitnessWASM {
|
|
|
5
5
|
constructor(witness) {
|
|
6
6
|
this._rawWitness = witness;
|
|
7
7
|
}
|
|
8
|
-
P2PKH(signature) {
|
|
8
|
+
static P2PKH(signature) {
|
|
9
9
|
return AddressWitnessWASM.createFromRawInstance(dppProvider.dpp.AddressWitnessNAPI.P2PKH(signature));
|
|
10
10
|
}
|
|
11
|
-
P2SH(signatures, redeemScript) {
|
|
11
|
+
static P2SH(signatures, redeemScript) {
|
|
12
12
|
return AddressWitnessWASM.createFromRawInstance(dppProvider.dpp.AddressWitnessNAPI.P2SH(signatures, redeemScript));
|
|
13
13
|
}
|
|
14
14
|
getType() {
|
|
@@ -28,6 +28,7 @@ export declare class StateTransitionWASM {
|
|
|
28
28
|
setOwnerId(ownerId: IdentifierLike): void;
|
|
29
29
|
setIdentityContractNonce(nonce: bigint): void;
|
|
30
30
|
setIdentityNonce(nonce: bigint): void;
|
|
31
|
+
getSignableBytes(): Uint8Array;
|
|
31
32
|
bytes(): Uint8Array;
|
|
32
33
|
hex(): string;
|
|
33
34
|
base64(): string;
|
|
@@ -76,6 +76,9 @@ export class StateTransitionWASM {
|
|
|
76
76
|
setIdentityNonce(nonce) {
|
|
77
77
|
this._rawStateTransition.setIdentityNonce(nonce.toString());
|
|
78
78
|
}
|
|
79
|
+
getSignableBytes() {
|
|
80
|
+
return this._rawStateTransition.getSignableBytes();
|
|
81
|
+
}
|
|
79
82
|
bytes() {
|
|
80
83
|
return this._rawStateTransition.bytes();
|
|
81
84
|
}
|
package/dist/src/dpp/types.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ export interface VerifiedIdentityWithAddressInfos {
|
|
|
196
196
|
infos: VerifiedPlatformAddressInfo[];
|
|
197
197
|
}
|
|
198
198
|
export type VerifiedStateTransitionResultVariants = DataContractWASM | IdentityWASM | IdentifierWASM | VerifiedIdentityBalance | VerifiedIdentityTokenInfo | VerifiedTokenPricingSchedule | TokenStatus | VerifiedIdentityBalance[] | PartialIdentityWASM | VerifiedBalanceTransfer | VerifiedDocument[] | DocumentWASM | VerifiedTokenGroupActionWithDocument | VerifiedTokenGroupActionWithTokenBalance | VerifiedTokenGroupActionWithTokenIdentityInfo | VerifiedTokenGroupActionWithTokenPricingSchedule | VoteWASM | VerifiedPlatformAddressInfo[] | VerifiedIdentityFullWithAddressInfos | VerifiedIdentityWithAddressInfos;
|
|
199
|
-
export type VerifiedStateTransitionResultVariantsRAW = protocol.DataContractNAPI | protocol.IdentityNAPI | protocol.IdentifierNAPI | protocol.VerifiedIdentityBalanceNAPI | protocol.VerifiedIdentityTokenInfoNAPI | protocol.VerifiedTokenPricingScheduleNAPI | protocol.TokenStatusNAPI | protocol.VerifiedIdentityBalanceNAPI[] | protocol.PartialIdentityNAPI | protocol.VerifiedBalanceTransferNAPI | protocol.VerifiedDocumentNAPI[] | protocol.DocumentNAPI | protocol.VerifiedTokenGroupActionWithDocumentNAPI | protocol.VerifiedTokenGroupActionWithTokenBalanceNAPI | protocol.VerifiedTokenGroupActionWithTokenIdentityInfoNAPI | protocol.VerifiedTokenGroupActionWithTokenPricingScheduleNAPI | protocol.VoteNAPI | protocol.
|
|
199
|
+
export type VerifiedStateTransitionResultVariantsRAW = protocol.DataContractNAPI | protocol.IdentityNAPI | protocol.IdentifierNAPI | protocol.VerifiedIdentityBalanceNAPI | protocol.VerifiedIdentityTokenInfoNAPI | protocol.VerifiedTokenPricingScheduleNAPI | protocol.TokenStatusNAPI | protocol.VerifiedIdentityBalanceNAPI[] | protocol.PartialIdentityNAPI | protocol.VerifiedBalanceTransferNAPI | protocol.VerifiedDocumentNAPI[] | protocol.DocumentNAPI | protocol.VerifiedTokenGroupActionWithDocumentNAPI | protocol.VerifiedTokenGroupActionWithTokenBalanceNAPI | protocol.VerifiedTokenGroupActionWithTokenIdentityInfoNAPI | protocol.VerifiedTokenGroupActionWithTokenPricingScheduleNAPI | protocol.VoteNAPI | protocol.PlatformAddressInfoNAPI[] | protocol.VerifiedIdentityFullWithAddressInfosNAPI | protocol.VerifiedIdentityWithAddressInfosNAPI;
|
|
200
200
|
export interface VerifiedStateTransitionResult {
|
|
201
201
|
rootHash: Uint8Array;
|
|
202
202
|
result: VerifiedStateTransitionResultVariants;
|
|
@@ -278,3 +278,7 @@ export interface VerifiedTokensBalancesForIdentity {
|
|
|
278
278
|
export type VerifiedPlatformAddressInfoWithRootHash = VerifiedPlatformAddressInfo & {
|
|
279
279
|
rootHash: Uint8Array;
|
|
280
280
|
};
|
|
281
|
+
export interface VerifiedPlatformAddressesInfosWithRootHash {
|
|
282
|
+
rootHash: Uint8Array;
|
|
283
|
+
infos: VerifiedPlatformAddressInfo[];
|
|
284
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { PlatformAddressLike, PlatformVersionLike, VerifiedPlatformAddressesInfosWithRootHash } from '../../types.js';
|
|
2
|
+
export declare function verifyPlatformAddressesInfos(proof: Uint8Array, platformAddresses: PlatformAddressLike[], verifySubsetOfProof: boolean, platformVersion: PlatformVersionLike): VerifiedPlatformAddressesInfosWithRootHash;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
import { preparePlatformAddressValue, valueToDynamicValue } from '../../utils.js';
|
|
3
|
+
import { PlatformAddressWASM } from '../../structs/PlatformAddress/PlatformAddress.js';
|
|
4
|
+
export function verifyPlatformAddressesInfos(proof, platformAddresses, verifySubsetOfProof, platformVersion) {
|
|
5
|
+
const result = dppProvider.dpp.verifyAddressesInfos(proof, platformAddresses.map(preparePlatformAddressValue), verifySubsetOfProof, valueToDynamicValue(platformVersion));
|
|
6
|
+
return {
|
|
7
|
+
rootHash: result.rootHash,
|
|
8
|
+
infos: result.infos.map(({ nonce, credits, address }) => ({
|
|
9
|
+
nonce,
|
|
10
|
+
balance: credits != null ? BigInt(credits) : undefined,
|
|
11
|
+
address: PlatformAddressWASM.createFromRawInstance(address)
|
|
12
|
+
}))
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -93,7 +93,7 @@ function convertArray(result) {
|
|
|
93
93
|
: undefined
|
|
94
94
|
}));
|
|
95
95
|
}
|
|
96
|
-
if (first instanceof dppProvider.dpp.
|
|
96
|
+
if (first instanceof dppProvider.dpp.PlatformAddressInfoNAPI) {
|
|
97
97
|
return result.map(item => ({
|
|
98
98
|
nonce: item.nonce,
|
|
99
99
|
address: PlatformAddressWASM.createFromRawInstance(item.address),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pshenmic-dpp",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.9",
|
|
4
4
|
"main": "dist/src/wasm.js",
|
|
5
5
|
"types": "dist/src/wasm.d.ts",
|
|
6
6
|
"react-native": "./dist/src/react-native.js",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"ts-standard": "^12.0.2"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@emnapi/core": "
|
|
56
|
-
"@emnapi/runtime": "
|
|
55
|
+
"@emnapi/core": "1.9.0",
|
|
56
|
+
"@emnapi/runtime": "1.9.0",
|
|
57
57
|
"@tybys/wasm-util": "^0.10.1",
|
|
58
58
|
"fflate": "^0.8.2"
|
|
59
59
|
}
|