pshenmic-dpp 2.0.0-dev.2 → 2.0.0-dev.20
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 +200 -37
- package/dist/binaries/bindingsTypes.js +4 -3
- package/dist/binaries/native/aarch64-apple-darwin/pshenmic_dpp.node +0 -0
- package/dist/binaries/native/x86_64-apple-darwin/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 +50 -0
- package/dist/binaries/node.d.cts +2 -0
- package/dist/binaries/pshenmic_dpp.android.node/arm64-v8a/libpshenmic_dpp.so +0 -0
- package/dist/binaries/pshenmic_dpp.apple.node/Info.plist +29 -0
- package/dist/binaries/pshenmic_dpp.apple.node/ios-arm64-simulator/libpshenmic_dpp.framework/Info.plist +24 -0
- package/dist/binaries/pshenmic_dpp.apple.node/ios-arm64-simulator/libpshenmic_dpp.framework/libpshenmic_dpp +0 -0
- package/dist/binaries/pshenmic_dpp.apple.node/react-native-node-api-module +0 -0
- package/dist/binaries/pshenmic_dpp.d.ts +15 -1
- package/dist/binaries/pshenmic_dpp.js +1 -1
- package/dist/binaries/wasm/wasmBytes.cjs +3 -0
- package/dist/binaries/wasm/wasmBytes.d.cts +1 -0
- package/dist/binaries/wasm.d.ts +15 -1
- package/dist/binaries/wasm.js +2 -44
- package/dist/binaries/wasmCreation.cjs +46 -0
- package/dist/binaries/wasmCreation.d.cts +2 -0
- package/dist/src/dpp/dpp.d.ts +11 -2
- package/dist/src/dpp/dpp.js +11 -2
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +2 -2
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +3 -3
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +3 -3
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +2 -2
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.js +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +1 -1
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +2 -2
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.d.ts +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +5 -4
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +5 -4
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +4 -3
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +5 -4
- package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.js +2 -2
- package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/OutPoint.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/Transaction.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/TxIn.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/TxOut.js +1 -1
- package/dist/src/dpp/structs/AssetLockProof/Witness.js +1 -1
- package/dist/src/dpp/structs/Batch/BatchTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/BatchedTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentBaseTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransition.d.ts +1 -0
- package/dist/src/dpp/structs/Batch/DocumentTransition.js +4 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.js +2 -2
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.d.ts +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.js +2 -2
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenBaseTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenPaymentInfo.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenPricingSchedule.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransition.d.ts +1 -0
- package/dist/src/dpp/structs/Batch/TokenTransition.js +4 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.js +1 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.d.ts +3 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.js +8 -1
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.js +1 -1
- package/dist/src/dpp/structs/ContractBounds.js +1 -1
- package/dist/src/dpp/structs/CoreScript.js +1 -1
- package/dist/src/dpp/structs/DataContract.d.ts +6 -4
- package/dist/src/dpp/structs/DataContract.js +8 -2
- package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.js +1 -1
- package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.js +1 -1
- package/dist/src/dpp/structs/Document.d.ts +1 -1
- package/dist/src/dpp/structs/Document.js +1 -1
- package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.js +1 -1
- package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.js +1 -1
- package/dist/src/dpp/structs/GroupStateTransitionInfo.js +1 -1
- package/dist/src/dpp/structs/Identifier.js +1 -1
- package/dist/src/dpp/structs/Identity.js +1 -1
- package/dist/src/dpp/structs/IdentityPublicKey.d.ts +1 -0
- package/dist/src/dpp/structs/IdentityPublicKey.js +6 -1
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.d.ts +1 -0
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.js +6 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.js +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.js +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.js +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.js +1 -1
- package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.js +1 -1
- package/dist/src/dpp/structs/InstantLock.js +1 -1
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.d.ts +0 -2
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.js +1 -7
- package/dist/src/dpp/structs/MasternodeVote/Vote.js +1 -1
- package/dist/src/dpp/structs/MasternodeVote/VotePoll.d.ts +1 -1
- package/dist/src/dpp/structs/MasternodeVote/VotePoll.js +3 -3
- package/dist/src/dpp/structs/PartialIdentity.js +1 -1
- package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.d.ts +2 -2
- package/dist/src/dpp/structs/{Address → PlatformAddress}/AddressWitness.js +2 -2
- package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.d.ts +4 -2
- package/dist/src/dpp/structs/{Address → PlatformAddress}/PlatformAddress.js +9 -3
- package/dist/src/dpp/structs/PrivateKey.js +1 -1
- package/dist/src/dpp/structs/PublicKey.js +1 -1
- package/dist/src/dpp/structs/ShieldedTransitions/IdentityCreateFromShieldedPoolTransition.d.ts +31 -0
- package/dist/src/dpp/structs/ShieldedTransitions/IdentityCreateFromShieldedPoolTransition.js +73 -0
- package/dist/src/dpp/structs/ShieldedTransitions/SerializedAction.d.ts +19 -0
- package/dist/src/dpp/structs/ShieldedTransitions/SerializedAction.js +49 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldFromAssetLockTransition.d.ts +30 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldFromAssetLockTransition.js +77 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldTransition.d.ts +32 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldTransition.js +78 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedTransferTransition.d.ts +21 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedTransferTransition.js +51 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedWithdrawalTransition.d.ts +29 -0
- package/dist/src/dpp/structs/ShieldedTransitions/ShieldedWithdrawalTransition.js +71 -0
- package/dist/src/dpp/structs/ShieldedTransitions/UnshieldTransition.d.ts +25 -0
- package/dist/src/dpp/structs/ShieldedTransitions/UnshieldTransition.js +59 -0
- package/dist/src/dpp/structs/StateTransition.d.ts +1 -0
- package/dist/src/dpp/structs/StateTransition.js +3 -0
- package/dist/src/dpp/structs/TokenConfiguration/ActionTaker.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/ChangeControlRules.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/Group.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfiguration.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationConvention.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationLocalization.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRules.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenKeepsHistoryRules.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenMarketplaceRules.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenPerpetualDistribution.js +1 -1
- package/dist/src/dpp/structs/TokenConfiguration/TokenPreProgrammedDistribution.js +1 -1
- package/dist/src/dpp/types.d.ts +50 -11
- package/dist/src/dpp/utils.d.ts +4 -3
- package/dist/src/dpp/utils.js +24 -6
- package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.d.ts +1 -1
- package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.js +1 -1
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.d.ts +2 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.js +12 -0
- 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 +80 -15
- package/dist/src/dpp/verify/System/verifyEpochsInfoProof.js +1 -1
- package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.js +1 -1
- package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.js +1 -1
- package/dist/src/native.d.ts +3 -0
- package/dist/src/native.js +8 -0
- package/dist/utils/{base122.js → base122.cjs} +3 -1
- package/package.json +18 -28
- package/tests/unit/DataContract.spec.ts +281 -0
- package/tests/unit/DynamicValue.spec.ts +42 -2
- package/tests/unit/Identifier.spec.ts +1 -1
- package/tests/unit/Identity.spec.ts +1 -1
- package/tests/unit/IdentityPublicKey.spec.ts +1 -1
- package/tests/unit/NodeApi.spec.ts +49 -0
- package/tests/unit/ShieldedTransitions.spec.ts +709 -0
- package/tests/unit/TokenConfiguration.spec.ts +114 -0
- package/tests/unit/WebAssembly.spec.ts +49 -0
- package/tests/unit/utils/buildTokenConfiguration.ts +66 -0
- package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
- package/dist/binaries/wasm/wasmBytes.d.ts +0 -2
- package/dist/binaries/wasm/wasmBytes.js +0 -2
- /package/dist/utils/{base122.d.ts → base122.d.cts} +0 -0
|
@@ -111,6 +111,12 @@ export declare class AssetLockProofNAPI {
|
|
|
111
111
|
hex(): string;
|
|
112
112
|
static fromHex(assetLockProof: string): AssetLockProofNAPI;
|
|
113
113
|
}
|
|
114
|
+
export declare class AssetLockValueNAPI {
|
|
115
|
+
get initialCreditValue(): BigIntString;
|
|
116
|
+
get txOutScript(): Uint8Array;
|
|
117
|
+
get remainingCreditValue(): BigIntString;
|
|
118
|
+
get usedTags(): Array<Uint8Array>;
|
|
119
|
+
}
|
|
114
120
|
export declare class AuthorizedActionTakersNAPI {
|
|
115
121
|
static NoOne(): AuthorizedActionTakersNAPI;
|
|
116
122
|
static ContractOwner(): AuthorizedActionTakersNAPI;
|
|
@@ -451,6 +457,7 @@ export declare class DynamicValue {
|
|
|
451
457
|
get value(): any;
|
|
452
458
|
set value(value: any);
|
|
453
459
|
isBigInt(): boolean;
|
|
460
|
+
getType(): string;
|
|
454
461
|
}
|
|
455
462
|
export declare class EpochBasedDistributionNAPI {
|
|
456
463
|
interval: number;
|
|
@@ -516,6 +523,27 @@ export declare class IdentityCreateFromAddressesTransitionNAPI {
|
|
|
516
523
|
static fromStateTransition(st: StateTransitionNAPI): IdentityCreateFromAddressesTransitionNAPI;
|
|
517
524
|
toStateTransition(): StateTransitionNAPI;
|
|
518
525
|
}
|
|
526
|
+
export declare class IdentityCreateFromShieldedPoolTransitionNAPI {
|
|
527
|
+
constructor(jsPublicKeys: Array<IdentityPublicKeyInCreationNAPI>, jsDenomination: BigIntString, jsActions: Array<SerializedActionNAPI>, jsAnchor: Uint8Array, jsProof: Uint8Array, jsBindingsSignature: Uint8Array, jsSendToAddressOnCreationFailure: PlatformAddressLikeNAPI, jsIdentityId: IdentifierLikeNAPI);
|
|
528
|
+
get publicKeys(): Array<IdentityPublicKeyInCreationNAPI>;
|
|
529
|
+
get denomination(): BigIntString;
|
|
530
|
+
get actions(): Array<SerializedActionNAPI>;
|
|
531
|
+
get anchor(): Uint8Array;
|
|
532
|
+
get proof(): Uint8Array;
|
|
533
|
+
get bindingsSignature(): Uint8Array;
|
|
534
|
+
get sendToAddressOnCreationFailure(): PlatformAddressNAPI;
|
|
535
|
+
get identityId(): IdentifierNAPI;
|
|
536
|
+
set publicKeys(jsPublicKeys: Array<IdentityPublicKeyInCreationNAPI>);
|
|
537
|
+
set denomination(denomination: BigIntString);
|
|
538
|
+
set actions(actions: Array<SerializedActionNAPI>);
|
|
539
|
+
set anchor(jsAnchor: Uint8Array);
|
|
540
|
+
set proof(proof: Uint8Array);
|
|
541
|
+
set bindingsSignature(jsBindingsSignature: Uint8Array);
|
|
542
|
+
set sendToAddressOnCreationFailure(jsAddress: PlatformAddressLikeNAPI);
|
|
543
|
+
set identityId(jsId: IdentifierLikeNAPI);
|
|
544
|
+
toStateTransition(): StateTransitionNAPI;
|
|
545
|
+
static fromStateTransition(st: StateTransitionNAPI): IdentityCreateFromShieldedPoolTransitionNAPI;
|
|
546
|
+
}
|
|
519
547
|
export declare class IdentityCreateTransitionNAPI {
|
|
520
548
|
constructor(jsPublicKeys: Array<IdentityPublicKeyInCreationNAPI>, assetLock: AssetLockProofNAPI, signature?: Uint8Array | undefined | null, userFeeIncrease?: number | undefined | null);
|
|
521
549
|
static default(jsPlatformVersion: DynamicValue): IdentityCreateTransitionNAPI;
|
|
@@ -698,6 +726,10 @@ export declare class IdentityTokenBalanceNAPI {
|
|
|
698
726
|
get id(): IdentifierNAPI;
|
|
699
727
|
}
|
|
700
728
|
export type VerifiedIdentityBalanceNAPI = IdentityTokenBalanceNAPI;
|
|
729
|
+
export declare class IdentityTokenBalanceOptionalNAPI {
|
|
730
|
+
balance?: BigIntString;
|
|
731
|
+
get id(): IdentifierNAPI;
|
|
732
|
+
}
|
|
701
733
|
export declare class IdentityTokenInfoNAPI {
|
|
702
734
|
get frozen(): boolean;
|
|
703
735
|
set frozen(frozen: boolean);
|
|
@@ -777,11 +809,11 @@ export declare class IdentityUpdateTransitionNAPI {
|
|
|
777
809
|
static fromStateTransition(st: StateTransitionNAPI): IdentityUpdateTransitionNAPI;
|
|
778
810
|
}
|
|
779
811
|
export declare class InputAddressNAPI {
|
|
780
|
-
constructor(address:
|
|
812
|
+
constructor(address: PlatformAddressLikeNAPI, nonce: number, credits: BigIntString);
|
|
781
813
|
get address(): PlatformAddressNAPI;
|
|
782
814
|
get nonce(): number;
|
|
783
815
|
get credits(): BigIntString;
|
|
784
|
-
set address(address:
|
|
816
|
+
set address(address: PlatformAddressLikeNAPI);
|
|
785
817
|
set nonce(nonce: number);
|
|
786
818
|
set credits(credits: BigIntString);
|
|
787
819
|
}
|
|
@@ -831,10 +863,8 @@ export declare class MasternodeVoteTransitionNAPI {
|
|
|
831
863
|
hex(): string;
|
|
832
864
|
base64(): string;
|
|
833
865
|
static fromBytes(jsBytes: Uint8Array): MasternodeVoteTransitionNAPI;
|
|
834
|
-
get userFeeIncrease(): number;
|
|
835
866
|
getSignableBytes(): Uint8Array;
|
|
836
867
|
get assetLock(): AssetLockProofNAPI | null;
|
|
837
|
-
set userFeeIncrease(amount: number);
|
|
838
868
|
get modifiedDataIds(): Array<IdentifierNAPI>;
|
|
839
869
|
toStateTransition(): StateTransitionNAPI;
|
|
840
870
|
static fromStateTransition(st: StateTransitionNAPI): MasternodeVoteTransitionNAPI;
|
|
@@ -851,17 +881,17 @@ export declare class OutPointNAPI {
|
|
|
851
881
|
static fromBase64(base64: string): OutPointNAPI;
|
|
852
882
|
}
|
|
853
883
|
export declare class OutputAddressNAPI {
|
|
854
|
-
constructor(address:
|
|
884
|
+
constructor(address: PlatformAddressLikeNAPI, credits: BigIntString);
|
|
855
885
|
get address(): PlatformAddressNAPI;
|
|
856
886
|
get credits(): BigIntString;
|
|
857
|
-
set address(address:
|
|
887
|
+
set address(address: PlatformAddressLikeNAPI);
|
|
858
888
|
set credits(credits: BigIntString);
|
|
859
889
|
}
|
|
860
890
|
export declare class OutputAddressNullableCreditsNAPI {
|
|
861
|
-
constructor(address:
|
|
891
|
+
constructor(address: PlatformAddressLikeNAPI, credits?: BigIntString | undefined | null);
|
|
862
892
|
get address(): PlatformAddressNAPI;
|
|
863
893
|
get credits(): BigIntString | null;
|
|
864
|
-
set address(address:
|
|
894
|
+
set address(address: PlatformAddressLikeNAPI);
|
|
865
895
|
set credits(credits: BigIntString | undefined | null);
|
|
866
896
|
}
|
|
867
897
|
export declare class PartialIdentityNAPI {
|
|
@@ -877,14 +907,21 @@ export declare class PartialIdentityNAPI {
|
|
|
877
907
|
set revision(revision: BigIntString | undefined | null);
|
|
878
908
|
set notFoundPublicKeys(keys: Array<number> | undefined | null);
|
|
879
909
|
}
|
|
910
|
+
export declare class PlatformAddressInfoNAPI {
|
|
911
|
+
nonce?: number;
|
|
912
|
+
get address(): PlatformAddressNAPI;
|
|
913
|
+
get credits(): BigIntString | null;
|
|
914
|
+
}
|
|
880
915
|
export declare class PlatformAddressNAPI {
|
|
881
|
-
constructor(address:
|
|
916
|
+
constructor(address: PlatformAddressLikeNAPI);
|
|
882
917
|
bytes(): Uint8Array;
|
|
883
918
|
toAddress(jsNetwork: DynamicValue): string;
|
|
884
919
|
toBech32m(jsNetwork: DynamicValue): string;
|
|
885
920
|
isP2PKH(): boolean;
|
|
886
921
|
isP2SH(): boolean;
|
|
887
922
|
hash(): Uint8Array;
|
|
923
|
+
static fromBech32m(bech32M: string): PlatformAddressNAPI;
|
|
924
|
+
static fromBytes(bytes: Uint8Array): PlatformAddressNAPI;
|
|
888
925
|
}
|
|
889
926
|
export declare class PrefundedVotingBalanceNAPI {
|
|
890
927
|
constructor(indexName: string, credits: BigIntString);
|
|
@@ -938,6 +975,21 @@ export declare class RewardDistributionTypeNAPI {
|
|
|
938
975
|
static EpochBasedDistribution(interval: number, distributionFunction: DistributionFunctionNAPI): RewardDistributionTypeNAPI;
|
|
939
976
|
getDistribution(): BlockBasedDistributionNAPI | TimeBasedDistributionNAPI | EpochBasedDistributionNAPI;
|
|
940
977
|
}
|
|
978
|
+
export declare class SerializedActionNAPI {
|
|
979
|
+
constructor(jsNullifier: Uint8Array, jsRk: Uint8Array, jsCmx: Uint8Array, jsEncryptedNote: Uint8Array, jsCvNet: Uint8Array, jsSpendAuthSig: Uint8Array);
|
|
980
|
+
get nullifier(): Uint8Array;
|
|
981
|
+
get rk(): Uint8Array;
|
|
982
|
+
get cmx(): Uint8Array;
|
|
983
|
+
get encrypted_note(): Uint8Array;
|
|
984
|
+
get cvNet(): Uint8Array;
|
|
985
|
+
get spendAuthSig(): Uint8Array;
|
|
986
|
+
set nullifier(jsNullifier: Uint8Array);
|
|
987
|
+
set rk(jsRk: Uint8Array);
|
|
988
|
+
set cmx(jsCmx: Uint8Array);
|
|
989
|
+
set encrypted_note(jsEncryptedNote: Uint8Array);
|
|
990
|
+
set cvNet(jsCvNet: Uint8Array);
|
|
991
|
+
set spendAuthSig(jsSpendAuthSig: Uint8Array);
|
|
992
|
+
}
|
|
941
993
|
export declare class SharedEncryptedNoteNAPI {
|
|
942
994
|
constructor(senderKeyIndex: number, recipientKeyIndex: number, value: Uint8Array);
|
|
943
995
|
get senderKeyIndex(): number;
|
|
@@ -947,6 +999,86 @@ export declare class SharedEncryptedNoteNAPI {
|
|
|
947
999
|
set recipientKeyIndex(index: number);
|
|
948
1000
|
set value(value: Uint8Array);
|
|
949
1001
|
}
|
|
1002
|
+
export declare class ShieldedTransferTransitionNAPI {
|
|
1003
|
+
constructor(jsActions: Array<SerializedActionNAPI>, jsValueBalance: BigIntString, jsAnchor: Uint8Array, jsProof: Uint8Array, jsBindingsSignature: Uint8Array);
|
|
1004
|
+
get actions(): Array<SerializedActionNAPI>;
|
|
1005
|
+
get valueBalance(): BigIntString;
|
|
1006
|
+
get anchor(): Uint8Array;
|
|
1007
|
+
get proof(): Uint8Array;
|
|
1008
|
+
get bindingsSignature(): Uint8Array;
|
|
1009
|
+
set actions(actions: Array<SerializedActionNAPI>);
|
|
1010
|
+
set valueBalance(amount: BigIntString);
|
|
1011
|
+
set anchor(jsAnchor: Uint8Array);
|
|
1012
|
+
set proof(proof: Uint8Array);
|
|
1013
|
+
set bindingsSignature(jsBindingsSignature: Uint8Array);
|
|
1014
|
+
toStateTransition(): StateTransitionNAPI;
|
|
1015
|
+
static fromStateTransition(st: StateTransitionNAPI): ShieldedTransferTransitionNAPI;
|
|
1016
|
+
}
|
|
1017
|
+
export declare class ShieldedWithdrawalTransitionNAPI {
|
|
1018
|
+
constructor(jsActions: Array<SerializedActionNAPI>, jsUnshieldingAmount: BigIntString, jsAnchor: Uint8Array, jsProof: Uint8Array, jsBindingsSignature: Uint8Array, coreFeePerByte: number, jsPooling: DynamicValue, jsOutputScript: CoreScriptNAPI);
|
|
1019
|
+
get actions(): Array<SerializedActionNAPI>;
|
|
1020
|
+
get unshieldingAmount(): BigIntString;
|
|
1021
|
+
get anchor(): Uint8Array;
|
|
1022
|
+
get proof(): Uint8Array;
|
|
1023
|
+
get bindingsSignature(): Uint8Array;
|
|
1024
|
+
get coreFeePerByte(): number;
|
|
1025
|
+
get pooling(): string;
|
|
1026
|
+
get outputScript(): CoreScriptNAPI;
|
|
1027
|
+
set actions(actions: Array<SerializedActionNAPI>);
|
|
1028
|
+
set unshieldingAmount(amount: BigIntString);
|
|
1029
|
+
set anchor(jsAnchor: Uint8Array);
|
|
1030
|
+
set proof(proof: Uint8Array);
|
|
1031
|
+
set bindingsSignature(jsBindingsSignature: Uint8Array);
|
|
1032
|
+
set coreFeePerByte(coreFeePerByte: number);
|
|
1033
|
+
set pooling(jsPooling: DynamicValue);
|
|
1034
|
+
set outputScript(outputScript: CoreScriptNAPI);
|
|
1035
|
+
toStateTransition(): StateTransitionNAPI;
|
|
1036
|
+
static fromStateTransition(st: StateTransitionNAPI): ShieldedWithdrawalTransitionNAPI;
|
|
1037
|
+
}
|
|
1038
|
+
export declare class ShieldFromAssetLockTransitionNAPI {
|
|
1039
|
+
constructor(jsAssetLockProof: AssetLockProofNAPI, jsActions: Array<SerializedActionNAPI>, jsValueBalance: BigIntString, jsAnchor: Uint8Array, jsProof: Uint8Array, jsBindingsSignature: Uint8Array, jsSurplusOutput?: PlatformAddressLikeNAPI | undefined | null);
|
|
1040
|
+
get assetLockProof(): AssetLockProofNAPI;
|
|
1041
|
+
get actions(): Array<SerializedActionNAPI>;
|
|
1042
|
+
get valueBalance(): BigIntString;
|
|
1043
|
+
get anchor(): Uint8Array;
|
|
1044
|
+
get proof(): Uint8Array;
|
|
1045
|
+
get bindingsSignature(): Uint8Array;
|
|
1046
|
+
get surplusOutput(): PlatformAddressNAPI | null;
|
|
1047
|
+
get signature(): Uint8Array;
|
|
1048
|
+
set assetLockProof(jsAssetLockProof: AssetLockProofNAPI);
|
|
1049
|
+
set actions(actions: Array<SerializedActionNAPI>);
|
|
1050
|
+
set valueBalance(amount: BigIntString);
|
|
1051
|
+
set anchor(jsAnchor: Uint8Array);
|
|
1052
|
+
set proof(proof: Uint8Array);
|
|
1053
|
+
set bindingsSignature(jsBindingsSignature: Uint8Array);
|
|
1054
|
+
set surplusOutput(jsSurplusOutput: PlatformAddressLikeNAPI | undefined | null);
|
|
1055
|
+
set signature(signature: Uint8Array);
|
|
1056
|
+
toStateTransition(): StateTransitionNAPI;
|
|
1057
|
+
static fromStateTransition(st: StateTransitionNAPI): ShieldFromAssetLockTransitionNAPI;
|
|
1058
|
+
}
|
|
1059
|
+
export declare class ShieldTransitionNAPI {
|
|
1060
|
+
constructor(jsInputs: Array<InputAddressNAPI>, jsActions: Array<SerializedActionNAPI>, jsAmount: BigIntString, jsAnchor: Uint8Array, jsProof: Uint8Array, jsBindingsSignature: Uint8Array, jsFeeStrategy: Array<AddressFundsFeeStrategyStepNAPI>, userFeeIncrease: number, jsInputWitnesses: Array<AddressWitnessNAPI>);
|
|
1061
|
+
get inputs(): Array<InputAddressNAPI>;
|
|
1062
|
+
get actions(): Array<SerializedActionNAPI>;
|
|
1063
|
+
get amount(): BigIntString;
|
|
1064
|
+
get anchor(): Uint8Array;
|
|
1065
|
+
get proof(): Uint8Array;
|
|
1066
|
+
get bindingsSignature(): Uint8Array;
|
|
1067
|
+
get feeStrategy(): Array<AddressFundsFeeStrategyStepNAPI>;
|
|
1068
|
+
get userFeeIncrease(): number;
|
|
1069
|
+
get inputWitnesses(): Array<AddressWitnessNAPI>;
|
|
1070
|
+
set inputs(jsInputs: Array<InputAddressNAPI>);
|
|
1071
|
+
set actions(actions: Array<SerializedActionNAPI>);
|
|
1072
|
+
set amount(amount: BigIntString);
|
|
1073
|
+
set anchor(jsAnchor: Uint8Array);
|
|
1074
|
+
set proof(proof: Uint8Array);
|
|
1075
|
+
set bindingsSignature(jsBindingsSignature: Uint8Array);
|
|
1076
|
+
set feeStrategy(feeStrategy: Array<AddressFundsFeeStrategyStepNAPI>);
|
|
1077
|
+
set userFeeIncrease(userFeeIncrease: number);
|
|
1078
|
+
set inputWitnesses(jsInputWitnesses: Array<AddressWitnessNAPI>);
|
|
1079
|
+
toStateTransition(): StateTransitionNAPI;
|
|
1080
|
+
static fromStateTransition(st: StateTransitionNAPI): ShieldTransitionNAPI;
|
|
1081
|
+
}
|
|
950
1082
|
export declare class StateTransitionNAPI {
|
|
951
1083
|
sign(jsPrivateKey: DynamicValue | PrivateKeyNAPI, publicKey: IdentityPublicKeyNAPI): Uint8Array;
|
|
952
1084
|
signByPrivateKey(jsPrivateKey: DynamicValue | PrivateKeyNAPI, keyId?: number | undefined | null, jsKeyType?: DynamicValue | undefined | null): Uint8Array;
|
|
@@ -972,10 +1104,15 @@ export declare class StateTransitionNAPI {
|
|
|
972
1104
|
set signature(signature: Uint8Array);
|
|
973
1105
|
set signaturePublicKeyId(keyId: number);
|
|
974
1106
|
set userFeeIncrease(userFeeIncrease: number);
|
|
1107
|
+
getSignableBytes(): Uint8Array;
|
|
975
1108
|
setOwnerId(jsOwnerId: IdentifierLikeNAPI): void;
|
|
976
1109
|
setIdentityContractNonce(nonce: BigIntString): void;
|
|
977
1110
|
setIdentityNonce(nonce: BigIntString): void;
|
|
978
1111
|
}
|
|
1112
|
+
export declare class StoredAssetLockInfoNAPI {
|
|
1113
|
+
get type(): string;
|
|
1114
|
+
get value(): AssetLockValueNAPI | null;
|
|
1115
|
+
}
|
|
979
1116
|
export declare class TimeBasedDistributionNAPI {
|
|
980
1117
|
interval: BigIntString;
|
|
981
1118
|
get function(): DistributionFunctionNAPI;
|
|
@@ -1341,10 +1478,22 @@ export declare class TxOutNAPI {
|
|
|
1341
1478
|
set scriptPubKeyBytes(scriptPubkeyBytes: Uint8Array);
|
|
1342
1479
|
getScriptPubKeyASM(): string;
|
|
1343
1480
|
}
|
|
1344
|
-
export declare class
|
|
1345
|
-
|
|
1346
|
-
get
|
|
1347
|
-
get
|
|
1481
|
+
export declare class UnshieldTransitionNAPI {
|
|
1482
|
+
constructor(jsOutputAddress: PlatformAddressLikeNAPI, jsActions: Array<SerializedActionNAPI>, jsUnshieldingAmount: BigIntString, jsAnchor: Uint8Array, jsProof: Uint8Array, jsBindingsSignature: Uint8Array);
|
|
1483
|
+
get outputAddress(): PlatformAddressNAPI;
|
|
1484
|
+
get actions(): Array<SerializedActionNAPI>;
|
|
1485
|
+
get unshieldingAmount(): BigIntString;
|
|
1486
|
+
get anchor(): Uint8Array;
|
|
1487
|
+
get proof(): Uint8Array;
|
|
1488
|
+
get bindingsSignature(): Uint8Array;
|
|
1489
|
+
set outputAddress(jsOutputAddress: PlatformAddressLikeNAPI);
|
|
1490
|
+
set actions(actions: Array<SerializedActionNAPI>);
|
|
1491
|
+
set unshieldingAmount(amount: BigIntString);
|
|
1492
|
+
set anchor(jsAnchor: Uint8Array);
|
|
1493
|
+
set proof(proof: Uint8Array);
|
|
1494
|
+
set bindingsSignature(jsBindingsSignature: Uint8Array);
|
|
1495
|
+
toStateTransition(): StateTransitionNAPI;
|
|
1496
|
+
static fromStateTransition(st: StateTransitionNAPI): UnshieldTransitionNAPI;
|
|
1348
1497
|
}
|
|
1349
1498
|
export declare class VerifiedBalanceTransferNAPI {
|
|
1350
1499
|
get sender(): PartialIdentityNAPI;
|
|
@@ -1395,7 +1544,7 @@ export declare class VerifiedIdentityContractNonceNAPI {
|
|
|
1395
1544
|
}
|
|
1396
1545
|
export declare class VerifiedIdentityFullWithAddressInfosNAPI {
|
|
1397
1546
|
get identity(): IdentityNAPI;
|
|
1398
|
-
get infos(): Array<
|
|
1547
|
+
get infos(): Array<PlatformAddressInfoNAPI>;
|
|
1399
1548
|
}
|
|
1400
1549
|
export declare class VerifiedIdentityKeysByIdentifierNAPI {
|
|
1401
1550
|
rootHash: Uint8Array;
|
|
@@ -1412,15 +1561,25 @@ export declare class VerifiedIdentityTokenInfoNAPI {
|
|
|
1412
1561
|
}
|
|
1413
1562
|
export declare class VerifiedIdentityWithAddressInfosNAPI {
|
|
1414
1563
|
get identity(): PartialIdentityNAPI;
|
|
1415
|
-
get infos(): Array<
|
|
1564
|
+
get infos(): Array<PlatformAddressInfoNAPI>;
|
|
1565
|
+
}
|
|
1566
|
+
export declare class VerifiedPlatformAddressesInfosNAPI {
|
|
1567
|
+
rootHash: Uint8Array;
|
|
1568
|
+
get infos(): Array<PlatformAddressInfoNAPI>;
|
|
1569
|
+
}
|
|
1570
|
+
export declare class VerifiedPlatformAddressInfoNAPI {
|
|
1571
|
+
rootHash: Uint8Array;
|
|
1572
|
+
nonce?: number;
|
|
1573
|
+
balance?: BigIntString;
|
|
1574
|
+
get address(): PlatformAddressNAPI | null;
|
|
1416
1575
|
}
|
|
1417
1576
|
export declare class VerifiedStateTransitionResultNAPI {
|
|
1418
1577
|
rootHash: Uint8Array;
|
|
1419
|
-
get result(): DataContractNAPI | IdentityNAPI | IdentifierNAPI | VerifiedIdentityBalanceNAPI | VerifiedIdentityTokenInfoNAPI | VerifiedTokenPricingScheduleNAPI | TokenStatusNAPI | Array<VerifiedIdentityBalanceNAPI> | PartialIdentityNAPI | VerifiedBalanceTransferNAPI | Array<VerifiedDocumentNAPI> | DocumentNAPI | VerifiedTokenGroupActionWithDocumentNAPI | VerifiedTokenGroupActionWithTokenBalanceNAPI | VerifiedTokenGroupActionWithTokenIdentityInfoNAPI | VerifiedTokenGroupActionWithTokenPricingScheduleNAPI | VoteNAPI | Array<
|
|
1578
|
+
get result(): DataContractNAPI | IdentityNAPI | IdentifierNAPI | VerifiedIdentityBalanceNAPI | VerifiedIdentityTokenInfoNAPI | VerifiedTokenPricingScheduleNAPI | TokenStatusNAPI | Array<VerifiedIdentityBalanceNAPI> | PartialIdentityNAPI | VerifiedBalanceTransferNAPI | Array<VerifiedDocumentNAPI> | DocumentNAPI | VerifiedTokenGroupActionWithDocumentNAPI | VerifiedTokenGroupActionWithTokenBalanceNAPI | VerifiedTokenGroupActionWithTokenIdentityInfoNAPI | VerifiedTokenGroupActionWithTokenPricingScheduleNAPI | VoteNAPI | Array<PlatformAddressInfoNAPI> | VerifiedIdentityFullWithAddressInfosNAPI | VerifiedIdentityWithAddressInfosNAPI | StoredAssetLockInfoNAPI | Array<[Uint8Array, boolean]> | [Array<[Uint8Array, boolean]>, Array<PlatformAddressInfoNAPI>] | [Array<[Uint8Array, boolean]>, Array<VerifiedDocumentNAPI>] | [StoredAssetLockInfoNAPI, Array<PlatformAddressInfoNAPI>] | [IdentityNAPI, Array<[Uint8Array, boolean]>];
|
|
1420
1579
|
}
|
|
1421
1580
|
export declare class VerifiedTokenBalancesForIdentitiesNAPI {
|
|
1422
1581
|
rootHash: Uint8Array;
|
|
1423
|
-
get balances(): Array<
|
|
1582
|
+
get balances(): Array<IdentityTokenBalanceOptionalNAPI>;
|
|
1424
1583
|
}
|
|
1425
1584
|
export declare class VerifiedTokenContractInfoNAPI {
|
|
1426
1585
|
rootHash: Uint8Array;
|
|
@@ -1455,7 +1614,7 @@ export declare class VerifiedTokenPricingScheduleNAPI {
|
|
|
1455
1614
|
}
|
|
1456
1615
|
export declare class VerifiedTokensBalancesForIdentityNAPI {
|
|
1457
1616
|
rootHash: Uint8Array;
|
|
1458
|
-
get balances(): Array<
|
|
1617
|
+
get balances(): Array<IdentityTokenBalanceOptionalNAPI>;
|
|
1459
1618
|
}
|
|
1460
1619
|
export declare class VerifiedTokenTotalSupplyNAPI {
|
|
1461
1620
|
rootHash: Uint8Array;
|
|
@@ -1484,7 +1643,7 @@ export declare class VotePollNAPI {
|
|
|
1484
1643
|
get contractId(): IdentifierNAPI;
|
|
1485
1644
|
get documentTypeName(): string;
|
|
1486
1645
|
get indexName(): string;
|
|
1487
|
-
get indexValues(): Array<
|
|
1646
|
+
get indexValues(): Array<string>;
|
|
1488
1647
|
set contractId(jsContractId: IdentifierLikeNAPI);
|
|
1489
1648
|
set documentTypeName(documentTypeName: string);
|
|
1490
1649
|
set indexName(indexName: string);
|
|
@@ -1497,7 +1656,7 @@ export declare class WitnessNAPI {
|
|
|
1497
1656
|
clear(): void;
|
|
1498
1657
|
push(newElement: Uint8Array): void;
|
|
1499
1658
|
}
|
|
1500
|
-
export declare
|
|
1659
|
+
export declare enum ActionGoalNAPI {
|
|
1501
1660
|
ActionCompletion = 0,
|
|
1502
1661
|
ActionParticipation = 1
|
|
1503
1662
|
}
|
|
@@ -1508,11 +1667,11 @@ export interface AddressWitnessP2shNAPI {
|
|
|
1508
1667
|
signatures: Array<Array<number>>;
|
|
1509
1668
|
redeemScript: Uint8Array;
|
|
1510
1669
|
}
|
|
1511
|
-
export declare
|
|
1670
|
+
export declare enum AssetLockProofTypeNAPI {
|
|
1512
1671
|
Instant = 0,
|
|
1513
1672
|
Chain = 1
|
|
1514
1673
|
}
|
|
1515
|
-
export declare
|
|
1674
|
+
export declare enum BatchTypeNAPI {
|
|
1516
1675
|
Create = 0,
|
|
1517
1676
|
Replace = 1,
|
|
1518
1677
|
Delete = 2,
|
|
@@ -1600,12 +1759,12 @@ export interface DistributionStepwiseStepNAPI {
|
|
|
1600
1759
|
step: BigIntString;
|
|
1601
1760
|
amount: BigIntString;
|
|
1602
1761
|
}
|
|
1603
|
-
export declare
|
|
1762
|
+
export declare enum GasFeesPaidByNAPI {
|
|
1604
1763
|
DocumentOwner = 0,
|
|
1605
1764
|
ContractOwner = 1,
|
|
1606
1765
|
PreferContractOwner = 2
|
|
1607
1766
|
}
|
|
1608
|
-
export declare
|
|
1767
|
+
export declare enum GroupActionStatusNAPI {
|
|
1609
1768
|
ActionActive = 0,
|
|
1610
1769
|
ActionClosed = 1
|
|
1611
1770
|
}
|
|
@@ -1615,20 +1774,21 @@ export interface InstantAssetLockProofRAW {
|
|
|
1615
1774
|
transaction: Uint8Array;
|
|
1616
1775
|
outputIndex: number;
|
|
1617
1776
|
}
|
|
1618
|
-
export declare
|
|
1777
|
+
export declare enum KeyTypeNAPI {
|
|
1619
1778
|
ECDSA_SECP256K1 = 0,
|
|
1620
1779
|
BLS12_381 = 1,
|
|
1621
1780
|
ECDSA_HASH160 = 2,
|
|
1622
1781
|
BIP13_SCRIPT_HASH = 3,
|
|
1623
1782
|
EDDSA_25519_HASH160 = 4
|
|
1624
1783
|
}
|
|
1625
|
-
export declare
|
|
1784
|
+
export declare enum NetworkNAPI {
|
|
1626
1785
|
Mainnet = 0,
|
|
1627
1786
|
Testnet = 1,
|
|
1628
1787
|
Devnet = 2,
|
|
1629
1788
|
Regtest = 3
|
|
1630
1789
|
}
|
|
1631
|
-
export
|
|
1790
|
+
export type PlatformAddressLikeNAPI = PlatformAddressNAPI | DynamicValue;
|
|
1791
|
+
export declare enum PlatformVersionNAPI {
|
|
1632
1792
|
PLATFORM_V1 = 1,
|
|
1633
1793
|
PLATFORM_V2 = 2,
|
|
1634
1794
|
PLATFORM_V3 = 3,
|
|
@@ -1639,14 +1799,15 @@ export declare const enum PlatformVersionNAPI {
|
|
|
1639
1799
|
PLATFORM_V8 = 8,
|
|
1640
1800
|
PLATFORM_V9 = 9,
|
|
1641
1801
|
PLATFORM_V10 = 10,
|
|
1642
|
-
PLATFORM_V11 = 11
|
|
1802
|
+
PLATFORM_V11 = 11,
|
|
1803
|
+
PLATFORM_V12 = 12
|
|
1643
1804
|
}
|
|
1644
|
-
export declare
|
|
1805
|
+
export declare enum PoolingNAPI {
|
|
1645
1806
|
Never = 0,
|
|
1646
1807
|
IfAvailable = 1,
|
|
1647
1808
|
Standard = 2
|
|
1648
1809
|
}
|
|
1649
|
-
export declare
|
|
1810
|
+
export declare enum PurposeNAPI {
|
|
1650
1811
|
AUTHENTICATION = 0,
|
|
1651
1812
|
ENCRYPTION = 1,
|
|
1652
1813
|
DECRYPTION = 2,
|
|
@@ -1655,7 +1816,7 @@ export declare const enum PurposeNAPI {
|
|
|
1655
1816
|
VOTING = 5,
|
|
1656
1817
|
OWNER = 6
|
|
1657
1818
|
}
|
|
1658
|
-
export declare
|
|
1819
|
+
export declare enum SecurityLevelNAPI {
|
|
1659
1820
|
MASTER = 0,
|
|
1660
1821
|
CRITICAL = 1,
|
|
1661
1822
|
HIGH = 2,
|
|
@@ -1666,14 +1827,16 @@ export interface TokenConfigurationLocalizationJsonNAPI {
|
|
|
1666
1827
|
singularForm: string;
|
|
1667
1828
|
pluralForm: string;
|
|
1668
1829
|
}
|
|
1669
|
-
export declare
|
|
1830
|
+
export declare enum TokenDistributionTypeNAPI {
|
|
1670
1831
|
PreProgrammed = 0,
|
|
1671
1832
|
Perpetual = 1
|
|
1672
1833
|
}
|
|
1673
|
-
export declare
|
|
1834
|
+
export declare enum TokenEmergencyActionNAPI {
|
|
1674
1835
|
Pause = 0,
|
|
1675
1836
|
Resume = 1
|
|
1676
1837
|
}
|
|
1838
|
+
export declare function verifyAddressesInfos(proof: Uint8Array, jsPlatformAddresses: Array<PlatformAddressLikeNAPI>, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedPlatformAddressesInfosNAPI;
|
|
1839
|
+
export declare function verifyAddressInfo(proof: Uint8Array, jsPlatformAddress: PlatformAddressLikeNAPI, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedPlatformAddressInfoNAPI;
|
|
1677
1840
|
export declare function verifyContractProof(proof: Uint8Array, contractKnownKeepsHistory: boolean | undefined | null, isProofSubset: boolean, inMultipleContractProofForm: boolean, jsContractId: IdentifierLikeNAPI, jsPlatformVersion: DynamicValue): VerifiedContractNAPI;
|
|
1678
1841
|
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;
|
|
1679
1842
|
export declare function verifyEpochsInfoProof(proof: Uint8Array, currentEpoch: number, startEpoch: number | undefined | null, count: number, ascending: boolean, jsPlatformVersion: DynamicValue): VerifiedEpochsInfoNAPI;
|
|
@@ -1693,8 +1856,8 @@ export declare function verifyTokensBalancesForIdentityProof(proof: Uint8Array,
|
|
|
1693
1856
|
export declare function verifyTokenTotalSupplyProof(proof: Uint8Array, jsTokenId: IdentifierLikeNAPI, verifySubsetOfProof: boolean, jsPlatformVersion: DynamicValue): VerifiedTokenTotalSupplyNAPI;
|
|
1694
1857
|
export declare function verifyTotalCreditsProof(proof: Uint8Array, coreSubsidyHalvingInterval: number, activationCoreHeight: number, currentCoreHeight: number, jsPlatformVersion: DynamicValue): VerifiedTotalCreditsNAPI;
|
|
1695
1858
|
export declare function verifyVotePollVoteStateProof(proof: Uint8Array, contract: DataContractNAPI, documentTypeName: string, indexName: string, jsIndexValues: Array<Uint8Array>, jsResultType: DynamicValue, allowIncludeLockedAndAbstainingVoteTally: boolean, count: number | undefined | null, jsStartAt: DynamicValue, jsPlatformVersion: DynamicValue): VerifiedVoteStateNAPI;
|
|
1696
|
-
export declare
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1859
|
+
export declare enum VoteStateResultTypeNAPI {
|
|
1860
|
+
DOCUMENTS = 0,
|
|
1861
|
+
VOTE_TALLY = 1,
|
|
1862
|
+
DOCUMENTS_AND_VOTE_TALLY = 2
|
|
1700
1863
|
}
|
|
@@ -57,6 +57,7 @@ export var PlatformVersionNAPI;
|
|
|
57
57
|
PlatformVersionNAPI[PlatformVersionNAPI["PLATFORM_V9"] = 9] = "PLATFORM_V9";
|
|
58
58
|
PlatformVersionNAPI[PlatformVersionNAPI["PLATFORM_V10"] = 10] = "PLATFORM_V10";
|
|
59
59
|
PlatformVersionNAPI[PlatformVersionNAPI["PLATFORM_V11"] = 11] = "PLATFORM_V11";
|
|
60
|
+
PlatformVersionNAPI[PlatformVersionNAPI["PLATFORM_V12"] = 12] = "PLATFORM_V12";
|
|
60
61
|
})(PlatformVersionNAPI || (PlatformVersionNAPI = {}));
|
|
61
62
|
export var PoolingNAPI;
|
|
62
63
|
(function (PoolingNAPI) {
|
|
@@ -93,7 +94,7 @@ export var TokenEmergencyActionNAPI;
|
|
|
93
94
|
})(TokenEmergencyActionNAPI || (TokenEmergencyActionNAPI = {}));
|
|
94
95
|
export var VoteStateResultTypeNAPI;
|
|
95
96
|
(function (VoteStateResultTypeNAPI) {
|
|
96
|
-
VoteStateResultTypeNAPI[VoteStateResultTypeNAPI["
|
|
97
|
-
VoteStateResultTypeNAPI[VoteStateResultTypeNAPI["
|
|
98
|
-
VoteStateResultTypeNAPI[VoteStateResultTypeNAPI["
|
|
97
|
+
VoteStateResultTypeNAPI[VoteStateResultTypeNAPI["DOCUMENTS"] = 0] = "DOCUMENTS";
|
|
98
|
+
VoteStateResultTypeNAPI[VoteStateResultTypeNAPI["VOTE_TALLY"] = 1] = "VOTE_TALLY";
|
|
99
|
+
VoteStateResultTypeNAPI[VoteStateResultTypeNAPI["DOCUMENTS_AND_VOTE_TALLY"] = 2] = "DOCUMENTS_AND_VOTE_TALLY";
|
|
99
100
|
})(VoteStateResultTypeNAPI || (VoteStateResultTypeNAPI = {}));
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
function isMusl() {
|
|
4
|
+
if (process.platform !== 'linux')
|
|
5
|
+
return false;
|
|
6
|
+
const report = process.report?.getReport?.();
|
|
7
|
+
return !report?.header?.glibcVersionRuntime;
|
|
8
|
+
}
|
|
9
|
+
function getBinaryPath() {
|
|
10
|
+
const platform = process.platform;
|
|
11
|
+
const arch = process.arch;
|
|
12
|
+
let target = '';
|
|
13
|
+
if (platform === 'darwin') {
|
|
14
|
+
target = arch === 'arm64'
|
|
15
|
+
? 'aarch64-apple-darwin'
|
|
16
|
+
: 'x86_64-apple-darwin';
|
|
17
|
+
}
|
|
18
|
+
else if (platform === 'linux') {
|
|
19
|
+
const libc = isMusl() ? 'musl' : 'gnu';
|
|
20
|
+
if (arch === 'arm64') {
|
|
21
|
+
target = `aarch64-unknown-linux-${libc}`;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
target = `x86_64-unknown-linux-${libc}`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
// else if (platform === 'win32') {
|
|
28
|
+
// if (arch === 'arm64') {
|
|
29
|
+
// target = 'aarch64-pc-windows-msvc';
|
|
30
|
+
// }
|
|
31
|
+
// else {
|
|
32
|
+
// target = 'x86_64-pc-windows-msvc';
|
|
33
|
+
// }
|
|
34
|
+
// }
|
|
35
|
+
else {
|
|
36
|
+
console.error(`Unsupported platform: ${platform} ${arch}. Using WebAssembly instead Node-API`);
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
console.log(`running on native dpp (${target})`);
|
|
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
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
exportedModule = require('./wasmCreation.cjs');
|
|
49
|
+
}
|
|
50
|
+
module.exports = exportedModule;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>AvailableLibraries</key>
|
|
6
|
+
<array>
|
|
7
|
+
<dict>
|
|
8
|
+
<key>BinaryPath</key>
|
|
9
|
+
<string>libpshenmic_dpp.framework/libpshenmic_dpp</string>
|
|
10
|
+
<key>LibraryIdentifier</key>
|
|
11
|
+
<string>ios-arm64-simulator</string>
|
|
12
|
+
<key>LibraryPath</key>
|
|
13
|
+
<string>libpshenmic_dpp.framework</string>
|
|
14
|
+
<key>SupportedArchitectures</key>
|
|
15
|
+
<array>
|
|
16
|
+
<string>arm64</string>
|
|
17
|
+
</array>
|
|
18
|
+
<key>SupportedPlatform</key>
|
|
19
|
+
<string>ios</string>
|
|
20
|
+
<key>SupportedPlatformVariant</key>
|
|
21
|
+
<string>simulator</string>
|
|
22
|
+
</dict>
|
|
23
|
+
</array>
|
|
24
|
+
<key>CFBundlePackageType</key>
|
|
25
|
+
<string>XFWK</string>
|
|
26
|
+
<key>XCFrameworkFormatVersion</key>
|
|
27
|
+
<string>1.0</string>
|
|
28
|
+
</dict>
|
|
29
|
+
</plist>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>en</string>
|
|
7
|
+
<key>CFBundleExecutable</key>
|
|
8
|
+
<string>libpshenmic_dpp</string>
|
|
9
|
+
<key>CFBundleIdentifier</key>
|
|
10
|
+
<string>com.callstackincubator.node-api.libpshenmic-dpp</string>
|
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
+
<string>6.0</string>
|
|
13
|
+
<key>CFBundleName</key>
|
|
14
|
+
<string>libpshenmic_dpp</string>
|
|
15
|
+
<key>CFBundlePackageType</key>
|
|
16
|
+
<string>FMWK</string>
|
|
17
|
+
<key>CFBundleShortVersionString</key>
|
|
18
|
+
<string>1.0</string>
|
|
19
|
+
<key>CFBundleVersion</key>
|
|
20
|
+
<string>1</string>
|
|
21
|
+
<key>NSPrincipalClass</key>
|
|
22
|
+
<string/>
|
|
23
|
+
</dict>
|
|
24
|
+
</plist>
|
|
Binary file
|
|
File without changes
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export const verifyAddressesInfos: any;
|
|
2
|
+
export const verifyAddressInfo: any;
|
|
1
3
|
export const verifyContractProof: any;
|
|
2
4
|
export const verifyDocumentsProof: any;
|
|
3
5
|
export const verifyEpochsInfoProof: any;
|
|
@@ -24,6 +26,7 @@ export const AddressFundsFeeStrategyStepNAPI: any;
|
|
|
24
26
|
export const AddressFundsTransferTransitionNAPI: any;
|
|
25
27
|
export const AddressWitnessNAPI: any;
|
|
26
28
|
export const AssetLockProofNAPI: any;
|
|
29
|
+
export const AssetLockValueNAPI: any;
|
|
27
30
|
export const AuthorizedActionTakersNAPI: any;
|
|
28
31
|
export const BatchedTransitionNAPI: any;
|
|
29
32
|
export const BatchTransitionNAPI: any;
|
|
@@ -56,6 +59,7 @@ export const GroupNAPI: any;
|
|
|
56
59
|
export const GroupStateTransitionInfoNAPI: any;
|
|
57
60
|
export const IdentifierNAPI: any;
|
|
58
61
|
export const IdentityCreateFromAddressesTransitionNAPI: any;
|
|
62
|
+
export const IdentityCreateFromShieldedPoolTransitionNAPI: any;
|
|
59
63
|
export const IdentityCreateTransitionNAPI: any;
|
|
60
64
|
export const IdentityCreditTransferNAPI: any;
|
|
61
65
|
export const IdentityCreditTransferToAddressesTransitionNAPI: any;
|
|
@@ -64,6 +68,7 @@ export const IdentityNAPI: any;
|
|
|
64
68
|
export const IdentityPublicKeyInCreationNAPI: any;
|
|
65
69
|
export const IdentityPublicKeyNAPI: any;
|
|
66
70
|
export const IdentityTokenBalanceNAPI: any;
|
|
71
|
+
export const IdentityTokenBalanceOptionalNAPI: any;
|
|
67
72
|
export const IdentityTokenInfoNAPI: any;
|
|
68
73
|
export const IdentityTopUpFromAddressesTransitionNAPI: any;
|
|
69
74
|
export const IdentityTopUpTransitionNAPI: any;
|
|
@@ -76,6 +81,7 @@ export const OutPointNAPI: any;
|
|
|
76
81
|
export const OutputAddressNAPI: any;
|
|
77
82
|
export const OutputAddressNullableCreditsNAPI: any;
|
|
78
83
|
export const PartialIdentityNAPI: any;
|
|
84
|
+
export const PlatformAddressInfoNAPI: any;
|
|
79
85
|
export const PlatformAddressNAPI: any;
|
|
80
86
|
export const PrefundedVotingBalanceNAPI: any;
|
|
81
87
|
export const PrivateEncryptedNoteNAPI: any;
|
|
@@ -83,8 +89,14 @@ export const PrivateKeyNAPI: any;
|
|
|
83
89
|
export const PublicKeyNAPI: any;
|
|
84
90
|
export const ResourceVoteChoiceNAPI: any;
|
|
85
91
|
export const RewardDistributionTypeNAPI: any;
|
|
92
|
+
export const SerializedActionNAPI: any;
|
|
86
93
|
export const SharedEncryptedNoteNAPI: any;
|
|
94
|
+
export const ShieldedTransferTransitionNAPI: any;
|
|
95
|
+
export const ShieldedWithdrawalTransitionNAPI: any;
|
|
96
|
+
export const ShieldFromAssetLockTransitionNAPI: any;
|
|
97
|
+
export const ShieldTransitionNAPI: any;
|
|
87
98
|
export const StateTransitionNAPI: any;
|
|
99
|
+
export const StoredAssetLockInfoNAPI: any;
|
|
88
100
|
export const TimeBasedDistributionNAPI: any;
|
|
89
101
|
export const TokenBaseTransitionNAPI: any;
|
|
90
102
|
export const TokenBurnTransitionNAPI: any;
|
|
@@ -118,7 +130,7 @@ export const TotalSingleTokenBalanceNAPI: any;
|
|
|
118
130
|
export const TransactionNAPI: any;
|
|
119
131
|
export const TxInNAPI: any;
|
|
120
132
|
export const TxOutNAPI: any;
|
|
121
|
-
export const
|
|
133
|
+
export const UnshieldTransitionNAPI: any;
|
|
122
134
|
export const VerifiedBalanceTransferNAPI: any;
|
|
123
135
|
export const VerifiedContractNAPI: any;
|
|
124
136
|
export const VerifiedDocumentNAPI: any;
|
|
@@ -134,6 +146,8 @@ export const VerifiedIdentityKeysByIdentifierNAPI: any;
|
|
|
134
146
|
export const VerifiedIdentityNonceNAPI: any;
|
|
135
147
|
export const VerifiedIdentityTokenInfoNAPI: any;
|
|
136
148
|
export const VerifiedIdentityWithAddressInfosNAPI: any;
|
|
149
|
+
export const VerifiedPlatformAddressesInfosNAPI: any;
|
|
150
|
+
export const VerifiedPlatformAddressInfoNAPI: any;
|
|
137
151
|
export const VerifiedStateTransitionResultNAPI: any;
|
|
138
152
|
export const VerifiedTokenBalancesForIdentitiesNAPI: any;
|
|
139
153
|
export const VerifiedTokenContractInfoNAPI: any;
|