ShareTransferRequest share.transfer-request@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- network
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/share/transfer-request.v1.json
share.transfer-request@1: network-wide sharing. Ids only; no resource title or content. Members apply to people audience; pending recipients may preview for seven days. `key_slot` is the content key wrapped for the recipient, required when the item is people-locked (Locker) and checked against the recipient's current key.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
to | one of | yes | ||
keep_access | boolean |
| ||
key_slot | locker.people-slot |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: example
{
"to": "@maticus"
}Valid: locked
{
"to": "@maticus",
"keep_access": false,
"key_slot": {
"subject": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"algorithm": "ECDH-P256/HKDF-SHA256/AES-256-GCM",
"recipient_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"ephemeral_public_key": {
"kty": "EC",
"crv": "P-256",
"x": "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHg",
"y": "eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXk"
},
"salt": "c3Nzc3Nzc3Nzc3Nzc3Nzcw==",
"nonce": "bm5ubm5ubm5ubm5u",
"wrapped_key": "d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3"
}
}Valid: subject
{
"to": {
"subject": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
}
},
"keep_access": true
}Rejected: keep-access
{
"to": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"keep_access": "true"
}Rejected: key-slot
{
"to": "@maticus",
"key_slot": {
"subject": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"algorithm": "ECDH-P256/HKDF-SHA256/AES-256-GCM",
"recipient_key": "not-a-thumbprint"
}
}Rejected: unknown-field
{
"to": "@maticus",
"title": "must never appear"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('share.transfer-request@1', value); // { valid, errors: [{ path, message }] }