@dashevo/dashpay-contract 0.25.0-dev.2 → 0.25.0-dev.21
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 +1 -0
- package/package.json +2 -2
- package/schema/dashpay.schema.json +2 -0
- package/src/lib.rs +16 -0
- package/test/unit/schema.spec.js +2 -1
package/Cargo.toml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dashpay-contract",
|
|
3
|
-
"version": "0.25.0-dev.
|
|
3
|
+
"version": "0.25.0-dev.21",
|
|
4
4
|
"description": "Reference contract of the DashPay DPA on Dash Evolution",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "eslint .",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/dashevo/dashpay-contract#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@dashevo/dpp": "0.25.0-dev.
|
|
28
|
+
"@dashevo/dpp": "0.25.0-dev.21",
|
|
29
29
|
"chai": "^4.3.4",
|
|
30
30
|
"dirty-chai": "^2.0.1",
|
|
31
31
|
"eslint": "^7.32.0",
|
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
|
}
|
package/test/unit/schema.spec.js
CHANGED
|
@@ -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
|
-
|
|
10
|
+
// TODO: consider restoring with wasm-dpp
|
|
11
|
+
describe.skip('Dashpay Contract', () => {
|
|
11
12
|
let dpp;
|
|
12
13
|
let contract;
|
|
13
14
|
let identityId;
|