@dashevo/dashpay-contract 0.25.0-dev.9 → 0.25.1

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/Cargo.toml CHANGED
@@ -1,10 +1,11 @@
1
1
  [package]
2
2
  name = "dashpay-contract"
3
3
  description = "DashPay data contract schema and tools"
4
- version = "0.24.0-dev.1"
4
+ version = "0.25.0"
5
5
  edition = "2021"
6
6
  license = "MIT"
7
7
 
8
8
  [dependencies]
9
9
  lazy_static = "1.4.0"
10
10
  serde_json = { version = "1.0" }
11
+ platform-value = { path = "../rs-platform-value" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dashpay-contract",
3
- "version": "0.25.0-dev.9",
3
+ "version": "0.25.1",
4
4
  "description": "Reference contract of the DashPay DPA on Dash Evolution",
5
5
  "scripts": {
6
6
  "lint": "eslint .",
@@ -25,8 +25,8 @@
25
25
  },
26
26
  "homepage": "https://github.com/dashevo/dashpay-contract#readme",
27
27
  "devDependencies": {
28
- "@dashevo/dpp": "0.25.0-dev.9",
29
- "chai": "^4.3.4",
28
+ "@dashevo/dpp": "0.25.1",
29
+ "chai": "^4.3.9",
30
30
  "dirty-chai": "^2.0.1",
31
31
  "eslint": "^7.32.0",
32
32
  "eslint-config-airbnb-base": "^14.2.1",
@@ -122,6 +122,8 @@
122
122
  "additionalProperties": false
123
123
  },
124
124
  "contactRequest": {
125
+ "requiresIdentityEncryptionBoundedKey": 2,
126
+ "requiresIdentityDecryptionBoundedKey": 2,
125
127
  "type": "object",
126
128
  "indices": [
127
129
  {
package/src/lib.rs CHANGED
@@ -1,3 +1,4 @@
1
+ use platform_value::{Identifier, IdentifierBytes32};
1
2
  use serde_json::Error;
2
3
  use serde_json::Value;
3
4
 
@@ -11,6 +12,21 @@ pub const OWNER_ID_BYTES: [u8; 32] = [
11
12
  215, 90, 101, 229, 15, 115, 5, 44, 117, 182, 217,
12
13
  ];
13
14
 
15
+ pub mod document_types {
16
+ pub mod contact_request {
17
+ pub const NAME: &str = "contactRequest";
18
+
19
+ pub mod properties {
20
+ pub const TO_USER_ID: &str = "toUserId";
21
+ pub const CORE_HEIGHT_CREATED_AT: &str = "coreHeightCreatedAt";
22
+ pub const CORE_CHAIN_LOCKED_HEIGHT: &str = "coreChainLockedHeight";
23
+ }
24
+ }
25
+ }
26
+
27
+ pub const ID: Identifier = Identifier(IdentifierBytes32(ID_BYTES));
28
+ pub const OWNER_ID: Identifier = Identifier(IdentifierBytes32(OWNER_ID_BYTES));
29
+
14
30
  pub fn load_documents_schemas() -> Result<Value, Error> {
15
31
  serde_json::from_str(include_str!("../schema/dashpay.schema.json"))
16
32
  }
@@ -7,7 +7,8 @@ const whitepaperMasternodeText = 'Full nodes are servers running on a P2P networ
7
7
  const encoded32Chars = '4fafc98bbfe597f7ba2c9f767d52036d';
8
8
  const encoded64Chars = '4fafc98bbfe597f7ba2c9f767d52036d2226175960a908e355e5c575711eb166';
9
9
 
10
- describe('Dashpay Contract', () => {
10
+ // TODO: consider restoring with wasm-dpp
11
+ describe.skip('Dashpay Contract', () => {
11
12
  let dpp;
12
13
  let contract;
13
14
  let identityId;