pshenmic-dpp 1.1.2-dev.3 → 1.1.2-dev.5
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/wasm/pshenmic_dpp.d.ts +45 -42
- package/dist/wasm/pshenmic_dpp.js +24 -1
- package/dist/wasm/pshenmic_dpp_bg.js +1 -1
- package/dist/wasm/pshenmic_dpp_bg.wasm.d.ts +44 -42
- package/dist/wasm/pshenmic_dpp_zipped.js +1 -1
- package/package.json +1 -1
- package/tests/AsyncImportTest.spec.cjs +2 -2
- package/tests/DataContract.spec.cjs +1 -1
- package/tests/DataContractCreateStateTransition.spec.cjs +9 -10
- package/tests/DataContractUpdateStateTransition.spec.cjs +9 -9
- package/tests/IdentityCreateTransition.spec.cjs +0 -1
- package/tests/mocks/DataContract/DataContract.json +16 -5
- package/tests/mocks/DataContract/index.js +1 -1
|
@@ -8,7 +8,7 @@ const { default: wasm } = require('..')
|
|
|
8
8
|
describe('DataContract Updatet Transition', function () {
|
|
9
9
|
describe('serialization / deserialization', function () {
|
|
10
10
|
it('should allow to create document_transitions from data contract', () => {
|
|
11
|
-
const dataContract = wasm.DataContractWASM.fromValue(value, false
|
|
11
|
+
const dataContract = wasm.DataContractWASM.fromValue(value, false)
|
|
12
12
|
|
|
13
13
|
const dataContractTransition = new wasm.DataContractUpdateTransitionWASM(dataContract, BigInt(1))
|
|
14
14
|
|
|
@@ -17,7 +17,7 @@ describe('DataContract Updatet Transition', function () {
|
|
|
17
17
|
})
|
|
18
18
|
|
|
19
19
|
it('should allow to convert document_transitions to bytes and create from bytes', () => {
|
|
20
|
-
const dataContract = wasm.DataContractWASM.fromValue(value, false
|
|
20
|
+
const dataContract = wasm.DataContractWASM.fromValue(value, false)
|
|
21
21
|
|
|
22
22
|
const dataContractTransition = new wasm.DataContractUpdateTransitionWASM(dataContract, BigInt(1))
|
|
23
23
|
|
|
@@ -32,7 +32,7 @@ describe('DataContract Updatet Transition', function () {
|
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
it('should allow to convert data contract transition to state document_transitions and create data contract transition from state transition', () => {
|
|
35
|
-
const dataContract = wasm.DataContractWASM.fromValue(value, false
|
|
35
|
+
const dataContract = wasm.DataContractWASM.fromValue(value, false)
|
|
36
36
|
|
|
37
37
|
const dataContractTransition = new wasm.DataContractUpdateTransitionWASM(dataContract, BigInt(1))
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ describe('DataContract Updatet Transition', function () {
|
|
|
46
46
|
|
|
47
47
|
describe('getters', function () {
|
|
48
48
|
it('should allow to get feature version', () => {
|
|
49
|
-
const dataContract = wasm.DataContractWASM.fromValue(value, false
|
|
49
|
+
const dataContract = wasm.DataContractWASM.fromValue(value, false)
|
|
50
50
|
|
|
51
51
|
const dataContractTransition = new wasm.DataContractUpdateTransitionWASM(dataContract, BigInt(1))
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ describe('DataContract Updatet Transition', function () {
|
|
|
54
54
|
})
|
|
55
55
|
|
|
56
56
|
it('should allow to verify protocol version', () => {
|
|
57
|
-
const dataContract = wasm.DataContractWASM.fromValue(value, false
|
|
57
|
+
const dataContract = wasm.DataContractWASM.fromValue(value, false)
|
|
58
58
|
|
|
59
59
|
const dataContractTransition = new wasm.DataContractUpdateTransitionWASM(dataContract, BigInt(1))
|
|
60
60
|
|
|
@@ -62,7 +62,7 @@ describe('DataContract Updatet Transition', function () {
|
|
|
62
62
|
})
|
|
63
63
|
|
|
64
64
|
it('should allow to verify incorrect protocol version', () => {
|
|
65
|
-
const dataContract = wasm.DataContractWASM.fromValue(value, false
|
|
65
|
+
const dataContract = wasm.DataContractWASM.fromValue(value, false)
|
|
66
66
|
|
|
67
67
|
const dataContractTransition = new wasm.DataContractUpdateTransitionWASM(dataContract, BigInt(1))
|
|
68
68
|
|
|
@@ -75,7 +75,7 @@ describe('DataContract Updatet Transition', function () {
|
|
|
75
75
|
})
|
|
76
76
|
|
|
77
77
|
it('should allow to get data contract', () => {
|
|
78
|
-
const dataContract = wasm.DataContractWASM.fromValue(value, false
|
|
78
|
+
const dataContract = wasm.DataContractWASM.fromValue(value, false)
|
|
79
79
|
|
|
80
80
|
const dataContractTransition = new wasm.DataContractUpdateTransitionWASM(dataContract, BigInt(1))
|
|
81
81
|
|
|
@@ -89,11 +89,11 @@ describe('DataContract Updatet Transition', function () {
|
|
|
89
89
|
it('should allow to set the data contract', () => {
|
|
90
90
|
const [dataContractBytes] = dataContractsBytes
|
|
91
91
|
|
|
92
|
-
const dataContract = wasm.DataContractWASM.fromValue(value, false
|
|
92
|
+
const dataContract = wasm.DataContractWASM.fromValue(value, false)
|
|
93
93
|
|
|
94
94
|
const dataContractTransition = new wasm.DataContractUpdateTransitionWASM(dataContract, BigInt(1))
|
|
95
95
|
|
|
96
|
-
const newDataContract = wasm.DataContractWASM.fromBytes(fromHexString(dataContractBytes), false
|
|
96
|
+
const newDataContract = wasm.DataContractWASM.fromBytes(fromHexString(dataContractBytes), false)
|
|
97
97
|
|
|
98
98
|
dataContractTransition.setDataContract(newDataContract)
|
|
99
99
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const assert = require('assert')
|
|
2
2
|
const { describe, it } = require('mocha')
|
|
3
3
|
const { default: wasm } = require('..')
|
|
4
|
-
const {fromHexString} = require("./utils/hex");
|
|
5
4
|
|
|
6
5
|
describe('IdentityCreateTransition', function () {
|
|
7
6
|
describe('serialization / deserialization', function () {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$format_version": "
|
|
2
|
+
"$format_version": "1",
|
|
3
3
|
"id": "4fJLR2GYTPFdomuTVvNy3VRrvWgvkKPzqehEBpNf2nk6",
|
|
4
4
|
"config": {
|
|
5
|
-
"$format_version": "
|
|
5
|
+
"$format_version": "1",
|
|
6
6
|
"canBeDeleted": false,
|
|
7
7
|
"readonly": false,
|
|
8
8
|
"keepsHistory": false,
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"documentsMutableContractDefault": true,
|
|
11
11
|
"documentsCanBeDeletedContractDefault": true,
|
|
12
12
|
"requiresIdentityEncryptionBoundedKey": null,
|
|
13
|
-
"requiresIdentityDecryptionBoundedKey": null
|
|
13
|
+
"requiresIdentityDecryptionBoundedKey": null,
|
|
14
|
+
"sizedIntegerTypes": true
|
|
14
15
|
},
|
|
15
16
|
"version": 1,
|
|
16
17
|
"ownerId": "11111111111111111111111111111111",
|
|
@@ -149,5 +150,15 @@
|
|
|
149
150
|
"status"
|
|
150
151
|
]
|
|
151
152
|
}
|
|
152
|
-
}
|
|
153
|
-
|
|
153
|
+
},
|
|
154
|
+
"createdAt": null,
|
|
155
|
+
"updatedAt": null,
|
|
156
|
+
"createdAtBlockHeight": null,
|
|
157
|
+
"updatedAtBlockHeight": null,
|
|
158
|
+
"createdAtEpoch": null,
|
|
159
|
+
"updatedAtEpoch": null,
|
|
160
|
+
"groups": {},
|
|
161
|
+
"tokens": {},
|
|
162
|
+
"keywords": [],
|
|
163
|
+
"description": null
|
|
164
|
+
}
|
|
@@ -3,4 +3,4 @@ import value from "./DataContract.json" with {type: 'json'}
|
|
|
3
3
|
export {value}
|
|
4
4
|
export const id = '4fJLR2GYTPFdomuTVvNy3VRrvWgvkKPzqehEBpNf2nk6'
|
|
5
5
|
export const ownerId = '11111111111111111111111111111111'
|
|
6
|
-
export const dataContractsBytes = ['
|
|
6
|
+
export const dataContractsBytes = ['01ea8920edea52fa400de2ccc43052b2821f45585241a2875d4250e35d4ce937c800000000000101000001ab321b19457b1c16b12762509276d47d952f582d978cbd8b50bbfc2fd8a7767d0001046e6f7465160312047479706512066f626a656374120a70726f70657274696573160112076d65737361676516021204747970651206737472696e671208706f736974696f6e030012146164646974696f6e616c50726f70657274696573130000000000000000000000']
|