@dashevo/dashpay-contract 4.2.0-dev.9 → 5.0.0-beta.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/README.md +5 -0
- package/package.json +2 -2
- package/schema/v2/dashpay.schema.json +8 -0
- package/src/v2/mod.rs +2 -1
package/README.md
CHANGED
|
@@ -59,6 +59,11 @@ To run tests, simply run
|
|
|
59
59
|
npm test
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
## Design notes
|
|
63
|
+
|
|
64
|
+
- Count proofs are public. Never add a countable index on `contactRequest` that groups by sender under a recipient, such as `[toUserId, $ownerId]`: it would let anyone list who contacted whom, with counts. A count keyed on `toUserId` alone reveals only a total.
|
|
65
|
+
- Ignoring a sender is local to each device. If it ever syncs across devices, it must be one list the owner encrypts to themselves, not a `contactInfo` document per ignored sender. A `contactInfo` about someone who is not a contact exists publicly, and its creation time lines up with the incoming `contactRequest`, which reveals who was ignored.
|
|
66
|
+
|
|
62
67
|
## Contributing
|
|
63
68
|
|
|
64
69
|
Feel free to dive in! [Open an issue](https://github.com/dashpay/platform/issues/new/choose) or submit PRs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dashpay-contract",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-beta.1",
|
|
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/wasm-dpp": "
|
|
28
|
+
"@dashevo/wasm-dpp": "5.0.0-beta.1",
|
|
29
29
|
"chai": "^4.3.10",
|
|
30
30
|
"dirty-chai": "^2.0.1",
|
|
31
31
|
"eslint": "^9.18.0",
|
|
@@ -74,6 +74,14 @@
|
|
|
74
74
|
"maxItems": 21,
|
|
75
75
|
"description": "Platform address in storage form (type byte 0x00 P2PKH / 0x01 P2SH followed by the 20-byte HASH160, i.e. RIPEMD160 of SHA256, of the public key or redeem script) for public payments. The type byte is consensus-enforced by a data trigger.",
|
|
76
76
|
"position": 6
|
|
77
|
+
},
|
|
78
|
+
"shieldedAddress": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"byteArray": true,
|
|
81
|
+
"minItems": 43,
|
|
82
|
+
"maxItems": 43,
|
|
83
|
+
"description": "Raw Orchard receiving address: 11-byte diversifier followed by 32-byte diversified transmission key. Clients validate before payment; wallets should use a dedicated tip account.",
|
|
84
|
+
"position": 7
|
|
77
85
|
}
|
|
78
86
|
},
|
|
79
87
|
"minProperties": 1,
|
package/src/v2/mod.rs
CHANGED
|
@@ -3,7 +3,8 @@ use serde_json::Value;
|
|
|
3
3
|
|
|
4
4
|
// Document-type name and property constants live in `crate::v1::document_types`;
|
|
5
5
|
// v2 does not change any names v1 defined, it only adds the optional
|
|
6
|
-
// `corePaymentAddress
|
|
6
|
+
// `corePaymentAddress`, `platformPaymentAddress`, and `shieldedAddress`
|
|
7
|
+
// properties to `profile`.
|
|
7
8
|
|
|
8
9
|
pub fn load_documents_schemas() -> Result<Value, Error> {
|
|
9
10
|
serde_json::from_str(include_str!("../../schema/v2/dashpay.schema.json"))
|