@dashevo/wasm-dpp 0.25.0-dev.17 → 0.25.0-dev.18
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/wasm_dpp.d.ts +606 -606
- package/dist/wasm/wasm_dpp.js +208 -208
- package/dist/wasm/wasm_dpp_bg.js +1 -1
- package/lib/wasm/wasm_dpp.d.ts +606 -606
- package/package.json +3 -3
- package/src/data_contract_factory/data_contract_factory.rs +1 -1
- package/test/unit/dataContract/DataContract.spec.js +5 -1
- package/test/unit/dataContract/stateTransition/DataContractCreateTransition/DataContractCreateTransition.spec.js +1 -1
- package/test/unit/dataContract/stateTransition/DataContractUpdateTransition/DataContractUpdateTransition.spec.js +1 -1
- package/test/unit/document/Document.spec.js +1 -1
- package/test/unit/identity/Identity.spec.js +3 -1
- package/test/unit/identity/IdentityPublicKey.spec.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/wasm-dpp",
|
|
3
|
-
"version": "0.25.0-dev.
|
|
3
|
+
"version": "0.25.0-dev.18",
|
|
4
4
|
"description": "The JavaScript implementation of the Dash Platform Protocol",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@babel/core": "^7.15.5",
|
|
45
45
|
"@babel/preset-env": "^7.15.4",
|
|
46
46
|
"@dashevo/dashcore-lib": "~0.20.9",
|
|
47
|
-
"@dashevo/dpns-contract": "0.25.0-dev.
|
|
48
|
-
"@dashevo/dpp": "0.25.0-dev.
|
|
47
|
+
"@dashevo/dpns-contract": "0.25.0-dev.18",
|
|
48
|
+
"@dashevo/dpp": "0.25.0-dev.18",
|
|
49
49
|
"@dashevo/wasm-re2": "~2.0.4",
|
|
50
50
|
"@types/bs58": "^4.0.1",
|
|
51
51
|
"@types/node": "^14.6.0",
|
|
@@ -71,7 +71,7 @@ impl DataContractFactoryWasm {
|
|
|
71
71
|
.with_js_error()?;
|
|
72
72
|
//todo: contract config
|
|
73
73
|
self.0
|
|
74
|
-
.
|
|
74
|
+
.create_with_value_config(identifier, documents_object, contract_config, None)
|
|
75
75
|
.map(Into::into)
|
|
76
76
|
.with_js_error()
|
|
77
77
|
}
|
|
@@ -216,6 +216,8 @@ describe('DataContract', () => {
|
|
|
216
216
|
documentsMutableContractDefault: true,
|
|
217
217
|
keepsHistory: false,
|
|
218
218
|
readonly: false,
|
|
219
|
+
requiresIdentityDecryptionBoundedKey: null,
|
|
220
|
+
requiresIdentityEncryptionBoundedKey: null,
|
|
219
221
|
},
|
|
220
222
|
id: bs58.encode(contractId),
|
|
221
223
|
version: 1,
|
|
@@ -243,6 +245,8 @@ describe('DataContract', () => {
|
|
|
243
245
|
documentsMutableContractDefault: true,
|
|
244
246
|
keepsHistory: false,
|
|
245
247
|
readonly: false,
|
|
248
|
+
requiresIdentityDecryptionBoundedKey: null,
|
|
249
|
+
requiresIdentityEncryptionBoundedKey: null,
|
|
246
250
|
},
|
|
247
251
|
id: bs58.encode(contractId),
|
|
248
252
|
version: 1,
|
|
@@ -257,7 +261,7 @@ describe('DataContract', () => {
|
|
|
257
261
|
it('should return DataContract as a Buffer', () => {
|
|
258
262
|
const result = dataContract.toBuffer();
|
|
259
263
|
expect(result).to.be.instanceOf(Buffer);
|
|
260
|
-
expect(result).to.have.lengthOf(
|
|
264
|
+
expect(result).to.have.lengthOf(211);
|
|
261
265
|
});
|
|
262
266
|
});
|
|
263
267
|
|
|
@@ -66,7 +66,7 @@ describe('DataContractCreateTransition', () => {
|
|
|
66
66
|
it('should return serialized State Transition', () => {
|
|
67
67
|
const result = stateTransition.toBuffer();
|
|
68
68
|
expect(result).to.be.instanceOf(Buffer);
|
|
69
|
-
expect(result).to.have.lengthOf(
|
|
69
|
+
expect(result).to.have.lengthOf(2220);
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
it('should be able to restore contract config from bytes', () => {
|
|
@@ -66,7 +66,7 @@ describe('DataContractUpdateTransition', () => {
|
|
|
66
66
|
it('should return serialized State Transition', () => {
|
|
67
67
|
const result = stateTransition.toBuffer();
|
|
68
68
|
expect(result).to.be.instanceOf(Buffer);
|
|
69
|
-
expect(result).to.have.lengthOf(
|
|
69
|
+
expect(result).to.have.lengthOf(2188);
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
it('should be able to restore contract config from bytes', () => {
|
|
@@ -423,7 +423,7 @@ describe('Document', () => {
|
|
|
423
423
|
it('should return serialized Document', () => {
|
|
424
424
|
const buffer = document.toBuffer();
|
|
425
425
|
expect(buffer).to.be.instanceOf(Buffer);
|
|
426
|
-
expect(buffer.length).to.equal(
|
|
426
|
+
expect(buffer.length).to.equal(564);
|
|
427
427
|
});
|
|
428
428
|
|
|
429
429
|
// TODO: remove or replace?
|
|
@@ -83,6 +83,7 @@ describe('Identity', () => {
|
|
|
83
83
|
securityLevel: KeySecurityLevel.MASTER,
|
|
84
84
|
readOnly: false,
|
|
85
85
|
disabledAt: null,
|
|
86
|
+
contractBounds: null,
|
|
86
87
|
};
|
|
87
88
|
|
|
88
89
|
const ipk = new IdentityPublicKey(1);
|
|
@@ -116,7 +117,7 @@ describe('Identity', () => {
|
|
|
116
117
|
it('should return buffer', () => {
|
|
117
118
|
const result = identity.toBuffer();
|
|
118
119
|
expect(result).to.be.instanceOf(Buffer);
|
|
119
|
-
expect(result).to.have.length(
|
|
120
|
+
expect(result).to.have.length(82);
|
|
120
121
|
});
|
|
121
122
|
});
|
|
122
123
|
|
|
@@ -161,6 +162,7 @@ describe('Identity', () => {
|
|
|
161
162
|
securityLevel: KeySecurityLevel.MASTER,
|
|
162
163
|
readOnly: false,
|
|
163
164
|
disabledAt: null,
|
|
165
|
+
contractBounds: null,
|
|
164
166
|
},
|
|
165
167
|
],
|
|
166
168
|
balance: 0,
|
|
@@ -14,6 +14,7 @@ describe('IdentityPublicKey', () => {
|
|
|
14
14
|
purpose: IdentityPublicKey.PURPOSES.AUTHENTICATION,
|
|
15
15
|
securityLevel: IdentityPublicKey.SECURITY_LEVELS.MASTER,
|
|
16
16
|
readOnly: false,
|
|
17
|
+
contractBounds: null,
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
publicKey = new IdentityPublicKey(1);
|
|
@@ -196,6 +197,7 @@ describe('IdentityPublicKey', () => {
|
|
|
196
197
|
securityLevel: IdentityPublicKey.SECURITY_LEVELS.MASTER,
|
|
197
198
|
readOnly: false,
|
|
198
199
|
disabledAt: now.getTime(),
|
|
200
|
+
contractBounds: null,
|
|
199
201
|
});
|
|
200
202
|
});
|
|
201
203
|
});
|
|
@@ -216,6 +218,7 @@ describe('IdentityPublicKey', () => {
|
|
|
216
218
|
securityLevel: IdentityPublicKey.SECURITY_LEVELS.MASTER,
|
|
217
219
|
readOnly: false,
|
|
218
220
|
disabledAt: now.getTime(),
|
|
221
|
+
contractBounds: null,
|
|
219
222
|
});
|
|
220
223
|
});
|
|
221
224
|
});
|